Improved Polybar

This commit is contained in:
Roger Gonzalez 2025-01-07 18:13:39 -03:00
parent e5fd0a5733
commit 7c44905a47
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6
3 changed files with 72 additions and 57 deletions

View File

@ -5,27 +5,34 @@
; |___/
[colors]
accent = #fba922
accent = #75d85a
background = #AA000000
foreground = #ffffff
urgent = #990000
urgent-underline = #990000
dimmed = #888888
highlight = #e5c07b
success = #55ffffff
muted = #666666
[bar/top]
monitor = ${env:MONITOR:}
enable-ipc = true
width = 100%
height = 17
height = 26 ; Increased for better font visibility
;background = #222
background = #33000000
foreground = #fff
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 1
overline-color = ${self.background}
underline-size = 1
underline-color = ${self.background}
overline-size = 2
overline-color = ${colors.accent}
underline-size = 2
underline-color = ${colors.accent}
padding-left = 1
padding-right = 1
module-margin-left = 1
module-margin-right = 1
padding-left = 2
padding-right = 2
module-margin-left = 2
module-margin-right = 2
font-0 = NotoSans-Regular:size=10;0
font-1 = MaterialIcons:size=10;2
@ -33,86 +40,95 @@ font-2 = Termsynu:size=10;0
font-3 = Siji:pixelsize=10;1
font-4 = FontAwesome:size=10;0
font-5 = Noto Color Emoji:scale=12;0
modules-left = i3 music
modules-center = xwindow
modules-right = pulseaudio xkeyboard cpu memory wireless-network protonvpn-status dnd battery clock
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
pin-workspaces = true
label-dimmed-underline = ${root.background}
label-dimmed-underline = ${colors.background}
label-focused = %name%
label-focused-foreground = #f3f3f3
label-focused-background = ${root.background}
label-focused-underline = #75d85a
label-focused-font = 4
label-focused-padding = 3
label-focused =  %name%
label-focused-foreground = ${colors.accent}
label-focused-underline = ${colors.accent}
label-focused-font = 1
label-focused-padding = 4
label-unfocused = %name%
label-unfocused-font = 4
label-unfocused = %name%
label-unfocused-font = 0
label-unfocused-padding = 3
label-urgent = %name%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-underline = #9b0a20
label-urgent-font = 4
label-urgent-padding = 4
label-urgent = %name%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.urgent}
label-urgent-underline = ${colors.urgent-underline}
label-urgent-font = 1
label-urgent-padding = 3
label-visible = %name%
label-visible-foreground = #55ffffff
label-visible-font = 4
label-visible = %name%
label-visible-foreground = ${colors.success}
label-visible-font = 0
label-visible-padding = 4
[module/cpu]
type = internal/cpu
interval = 2
interval = 0.5
warn-percentage = 95
format-prefix = "🎛 "
format-underline = #f90000
format-underline = ${colors.highlight}
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
interval = 3
warn-percentage = 90
format-prefix = " 📊 "
format-underline = #4bffdc
format-underline = ${colors.accent}
label = %percentage_used%%
[module/wireless-network]
type = internal/network
interface = wlp0s20f3
interval = 2.0
ping-interval = 10
label-connected = 📶 %essid%
format-connected = 📶 <label-connected>
format-disconnected = <label-disconnected>
format-packetloss = <animation-packetloss> <label-connected>
label-connected = %essid% %netspeed:9%
label-connected-foreground = #eefafa
label-disconnected = 🚫 not connected
label-disconnected-foreground = #66
label-disconnected-foreground = ${colors.dimmed}
animation-packetloss-0 = ⚠
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 📶
animation-packetloss-1-foreground = #000000
animation-packetloss-framerate = 500
[module/clock]
type = internal/date
interval = 5
format-padding = 5
date = 📅 %d-%m-%Y 🕜 %H:%M%
format = <label> %{O4}
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
adapter = AC
format-charging = %{T4} 🔌 <label-charging> %{T-}
format-discharging = %{T4}🔋 <label-discharging> %{T-}
format-full = %{T4}🔌 <label-full> %{T-}
label-charging-font = 3
label-discharging-font = 3
format-charging = %{T3} 🔌 <label-charging> %{T-}
format-discharging = %{T3}🔋 <label-discharging> %{T-}
format-full = %{T3}🔌 <label-full> %{T-}
label-charging-font = 2
label-discharging-font = 2
label-full = 100%
[module/xwindow]
type = internal/xwindow
label-maxlen = 75
label-foreground = #FFF
label-maxlen = 50
label-foreground = ${colors.foreground}
[module/xkeyboard]
type = custom/script
@ -123,12 +139,13 @@ interval = 1
type = internal/pulseaudio
label-volume = 🔊 %percentage%%
label-muted = 🔈
label-muted-foreground = #666
label-muted-foreground = ${colors.muted}
interval = 1
[module/spotify]
type = custom/script
interval = 1
exec = python /home/roger/.config/polybar/spotify_status.py -t 80 --playpause-font=5 -p '⏯,⏸️' -f ' {play_pause} {song} - {artist} - {album}'
exec = python /home/roger/.config/polybar/spotify_status.py -t 80 --playpause-font=1 -p '⏯,⏸️' -f ' {play_pause} {song} - {artist} - {album}'
[module/music]
type = custom/script
@ -139,7 +156,7 @@ exec = ~/.config/polybar/music
[module/protonvpn-status]
type = custom/script
exec = /home/roger/.config/polybar/protonvpn_status.sh
interval = 5
interval = 15
[module/dnd]
type = custom/script
@ -168,5 +185,3 @@ warn-temperature = 80
type = custom/script
exec = python ~/.config/polybar/pcrypto.py --base USD --coins btc
interval = 60
font-0 = "coins:style=Regular;0"

View File

@ -5,7 +5,7 @@ IFS=$'\n\t'
STATE=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)
if [ "$STATE" = "true" ]; then
echo "DND "
echo "DND "
else
echo "DND "
echo "DND "
fi

View File

@ -5,7 +5,7 @@ IFS=$'\n\t'
PROTONVPN_STATUS=$(curl -s https://am.i.mullvad.net/country)
if echo $PROTONVPN_STATUS | grep -q 'Uruguay'; then
echo "%{u#f90000}VPN %{T5}🚫%{T-}"
else
echo "%{u#75d85a}VPN %{T5}✅%{T-}"
echo "🚫 VPN"
else
echo "✅ VPN"
fi