dotfiles/.config/polybar/config.ini
2025-04-12 00:54:31 +02:00

235 lines
6.4 KiB
INI

;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
[bar/example]
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 4pt
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin = 1
separator = |
separator-foreground = ${colors.disabled}
font-0 = monospace;2
font-1 = Font Awesome 5 Free: style=Solid: pixelsize=11
font-2 = Font Awesome 5 Brands: pixelsize=11
font-3 = Material Icons: style=Regular: pixelsize=11; 2
font-4 = "Symbols Nerd Font Mono:size=11"
modules-left = xworkspaces
modules-center = date
modules-right = pulseaudio-control-input pulseaudio-control-output bluetooth battery powermenu systray
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[module/systray]
type = internal/tray
format-margin = 8pt
tray-spacing = 16pt
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %Y-%m-%d %H:%M:%S
date-alt = %H:%M
label = %date%
label-foreground = ${colors.primary}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 100
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 =  <label-full>
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-framerate = 750
[module/pulseaudio-control-output]
type = custom/script
tail = true
label-padding = 1
label-foreground = ${colors.foreground}
format-volume-prefix = "VOL "
# 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
# --node-blacklist is only needed for next-node).
exec = pulseaudio-control --format '$VOL_ICON ${VOL_LEVEL}% $ICON_NODE' --icons-volume " , " --icon-muted " " --node-nicknames-from "device.description" listen
click-right = exec pavucontrol &
click-left = pulseaudio-control togmute
click-middle = pulseaudio-control --node-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-node
scroll-up = pulseaudio-control --volume-max 130 up
scroll-down = pulseaudio-control --volume-max 130 down
[module/pulseaudio-control-input]
type = custom/script
tail = true
label-padding = 1
label-foreground = ${colors.foreground}
# Use --node-blacklist to remove the unwanted PulseAudio .monitor that are child of sinks
exec = pulseaudio-control --format '$VOL_ICON ${VOL_LEVEL}% $ICON_NODE' --node-type input --icons-volume "" --icon-muted "" --node-blacklist "*.monitor" listen
click-right = exec pavucontrol &
click-left = pulseaudio-control --node-type input togmute
click-middle = pulseaudio-control --node-type input next-node
scroll-up = pulseaudio-control --node-type input --volume-max 130 up
scroll-down = pulseaudio-control --node-type input --volume-max 130 down
[module/bluetooth]
type = custom/script
exec = "bluetoothctl devices Connected | awk -vORS=', ' '{for(i=3;i<=NF;i++){ printf("%s",( (i>3) ? OFS : "" ) $i) };print"";}' | sed -e 's/, $/\\n/'"
exec-if = "[ $(bluetoothctl show | grep 'Powered: yes' | wc -l) -gt 0 ]"
interval = 5
click-right = blueman-manager &
format-prefix = " "
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = ""
label-close =  cancel
label-separator = |
label-separator-foreground = ${colors.foreground}
;Powermenu
menu-0-0 = "Reboot "
menu-0-0-exec = menu-open-1
menu-0-1 = "Power Off"
menu-0-1-exec = menu-open-2
menu-0-2 = "Hibernate"
menu-0-2-exec = menu-open-3
;Reboot
menu-1-0 = "Cancel "
menu-1-0-exec = menu-open-0
menu-1-1 = "Reboot"
menu-1-1-exec = systemctl reboot
;Shutdown
menu-2-0 = "Power off"
menu-2-0-exec = systemctl poweroff
menu-2-1 = "Cancel "
menu-2-1-exec = menu-open-0
;Hibernate
menu-3-0 = "Hibernate "
menu-3-0-exec = systemctl hibernate
menu-3-1 = "Cancel"
menu-3-1-exec = menu-open-0
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini