dotfiles/.config/polybar/config.ini
Sarthak ddf4b5b8d9 control panel: audio devices, icon font, padding, blur
- audio view: output/input device switching, master volume + mic, and
  per-application streams with their own sliders (pactl sink-inputs)
- icons rendered black because GTK used the desktop font (Noto Sans), which
  has no Nerd Font glyphs; Pango's per-glyph fallback then ignored the css
  colour. Icon classes now name the font explicitly.
- bspwm drew a focus border around the panel that fought the css rounded
  corners: border=off on the rule
- picom now blurs translucent surfaces, so the panel reads as glass rather
  than showing the text behind it
- padding and spacing throughout: frame 20px, section margins, card padding

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cn3dHfbgNYdbZvzb1b3GQt
2026-09-04 08:33:51 +05:30

173 lines
3.9 KiB
INI
Executable file

[colors]
bg = #0f0d17
; true ARGB (AARRGGBB): 75% background, text stays fully opaque
bg-trans = #bf0f0d17
border = #3d3752
text = #e9eefb
dim = #7f7796
accent = #92b9ea
red = #cf6a80
green = #8fae74
yellow = #d8a87c
blue = #7c9ede
magenta = #b483c0
cyan = #8ab6c4
[bar/top]
wm-restack = bspwm
monitor = ${env:MONITOR:}
width = 99%
height = 28
radius = 10
bottom = false
offset-x = 0.5%
offset-y = 0.5%
fixed-center = true
background = ${colors.bg-trans}
foreground = ${colors.text}
border-size = 2
border-color = #993d3752
padding = 1
module-margin = 0
modules-left = bspwm
# modules-center = media-window-toggle
modules-center = xwindow
modules-right = cpu sep ram sep gpu sep volume sep time
font-0 = JetBrainsMono Nerd Font:style=Bold:pixelsize=10;2
font-1 = JetBrainsMono Nerd Font:style=Bold:pixelsize=12;2
; Separators
[module/sep]
type = custom/text
content = "|"
content-foreground = ${colors.dim}
; Workspaces
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = true
enable-click = true
enable-scroll = true
reverse-scroll = false
format = <label-state>
ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
label-focused = "[%icon%]"
label-focused-foreground = ${colors.accent}
label-focused-padding = 1
label-occupied = "%icon%"
label-occupied-foregrounk = ${colors.text}
label-occupied-padding = 1
label-empty = "%icon%"
label-empty-foreground = ${colors.dim}
label-empty-padding = 1
label-urgent = "!%icon%!"
label-urgent-foreground = ${colors.red}
label-urgent-padding = 1
; Titles
[module/xwindow]
type = internal/xwindow
label = %title%
label-maxlen = 50
label-foreground = ${colors.text}
label-empty = Desktop
label-empty-foreground = ${colors.dim}
; Time
[module/time]
type = internal/date
interval = 1
format = <label>
format-padding = 1
label = "%{F#92b9ea}%{F-}%time% %{F#7f7796}|%{F-} %date%"
date = %a %d
time = %H:%M
; Resources
[module/cpu]
type = custom/script
exec = "$HOME/.config/scripts/system-info.sh --cpu --normal-color '#92b9ea' --critical-color '#cf6a80'"
click-left = "$HOME/bin/system-info.sh --cpu --click"
format = "%{F#92b9ea}CPU%{F-} <label>"
format-padding = 1
interval = 2
[module/ram]
type = custom/script
exec = "$HOME/.config/scripts/system-info.sh --ram --normal-color '#d8a87c' --critical-color '#cf6a80'"
format = "%{F#d8a87c}RAM%{F-} <label>"
format-padding = 1
interval = 2
[module/gpu]
type = custom/script
exec = "$HOME/.config/scripts/system-info.sh --gpu --normal-color '#b483c0' --critical-color '#cf6a80'"
click-left = "$HOME/bin/system-info.sh --gpu --click"
format = "%{F#b483c0}GPU%{F-} <label>"
format-padding = 1
interval = 2
; Audio
[module/volume]
type = custom/script
exec = "SESSION_TYPE=x11 sh $HOME/.config/scripts/volume.sh --device output --status --disabled-color '#cf6a80' --enabled-color '#8fae74'"
tail = true
click-left = "sh $HOME/bin/volume.sh --device output --action toggle"
scroll-up = "sh $HOME/bin/volume.sh --device output --action increase"
scroll-down = "sh $HOME/bin/volume.sh --device output --action decrease"
format = "%{F#8fae74}VOL%{F-} <label>"
format-padding = 1
; Media player
[module/media]
type = custom/script
exec = playerctl metadata --format "{{ artist }} - {{ title }}" 2>/dev/null | head -c 30
exec-if = playerctl status 2>/dev/null
click-left = playerctl play-pause
click-right = playerctl next
click-middle = playerctl previous
scroll-up = playerctl volume 0.05+
scroll-down = playerctl volume 0.05-
format = "%{F#e0919f}♫%{F-} <label>"
format-padding = 1
interval = 2
label-maxlen = 30
[module/media-window-toggle]
type = custom/script
exec = $HOME/.config/scripts/media.sh
click-left = touch /tmp/polybar-toggle-state
interval = 1
label = %output%
label-maxlen = 80
[module/control]
type = custom/text
content = "󰒓"
content-foreground = ${colors.accent}
content-padding = 1
click-left = python3 $HOME/.config/scripts/control-panel.py