commit - 0dc58f03ac53b1f50cd2c4beb81a82ac436daf8f
commit + cea02657fe5df49f93734e6c5a7e2740ac45c2be
blob - /dev/null
blob + a206c6f0d8c9ca2668d396180297ed96aa68aa03 (mode 644)
--- /dev/null
+++ home/.config/polybar/config.ini
+[colors]
+background = #1E1812
+background-alt = #2A2118
+foreground = #FEF67A
+primary = #F2CA30
+secondary = #FEF67A
+alert = #CF4229
+disabled = #7A6A45
+occupied = #F2CA30
+
+[settings]
+screenchange-reload = true
+
+[bar/main]
+override-redirect = true
+wm-restack = generic
+
+offset-x = 10
+offset-y = 1
+width = 99%
+height = 20px
+background = ${colors.background}
+foreground = ${colors.foreground}
+font-0 = "NotoMono Nerd Font:size=9;2"
+
+padding = 1
+module-margin = 1
+
+modules-left = xworkspaces title
+modules-right = pulseaudio temp battery date
+
+[module/xworkspaces]
+type = internal/xworkspaces
+icon-0 = nogroup;
+icon-1 = one;1
+icon-2 = two;2
+icon-3 = three;3
+icon-4 = four;4
+icon-5 = five;5
+icon-6 = six;6
+icon-7 = seven;7
+icon-8 = eight;8
+icon-9 = nine;9
+icon-default = ?
+
+label-active = %icon%
+label-active-background = ${colors.primary}
+label-active-foreground = ${colors.background}
+label-active-padding = 1
+label-active-margin =2px
+label-occupied = %icon%
+label-occupied-background = ${colors.background-alt}
+label-occupied-foreground = ${colors.occupied}
+label-occupied-padding = 1
+label-occupied-margin = 2px
+label-urgent = %icon%
+label-urgent-background = ${colors.alert}
+label-urgent-foreground = ${colors.foreground}
+label-urgent-padding = 1
+label-urgent-margin = 2px
+label-empty = %icon%
+label-empty-background = ${colors.background}
+label-empty-foreground = ${colors.disabled}
+label-empty-padding = 1
+label-empty-margin = 2px
+
+[module/title]
+type = internal/xwindow
+label = %title:0:60:...%
+label-empty =
+
+[module/pulseaudio]
+type = internal/pulseaudio
+
+format-volume-prefix = "vol: "
+format-volume-prefix-foreground = ${colors.foreground}
+format-volume = <label-volume>
+label-volume-foreground = ${colors.foreground}
+label-volume-padding = 1
+label-volume = %percentage%%
+label-muted-padding = 1
+label-muted = "vol: x"
+
+[module/temp]
+type = custom/script
+exec = sysctl -n hw.sensors.cpu0.temp0 2>/dev/null | cut -d. -f1 | awk '{print "temp: "$1"°C"}'
+interval = 5
+
+[module/battery]
+type = custom/script
+exec = apm -b | grep -q '^4$' && exit 0; printf 'bat: '; apm -l
+interval = 10
+
+[module/date]
+type = internal/date
+interval = 1
+date = %m-%d
+time = %H:%M
+label = %date% %time%
blob - /dev/null
blob + 05c252d065bc668ecd3526bc90dd52336a76fb3f (mode 755)
--- /dev/null
+++ home/.config/polybar/cwm-groups.sh
+#!/bin/sh
+
+current="$(
+ xprop -root _NET_CURRENT_DESKTOP 2>/dev/null |
+ awk -F'= ' '{print $2}'
+)"
+
+[ -z "$current" ] && current=1
+
+occupied=""
+
+for wid in $(xprop -root _NET_CLIENT_LIST 2>/dev/null | sed 's/^.*# //' | tr ',' ' '); do
+ desk="$(
+ xprop -id "$wid" _NET_WM_DESKTOP 2>/dev/null |
+ awk -F'= ' '{print $2}'
+ )"
+
+ case "$desk" in
+ ''|*not*) continue ;;
+ esac
+
+ occupied="$occupied $desk"
+done
+
+for n in 1 2 3 4 5 6 7 8 9; do
+ if [ "$n" -eq "$current" ]; then
+ # active group
+ printf '%%{F#98c379}[%s]%%{F-}' "$n"
+ elif echo " $occupied " | grep -q " $n "; then
+ # occupied group
+ printf '%%{F#61afef}%s%%{F-}' "$n"
+ else
+ # empty group
+ printf '%%{F#5c6370}%s%%{F-}' "$n"
+ fi
+
+ [ "$n" -lt 9 ] && printf ' '
+done
+
+printf '\n'