leftwm-themes/polybar.modules

391 lines
10 KiB
Plaintext

;; ┌────────────────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀│
;; └────────────────────────────────────────────────────────────────┘
###### List of available modules ######
;; arch-updates
;; battery
;; cpu
;; cpu-graph
;; date
;; ewmh
;; layout
;; layout0
;; layout1
;; launcher
;; mem
;; mem-graph
;; powermenu
;; pulseaudio
;; pulseaudio-control
;; spacer
;; spacer-dot
;; temperature
;; wlan
;; workspace0
;; workspace1
###### Modules ######
[module/arch-updates]
type = custom/script
exec = $HOME/.config/leftwm/themes/current/scripts/check-arch-updates.sh
interval = 1000
label = %output%
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix-foreground = ${color.foreground}
click-left = alacritty -e sudo pacman -Syu
click-right = pamac-manager --updates
[module/battery]
;https://github.com/jaagr/polybar/wiki/Module:-battery
type = internal/battery
battery = BAT1
adapter = AC0
full-at = 100
format-charging = <animation-charging> <label-charging>
label-charging =  %percentage%%
format-charging-foreground = ${color.foreground}
format-charging-background = ${color.background}
;format-charging-underline = #a3c725
format-discharging = <ramp-capacity> <label-discharging>
label-discharging =  %percentage%%
;format-discharging-underline = #c7ae25
format-discharging-foreground = ${color.foreground}
format-discharging-background = ${color.background}
format-full-prefix = " "
format-full-prefix-foreground = #a3c725
;format-full-underline = #a3c725
format-full-foreground = ${color.foreground}
format-full-background = ${color.background}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = #c7ae25
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = #a3c725
animation-charging-framerate = 750
[module/bluetooth]
type = custom/script
exec = $HOME/.config/leftwm/themes/current/scripts/bluetooth.sh
interval = 2
click-left = blueberry
click-right = $HOME/.config/leftwm/themes/current/scripts/bluetooth_toggle.sh
format-padding = 1
[module/cpu]
type = internal/cpu
interval = 2
;format-prefix = " "
;format-prefix-foreground = ${color.shade4}
;format-foreground = ${color.modulefg}
;format-background = ${color.shade6}
;format-underline = #f90000
label = CPU %percentage:2%%
[module/cpu-graph]
type = internal/cpu
interval = 0.08
;format = " <ramp-coreload>"
format = " <ramp-coreload>"
format-margin = 1
ramp-coreload-0 = ▁
ramp-coreload-0-foreground = ${color.foreground}
ramp-coreload-1 = ▂
ramp-coreload-1-foreground = ${color.foreground}
ramp-coreload-2 = ▃
ramp-coreload-2-foreground = ${color.light-green}
ramp-coreload-3 = ▄
ramp-coreload-3-foreground = ${color.green}
ramp-coreload-4 = ▅
ramp-coreload-4-foreground = ${color.yellow}
ramp-coreload-5 = ▆
ramp-coreload-5-foreground = ${color.yellow}
ramp-coreload-6 = ▇
ramp-coreload-6-foreground = ${color.red}
ramp-coreload-7 = █
ramp-coreload-7-foreground = ${color.red}
ramp-coreload-font = 3
format-background = ${color.background}
format-foreground = ${color.foreground}
format-underline =
format-padding = 1
[module/date]
type = internal/date
interval = 1.0
time = %a %H:%M
time-alt = %B %d, %Y
format = <label>
label = %time%
format-prefix = " "
[module/ewmh]
type = internal/xworkspaces
pin-workspaces = true
enable-click = true
enable-scroll = true
format = <label-state>
label-monitor = %name%
[module/layout]
type = custom/script
exec = leftwm-state -w "$index" -s "{{ workspace.layout }}"
tail = true
[module/layout0]
type = custom/script
format-prefix = " "
format-prefix-foreground = ${color..primary}
exec = leftwm-state -w 0 -s "{{ workspace.layout }}"
tail = true
click-left = leftwm-command "NextLayout"
click-right = leftwm-command "PreviousLayout"
[module/layout1]
type = custom/script
format-prefix = " "
format-prefix-foreground = ${color.primary}
exec = leftwm-state -w 1 -s "{{ workspace.layout }}"
tail = true
click-left = leftwm-command "NextLayout"
click-right = leftwm-command "PreviousLayout"
[module/launcher]
type = custom/text
content = ""
content-padding = 2
content-foreground = ${color.background}
content-background = ${color.primary}
click-left = $HOME/.config/leftwm/themes/current/rofi/launcher.sh
[module/mem]
type = internal/memory
interval = 2
label = MEM %percentage_used%%
[module/mem-graph]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 2
; Available tags:
; <label> (default)
; <bar-used>
; <bar-free>
; <ramp-used>
; <ramp-free>
; <bar-swap-used>
; <bar-swap-free>
; <ramp-swap-used>
; <ramp-swap-free>
format = " <bar-used>  <ramp-swap-used>"
;format = "<label>"
ramp-swap-used-0 = ▁
ramp-swap-used-1 = ▂
ramp-swap-used-2 = ▃
ramp-swap-used-3 = ▄
ramp-swap-used-4 = ▅
ramp-swap-used-5 = ▆
ramp-swap-used-6 = ▇
ramp-swap-used-7 = █
ramp-swap-used-0-foreground = ${color.foreground}
ramp-swap-used-1-foreground = ${color.light-green}
ramp-swap-used-2-foreground = ${color.green}
ramp-swap-used-3-foreground = ${color.yellow}
ramp-swap-used-4-foreground = ${color.red}
ramp-swap-used-5-foreground = ${color.red}
ramp-swap-used-6-foreground = ${color.red}
ramp-swap-used-7-foreground = ${color.red}
ramp-swap-used-font = 3
;ramp-swap-used-underline = ${color.foreground}
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
; %percentage_swap_used%
; %percentage_swap_free%
; %mb_swap_total%
; %mb_swap_free%
; %mb_swap_used%
; %gb_swap_total%
; %gb_swap_free%
; %gb_swap_used%
label = " %percentage_used%%"
; Only applies if <bar-used> is used
bar-used-indicator =
bar-used-width = 10
bar-used-fill = ━
bar-used-empty = ━
bar-used-indicator-foreground = ${color.foreground}
bar-used-empty-foreground = ${color.foreground}
bar-used-foreground-0 = ${color.green}
bar-used-foreground-1 = ${color.yellow}
bar-used-foreground-2 = ${color.red}
; Only applies if <ramp-used> is used
ramp-used-0 = ▁
ramp-used-1 = ▂
ramp-used-2 = ▃
ramp-used-3 = ▄
ramp-used-4 = ▅
ramp-used-5 = ▆
ramp-used-6 = ▇
ramp-used-7 = █
ramp-used-0-foreground = ${color.foreground}
ramp-used-1-foreground = ${color.foreground}
ramp-used-2-foreground = ${color.light-green}
ramp-used-3-foreground = ${color.green}
ramp-used-4-foreground = ${color.yellow}
ramp-used-5-foreground = ${color.yellow}
ramp-used-6-foreground = ${color.red}
ramp-used-7-foreground = ${color.red}
ramp-used-font = 3
; Only applies if <ramp-free> is used
ramp-free-0 = ▁
ramp-free-1 = ▂
ramp-free-2 = ▃
ramp-free-3 = ▄
ramp-free-4 = ▅
ramp-free-5 = ▆
ramp-free-6 = ▇
ramp-free-7 = █
format-background = ${color.background}
format-foreground = ${color.foreground}
;format-underline = ${color.foreground
format-padding = 1
[module/powermenu]
type = custom/text
content = "襤"
content-padding = 2
content-foreground = ${color.background}
content-background = ${color.primary}
click-left = $HOME/.config/leftwm/themes/current/rofi/powermenu.sh
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
ramp-volume-0 = 奄
ramp-volume-1 = 奔
ramp-volume-2 = 墳
label-muted = 婢 muted
label-muted-foreground = ${color..primary}
click-right = pavucontrol
[module/pulseaudio-control]
type = custom/script
tail = true
format-underline = ${colors.cyan}
label-padding = 0
label-foreground = ${colors.foreground}
# Icons mixed from Font Awesome 5 and Material Icons
# You can copy-paste your options for each possible action, which is more
# trouble-free but repetitive, or apply only the relevant ones (for example
# --sink-blacklist is only needed for next-sink).
exec = $HOME/.config/leftwm/themes/current/scripts/pulseaudio-control.sh --icons-volume " , " --icon-muted " " --sink-nicknames-from "device.description" --sink-nickname "alsa_output.pci-0000_07_00.6.iec958-stereo:蓼 Speakers" --sink-nickname "alsa_output.pci-0000_07_00.6.analog-stereo: Headphones" listen
click-right = exec pavucontrol &
click-left = $HOME/.config/leftwm/themes/current/scripts/pulseaudio-control.sh togmute
click-middle = $HOME/.config/leftwm/themes/current/scripts/pulseaudio-control.sh --sink-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-sink
scroll-up = $HOME/.config/leftwm/themes/current/scripts/pulseaudio-control.sh --volume-max 130 up
scroll-down = $HOME/.config/leftwm/themes/current/scripts/pulseaudio-control.sh --volume-max 130 down
[module/spacer]
type = custom/text
content = " "
[module/spacer-dot]
type = custom/text
content-foreground = ${color.grey}
content = "·"
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <label>
format-underline = #f50a4d
format-warn = <label-warn>
format-warn-underline = ${self.format-underline}
format-background = ${color.background}
format-foreground = ${color.foreground}
label = %temperature-c%
label-warn =    %temperature-c%
label-warn-foreground = ${color.orange}
[module/wlan]
type = internal/network
interface = interfaceth0
interval = 3.0
format-connected = <label-connected>
format-connected-padding = 0
label-connected = "%{A1:nm-connection-editor:}直 %{A}"
[module/workspace0]
type = custom/script
exec = leftwm-state -w 0 -t "$SCRIPTPATH/polybar.liquid"
tail = true
[module/workspace1]
type = custom/script
exec = leftwm-state -w 1 -t "$SCRIPTPATH/polybar.liquid"
tail = true