578 lines
14 KiB
INI
578 lines
14 KiB
INI
;=====================================================
|
|
;
|
|
; To learn more about how to configure Polybar
|
|
; go to https://github.com/jaagr/polybar
|
|
;
|
|
; The README contains alot of information
|
|
;
|
|
;=====================================================
|
|
[fonts]
|
|
font-0 = Iosevka Nerd Font:size=11:style=Heavy,Regular:antialias=true;1
|
|
font-1 = Noto Sans CJK JP:size=14:antialias=true;1
|
|
|
|
[colors]
|
|
include-file = ~/.cache/wal/polybar
|
|
|
|
[global/wm]
|
|
margin-top = 5
|
|
margin-bottom = 5
|
|
|
|
[bar/default]
|
|
enable_ipc = true
|
|
width = 100%:-12
|
|
height = 28
|
|
offset-x = 6
|
|
offset-y = 3
|
|
dim-value = 1.0
|
|
cursor-click = pointer
|
|
background = ${colors.background}
|
|
foreground = ${colors.foreground}
|
|
overline-size = 3
|
|
overline-color = #f00
|
|
underline-size = 3
|
|
underline-color = #00f
|
|
border-bottom-size = 0
|
|
border-bottom-color = ${colors.primary}
|
|
radius-top = 0
|
|
radius-bottom = 0
|
|
spacing = 0
|
|
padding-left = 1
|
|
padding-right = 2
|
|
module-margin-left = 2
|
|
module-margin-right = 1
|
|
font-0 = ${fonts.font-0}
|
|
font-1 = ${fonts.font-1}
|
|
wm-restack = bspwm
|
|
override-redirect = true
|
|
scroll-up = bspwm-desknext
|
|
scroll-down = bspwm-deskprev
|
|
|
|
[bar/HDMI-A-1]
|
|
inherit = bar/default
|
|
monitor = ${env:MONITOR:HDMI-A-1}
|
|
modules-left = bspwm
|
|
modules-center =
|
|
modules-right = xwindow mpd mixer date
|
|
|
|
[bar/DisplayPort-1]
|
|
inherit = bar/default
|
|
monitor = ${env:MONITOR:DisplayPort-1}
|
|
modules-left = bspwm
|
|
modules-center = xwindow
|
|
modules-right = mpd mixer date
|
|
|
|
[module/xwindow]
|
|
type = internal/xwindow
|
|
label = %title:0:90:...%
|
|
label-padding-left = 2
|
|
label-padding-right = 2
|
|
label-foreground = ${colors.foreground-focus}
|
|
label-background = ${colors.primary}
|
|
label-underline= ${colors.primary}
|
|
|
|
[module/mixer]
|
|
type = custom/script
|
|
exec = mixer listen --color=color2 --volume-icons="奄,奔,墳,"
|
|
tail = true
|
|
format-prefix = " "
|
|
# click-left = kitty -e cmixer &
|
|
# click-right = mixer next
|
|
format-prefix-foreground = ${xrdb:color2}
|
|
|
|
[module/mutt-wizard]
|
|
type = custom/script
|
|
exec = mailbox
|
|
interval = 5
|
|
format-prefix = " "
|
|
;format-underline = ${colors.red}
|
|
click-left = kitty -e neomutt &
|
|
format-prefix-foreground = ${xrdb:color2}
|
|
|
|
[module/bspwm]
|
|
type = internal/bspwm
|
|
|
|
label-focused = %name%
|
|
label-focused-foreground = ${colors.foreground-focus}
|
|
label-focused-background = ${colors.primary}
|
|
label-focused-underline= ${colors.primary}
|
|
label-focused-underline-size = 5
|
|
label-focused-padding-left = 2.5
|
|
label-focused-padding-right = 2
|
|
|
|
label-occupied = %name%
|
|
label-occupied-padding-left = 2.5
|
|
label-occupied-padding-right = 2
|
|
|
|
label-urgent = %name%
|
|
label-urgent-background = ${colors.alert}
|
|
label-urgent-padding-left = 2.5
|
|
label-urgent-padding-right = 2
|
|
|
|
label-empty = %name%
|
|
label-empty-foreground = ${colors.foreground-alt}
|
|
label-empty-padding-left = 2.5
|
|
label-empty-padding-right = 2
|
|
|
|
[module/mpd]
|
|
type = internal/mpd
|
|
host = 127.0.0.1
|
|
|
|
format-online-prefix = " "
|
|
format-online = <label-time>
|
|
format-online-prefix-foreground = ${xrdb:color9}
|
|
|
|
# format-online = <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random> <bar-progress> <label-time> <label-song>
|
|
|
|
; Available tokens:
|
|
; %artist%
|
|
; %album-artist%
|
|
; %album%
|
|
; %date%
|
|
; %title%
|
|
; Default: %artist% - %title%
|
|
label-song = %title% %album%
|
|
|
|
label-song-maxlen = 40
|
|
label-song-ellipsis = true
|
|
|
|
; Available tokens:
|
|
; %elapsed%
|
|
; %total%
|
|
; Default: %elapsed% / %total%
|
|
;label-time =「『 %elapsed% | %total% 』」
|
|
label-time = %elapsed% %total%
|
|
|
|
icon-prev =
|
|
icon-seekb =
|
|
icon-stop =
|
|
icon-play =
|
|
icon-pause =
|
|
icon-next =
|
|
icon-seekf =
|
|
|
|
icon-random = 🔀
|
|
icon-repeat = 🔁
|
|
icon-repeatone = 🔂
|
|
|
|
toggle-on-foreground = ${colors.primary}
|
|
toggle-off-foreground = #66
|
|
|
|
; Only applies if <bar-progress> is used
|
|
bar-progress-width = 12
|
|
bar-progress-indicator = |
|
|
bar-progress-fill = ─
|
|
bar-progress-empty = ─
|
|
|
|
[module/backlight]
|
|
type = internal/xbacklight
|
|
|
|
format = <ramp> <bar>
|
|
label = BL
|
|
|
|
ramp-0 = 🌕
|
|
ramp-1 = 🌔
|
|
ramp-2 = 🌓
|
|
ramp-3 = 🌒
|
|
ramp-4 = 🌑
|
|
|
|
bar-width = 10
|
|
bar-indicator =
|
|
bar-indicator-foreground = #ff
|
|
bar-indicator-font = 2
|
|
bar-fill =
|
|
bar-fill-font = 2
|
|
bar-fill-foreground = #9f78e1
|
|
bar-empty =
|
|
bar-empty-font = 2
|
|
bar-empty-foreground = ${colors.foreground-alt}
|
|
|
|
[module/cpu]
|
|
type = internal/cpu
|
|
interval = 0.5
|
|
format-prefix = "龍 "
|
|
format-prefix-foreground = ${xrdb:color7}
|
|
label = %percentage%%
|
|
|
|
; Available tags:
|
|
; <label> (default)
|
|
; <bar-load>
|
|
; <ramp-load>
|
|
; <ramp-coreload>
|
|
format = <label>
|
|
|
|
; Spacing between individual per-core ramps
|
|
ramp-coreload-spacing = 1
|
|
ramp-coreload-0 = ▁
|
|
ramp-coreload-1 = ▂
|
|
ramp-coreload-2 = ▃
|
|
ramp-coreload-3 = ▄
|
|
ramp-coreload-4 = ▅
|
|
ramp-coreload-5 = ▆
|
|
ramp-coreload-6 = ▇
|
|
ramp-coreload-7 = █
|
|
|
|
[module/memory]
|
|
type = internal/memory
|
|
interval = 2
|
|
format-prefix = " "
|
|
format-prefix-foreground = ${xrdb:color9}
|
|
label = %percentage_used%%
|
|
|
|
[module/wlan]
|
|
type = internal/network
|
|
interface = wlp3s0
|
|
interval = 3.0
|
|
|
|
format-connected = <ramp-signal> <label-connected>
|
|
format-connected-underline = #9f78e1
|
|
format-disconnected-underline = ${self.format-connected-underline}
|
|
|
|
label-connected = %essid%
|
|
label-disconnected = x
|
|
label-disconnected-foreground = ${colors.foreground-alt}
|
|
|
|
ramp-signal-0 =
|
|
ramp-signal-1 =
|
|
ramp-signal-2 =
|
|
ramp-signal-3 =
|
|
ramp-signal-4 =
|
|
ramp-signal-foreground = ${colors.foreground-alt}
|
|
|
|
[module/eth]
|
|
type = internal/network
|
|
interface = wwp0s29u1u4i6
|
|
interval = 3.0
|
|
|
|
format-connected-underline = #55aa55
|
|
format-connected-prefix = " "
|
|
format-connected-foreground-foreground = ${colors.foreground-alt}
|
|
label-connected = %local_ip%
|
|
|
|
format-disconnected-underline = ${self.format-connected-underline}
|
|
label-disconnected = %ifname% disconnected
|
|
label-disconnected-foreground = ${colors.foreground-alt}
|
|
|
|
[module/date]
|
|
type = internal/date
|
|
interval = 5
|
|
|
|
date =
|
|
date-alt = " %d %m %y"
|
|
|
|
time = %H:%M
|
|
time-alt =
|
|
|
|
# format-prefix =
|
|
;format-prefix =
|
|
format-prefix = " "
|
|
format-prefix-foreground = ${xrdb:color2}
|
|
label = %date%%time%
|
|
|
|
[module/volume]
|
|
type = internal/alsa
|
|
|
|
format-volume = <ramp-volume> <label-volume>
|
|
format-muted = ﱝ
|
|
; format-muted = ﱝ
|
|
# format-muted =
|
|
|
|
format-muted-foreground = ${colors.foreground-alt}
|
|
|
|
ramp-volume-0 = ﱝ
|
|
ramp-volume-1 = 奄
|
|
ramp-volume-2 = 奔
|
|
ramp-volume-3 =
|
|
ramp-volume-4 = 墳
|
|
ramp-volume-5 =
|
|
|
|
ramp-volume-foreground = ${xrdb:color2}
|
|
|
|
bar-volume-width = 10
|
|
bar-volume-foreground-0 = ${xrdb:color5}
|
|
bar-volume-foreground-1 = ${xrdb:color5}
|
|
bar-volume-foreground-2 = ${xrdb:color5}
|
|
bar-volume-foreground-3 = ${xrdb:color5}
|
|
bar-volume-foreground-4 = #f5a70a
|
|
bar-volume-foreground-5 = #f5a70a
|
|
bar-volume-foreground-6 = #ff5555
|
|
bar-volume-gradient = false
|
|
bar-volume-indicator =
|
|
|
|
bar-volume-indicator-font = 1
|
|
bar-volume-indicator-foreground = #ff
|
|
bar-volume-fill =
|
|
bar-volume-fill-font = 1
|
|
bar-volume-empty =
|
|
bar-volume-empty-font = 1
|
|
bar-volume-empty-foreground = ${colors.foreground-alt}
|
|
|
|
[module/battery]
|
|
type = internal/battery
|
|
battery = BAT0
|
|
adapter = AC
|
|
full-at = 98
|
|
|
|
format-charging = <animation-charging> <label-charging>
|
|
format-charging-underline = #ffb52a
|
|
|
|
format-discharging = <ramp-capacity> <label-discharging>
|
|
format-discharging-underline = ${self.format-charging-underline}
|
|
|
|
format-full-prefix = " "
|
|
format-full-prefix-foreground = ${colors.foreground-alt}
|
|
format-full-underline = #55aa55
|
|
|
|
ramp-capacity-0 =
|
|
ramp-capacity-1 =
|
|
ramp-capacity-2 =
|
|
ramp-capacity-3 =
|
|
ramp-capacity-4 =
|
|
ramp-capacity-foreground = ${colors.foreground-alt}
|
|
|
|
animation-charging-0 =
|
|
animation-charging-1 =
|
|
animation-charging-2 =
|
|
animation-charging-3 =
|
|
animation-charging-4 =
|
|
|
|
animation-charging-foreground = ${colors.foreground-alt}
|
|
animation-charging-framerate = 750
|
|
|
|
[module/temp]
|
|
type = internal/temperature
|
|
thermal-zone = 0
|
|
base-temperature = 30
|
|
warn-temperature = 65
|
|
|
|
format = <ramp> <label>
|
|
format-warn = <ramp> <label-warn>
|
|
|
|
ramp-0-foreground = ${xrdb:color6}
|
|
ramp-1-foreground = ${xrdb:color7}
|
|
ramp-2-foreground = ${xrdb:color8}
|
|
ramp-3-foreground = #f50a4d
|
|
ramp-4-foreground = #f50a4d
|
|
|
|
label = %temperature-c%
|
|
label-warn = %temperature-c%
|
|
label-warn-foreground = ${colors.secondary}
|
|
|
|
#hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
|
|
hwmon-path = /sys/devices/pci0000:00/0000:00:03.1/0000:1c:00.0/hwmon/hwmon0/temp1_input
|
|
# amdgpu: edge /sys/devices/pci0000:00/0000:00:03.1/0000:1c:00.0/hwmon/hwmon0/temp1_input
|
|
# k10temp: Tdie /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
|
|
# k10temp: Tctl /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp2_input
|
|
|
|
ramp-0 = ""
|
|
ramp-1 = ""
|
|
ramp-2 = ""
|
|
ramp-3 = ""
|
|
ramp-4 = ""
|
|
|
|
ramp-foreground = ${colors.foreground-alt}
|
|
|
|
[module/powermenu]
|
|
type = custom/menu
|
|
|
|
label-open = power
|
|
label-open-foreground = ${colors.secondary}
|
|
label-close = cancel
|
|
label-close-foreground = ${colors.secondary}
|
|
label-separator = |
|
|
label-separator-foreground = ${colors.foreground-alt}
|
|
|
|
menu-0-0 = reboot
|
|
menu-0-0-exec = menu-open-1
|
|
menu-0-1 = power off
|
|
menu-0-1-exec = menu-open-2
|
|
|
|
menu-1-0 = cancel
|
|
menu-1-0-exec = menu-open-0
|
|
menu-1-1 = reboot
|
|
menu-1-1-exec = sudo reboot
|
|
|
|
menu-2-0 = power off
|
|
menu-2-0-exec = sudo poweroff
|
|
menu-2-1 = cancel
|
|
menu-2-1-exec = menu-open-0
|
|
|
|
[module/vpn-nordvpn-status]
|
|
type = custom/script
|
|
exec = ~/bin/src/polybar-scripts/polybar-scripts/vpn-nordvpn-status/vpn-nordvpn-status.sh
|
|
interval = 5
|
|
|
|
[module/mixer-mpris]
|
|
format-prefix = " "
|
|
format-prefix-foreground = ${xrdb:color2}
|
|
type = custom/script
|
|
exec = mixer mpris
|
|
tail = true
|
|
|
|
;; Custom Modules For MPRIS D-Bus Interface
|
|
;; Use custom/ipc, custom/script
|
|
; https://en.wikipedia.org/wiki/Media_control_symbols
|
|
|
|
; 'primary_mpris' is bar name of mrpis controller defined in file '/PATH/polybar/bars'
|
|
|
|
[module/mpris]
|
|
type = custom/script
|
|
; Default: 5 (0 if `tail = true`)
|
|
interval = 6
|
|
format-foreground = ${colors.nord-purple}
|
|
format-padding = 1
|
|
; unicode uf885 , uf883
|
|
exec = echo %{T4}%{T-}
|
|
exec-if = mpris_player_control -l -b 'primary_mpris'
|
|
;exec-if = [[ -n $(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames 2> /dev/null | sed -r -n '/org.mpris.MediaPlayer2/{s@.*org.mpris.MediaPlayer2.([^"]+).*@\1@g;p}') ]]
|
|
click-left = polybar-msg cmd toggle 'primary_mpris' &> /dev/null
|
|
click-right = polybar-msg cmd restart 'primary_mpris' &> /dev/null
|
|
double-click-left = mpris_player_control
|
|
|
|
[module/mpris-track]
|
|
type = custom/script
|
|
; Default: 5 (0 if `tail = true`)
|
|
interval = 6
|
|
; Available tokens:
|
|
; %output%
|
|
; Default: %output%
|
|
label = %output:0:60:...%
|
|
; unicode uf1bc , ufa7b 嗢 , uf001
|
|
format-prefix = %{T4} %{T-}
|
|
format-prefix-padding-right = 1
|
|
;format = <label>
|
|
format-foreground = ${colors.nord-yellow}
|
|
; bar name must be defined in config file like '[bar/primary_mpris]'
|
|
exec = mpris_player_control -q -b 'primary_mpris'
|
|
; Conditional command that, if defined, needs to exit successfully before the main exec command is invoked. Default: ""
|
|
;exec-if = pgrep -x polybar
|
|
click-left = mpris_player_control
|
|
|
|
[module/mpris-app-name]
|
|
type = custom/script
|
|
interval = 6
|
|
label = %output:0:28%
|
|
; unicode uf885
|
|
format-prefix = %{T4}%{T-}
|
|
format-prefix-padding-right = 1
|
|
;format = <label>
|
|
format-foreground = ${colors.nord-purple}
|
|
exec = mpris_player_control -c | tail -n 1
|
|
# click-right = mpris_player_control -k
|
|
|
|
[module/mpris-reset]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf021
|
|
exec = echo %{T4}%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-red}
|
|
click-left = mpris_player_control -r
|
|
|
|
[module/mpris-next]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf9ac 怜 , uf9ab 嶺
|
|
exec = echo %{T4}嶺%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -a next
|
|
|
|
[module/mpris-previous]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf9ad 玲 , uf9aa 寧
|
|
exec = echo %{T4}寧%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -a previous
|
|
|
|
[module/mpris-forward]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf710 , uf04e , uf9d6 淪
|
|
exec = echo %{T4}淪%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -s 5
|
|
|
|
[module/mpris-backward]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf04a , uf9d4 倫
|
|
exec = echo %{T4}倫%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -s '-5'
|
|
|
|
[module/mpris-stop]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode uf9da 栗
|
|
exec = echo %{T4}栗%{T-}
|
|
; format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -a stop
|
|
|
|
[module/mpris-vol-up]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode fc5b ﱛ
|
|
exec = echo %{T4}ﱛ%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -V '+15'
|
|
|
|
[module/mpris-vol-down]
|
|
type = custom/script
|
|
interval = 86400
|
|
; unicode fc5c ﱜ
|
|
exec = echo %{T4}ﱜ%{T-}
|
|
;format = <label>
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -V '-5'
|
|
|
|
[module/mpris-toggle-mute]
|
|
type = custom/ipc
|
|
; Define the command to be executed when the hook is triggered
|
|
; unicode uf466 , uf485
|
|
; Playing index 1
|
|
hook-0 = echo %{T4} %{T-}
|
|
; Paused index 2
|
|
hook-1 = echo %{T4} %{T-}
|
|
; Hook to execute on launch. The index is 1-based, default: 0
|
|
initial = 1
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -m
|
|
; scroll is used to control sink volume up/down, for touchpad just two fingers up/down
|
|
scroll-up = mpris_player_control -V '+40'
|
|
scroll-down = mpris_player_control -V '-25'
|
|
|
|
[module/mpris-playpause]
|
|
type = custom/ipc
|
|
; Define the command to be executed when the hook is triggered
|
|
; unicode uf909 契, uf90c 奈 , uf01d , uf8e3 , uf8e5 , uf28c
|
|
; Playing index 1
|
|
hook-0 = echo %{T4}%{T-}
|
|
; Paused index 2
|
|
hook-1 = echo %{T4}%{T-}
|
|
; Hook to execute on launch. The index is 1-based, default: 0
|
|
initial = 1
|
|
format-padding = 1
|
|
format-foreground = ${colors.nord-blue}
|
|
click-left = mpris_player_control -a playpause
|
|
; scroll is used to control sink volume up/down, for touchpad just two fingers up/down
|
|
scroll-up = mpris_player_control -V '+10'
|
|
scroll-down = mpris_player_control -V '-5'
|
|
|
|
;; End
|
|
|
|
; vim:ft=dosini
|