Files
dotfiles/polybar/config.ini
2024-02-02 15:22:58 +01:00

236 lines
5.8 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 = #24283b
background-alt = #292e42
foreground = #c0caf5
primary = #bb9af7
secondary = #ff007c
alert = #db4b4b
disabled = #565f89
[bar/example]
monitor=${env:MONITOR:}
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 = 2
padding-right = 2
module-margin = 1
separator =
separator-foreground = ${colors.disabled}
font-0 = JetbrainsMonoNerdFont;2
fixed-center = true
modules-left = power-button xworkspaces xwindow
modules-center = date time
modules-right = pulseaudio-devices wlan eth bluetooth memory cpu battery weather
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
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/date-time]
type = internal/date
interval = 43200
label-foreground = ${colors.primary}
label = %date%
[module/date]
inherit = module/date-time
interval = 30
date = %a %d
[module/time]
inherit = module/date-time
interval = 1
date = %H:%M
[module/memory]
type = internal/memory
interval = 2
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[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
; format-connected-prefix = "WIFI "
format-connected-prefix-foreground = ${colors.primary}
format-connected = "%{A1:alacritty -e 'nmtui':}<prefix> <ramp-signal>%{A}"
format-disconnected-prefix-foreground = ${colors.primary}
format-disconnected = "%{A1:alacritty -e 'nmtui':}󰤮%{A}"
ramp-signal-0 = 󰤮
ramp-signal-1 = 󰤟
ramp-signal-2 = 󰤢
ramp-signal-3 = 󰤥
ramp-signal-4 = 󰤨
ramp-signal-5 = 󰤨
[module/eth]
inherit = network-base
interface-type = wired
label-connected = 󰌘
[module/battery]
type = internal/battery
full-at = 99
low-at = 5
format-charging-prefix = "󰚥 "
format-charging-prefix-foreground = ${colors.primary}
format-discharging = "<ramp-capacity> <label-discharging>"
format-charging = "<ramp-capacity> <label-charging>"
format-full-prefix = "󰁹 "
format-full-prefix-foreground = ${colors.primary}
format-full = 100%
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
poll-interval = 5
ramp-capacity-0 = 󰁺
ramp-capacity-1 = 󰁼
ramp-capacity-2 = 󰁾
ramp-capacity-3 = 󰂀
ramp-capacity-4 = 󰂂
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
[module/bluetooth]
type = custom/script
exec = sh ~/.config/polybar/bluetooth.sh
interval = 2
click-left = exec blueman-manager
click-right = exec ~/.config/polybar/toggle_bluetooth.sh
format-padding = 1
format-foreground = #ffffff
[module/pulseaudio-devices]
type = custom/script
label = "%output%"
label-font = 2
interval = 1.0
exec = sh ~/.config/polybar/sound.sh
click-right = exec pavucontrol &
click-left = sh ~/.config/polybar/sound.sh mute &
; scroll-up = sh ~/.config/polybar/sound.sh up &
; scroll-down = sh ~/.config/polybar/sound.sh down &
[module/weather]
type = custom/script
exec = curl -s https://wttr.in/v%C3%A4nn%C3%A4s?0QTn|grep -oP '(\+|\-)\d{1,2}(?=\()'
interval = 1800
label-foreground= ${colors.primary}
label = %output%°C
[module/power-button]
type = custom/text
format-foreground = ${colors.primary}
label = " 󰐥 "
click-left = sh ~/.config/rofi/powermenu/powermenu.sh
[settings]
screenchange-reload = true
pseudo-transparency = true