1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Cleaned up polybar

This commit is contained in:
Ryan Kes 2020-02-29 21:58:32 +01:00
parent 34f5072300
commit 8fec187a20
2 changed files with 102 additions and 106 deletions

View File

@ -9,7 +9,6 @@
[colors] [colors]
background = ${xrdb:color0:#222} background = ${xrdb:color0:#222}
background-alt = ${xrdb:color0:#222}
foreground = ${xrdb:color7:#222} foreground = ${xrdb:color7:#222}
foreground-alt = ${xrdb:color7:#222} foreground-alt = ${xrdb:color7:#222}
primary = ${xrdb:color1:#222} primary = ${xrdb:color1:#222}
@ -17,24 +16,9 @@ secondary = ${xrdb:color2:#222}
alert = ${xrdb:color3:#222} alert = ${xrdb:color3:#222}
[bar/base] [bar/base]
width = 100%
height = 27
radius = 6.0
fixed-center = false
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1 module-margin-left = 1
module-margin-right = 2 module-margin-right = 2
@ -63,11 +47,10 @@ inherit = bar/base-laptop
monitor = ${env:MONITOR:eDP1} monitor = ${env:MONITOR:eDP1}
modules-left = bspwm modules-left = bspwm
modules-center = wlan bluetooth modules-center = battery0 battery1 wlan bluetooth
modules-right = github updates-arch-combined battery xbacklight filesystem volume memory cpu temperature date modules-right = github updates-arch-combined xbacklight volume memory cpu temperature filesystem date
tray-position = right tray-position = right
tray-padding = 0
[bar/monitor1] [bar/monitor1]
inherit = bar/base-desktop inherit = bar/base-desktop
@ -75,10 +58,9 @@ monitor = ${env:MONITOR:DP-1}
modules-left = bspwm modules-left = bspwm
modules-center = mpd player-mpris-tail modules-center = mpd player-mpris-tail
modules-right = github updates-arch-combined bluetooth eth filesystem volume memory cpu temperature date modules-right = eth bluetooth github updates-arch-combined volume memory cpu temperature filesystem date
tray-position = right tray-position = right
tray-padding = 0
[bar/monitor2] [bar/monitor2]
inherit = bar/base-desktop inherit = bar/base-desktop
@ -107,22 +89,20 @@ label-indicator-underline = ${colors.secondary}
[module/filesystem] [module/filesystem]
type = internal/fs type = internal/fs
interval = 25
mount-0 = / mount-0 = /
mount-1 = /home mount-1 = /home
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% label-mounted = %mountpoint%: %percentage_used%%
label-unmounted = %mountpoint% not mounted label-unmounted-background = ${colors.alert}
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm] [module/bspwm]
type = internal/bspwm type = internal/bspwm
label-focused-background = ${colors.background-alt} label-focused-background = ${colors.primary}
label-focused-underline= ${colors.primary}
label-focused-padding = 2 label-focused-padding = 2
label-occupied-background = ${colors.background}
label-occupied-padding = 2 label-occupied-padding = 2
label-empty = label-empty =
@ -136,17 +116,33 @@ pin-workspaces = true
[module/mpd] [module/mpd]
type = internal/mpd type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev =  format-online = <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random> <bar-progress> <label-time> <label-song>
icon-stop = 
icon-play =  label-song = 𝄞 %artist% - %title%
icon-pause = 
icon-next =  icon-play = ⏵
icon-pause = ⏸
icon-stop = ⏹
icon-prev = ⏮
icon-next = ⏭
icon-seekb = ⏪
icon-seekf = ⏩
icon-random = 
icon-repeat = 🔁
icon-repeatone = 🔂
icon-single = 🔂
icon-consume = ✀
label-song-maxlen = 25 label-song-maxlen = 25
label-song-ellipsis = true label-song-ellipsis = true
; Only applies if <bar-progress> is used
bar-progress-width = 45
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
[module/xbacklight] [module/xbacklight]
type = internal/xbacklight type = internal/xbacklight
@ -171,11 +167,8 @@ card = intel_backlight
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 2
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt} label = %percentage%%
format-underline = #f90000
label = %percentage:2%%
format = <label> <ramp-coreload> format = <label> <ramp-coreload>
ramp-coreload-0 = ▁ ramp-coreload-0 = ▁
@ -189,10 +182,7 @@ ramp-coreload-7 = █
[module/memory] [module/memory]
type = internal/memory type = internal/memory
interval = 2
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%% label = %percentage_used%%
ramp-used-0 = ▁ ramp-used-0 = ▁
@ -209,22 +199,14 @@ type = internal/network
interface = wlp4s0 interface = wlp4s0
interval = 3.0 interval = 3.0
format-connected = <ramp-signal> <label-connected> format-connected = <label-connected>
format-packetloss = <animation-packetloss> <label-connected> format-packetloss = <animation-packetloss> <label-connected>
format-disconnected = format-disconnected =
format-connected-underline = #55aa55 format-connected-prefix = "直 "
format-connected-prefix = " " format-disconnected-prefix = "睊 "
label-connected = "%essid% %signal% %downspeed:8% %upspeed:8%" label-connected = "%signal%% %essid% %downspeed:6% %upspeed:0%"
label-disconnected =
ramp-signal-0 = ▁
ramp-signal-1 = ▂
ramp-signal-2 = ▃
ramp-signal-3 = ▄
ramp-signal-4 = ▅
ramp-signal-5 = ▆
ramp-signal-6 = ▇
ramp-signal-7 = █
animation-packetloss-0 = ⚠ animation-packetloss-0 = ⚠
animation-packetloss-1 = 📶 animation-packetloss-1 = 📶
@ -252,22 +234,15 @@ label-connected = "%ifname%"
[module/eth] [module/eth]
type = internal/network type = internal/network
interface = eno1 interface = eno1
interval = 3.0
format-connected-underline = #55aa55 format-connected-prefix = " "
format-connected-prefix = " " format-disconnected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = "%local_ip%  %downspeed%  %upspeed%" label-connected = "%local_ip%  %downspeed%  %upspeed%"
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date] [module/date]
type = internal/date type = internal/date
interval = 5
date = date =
date-alt = " %d-%m-%Y" date-alt = " %d-%m-%Y"
@ -276,10 +251,9 @@ time = %H:%M
time-alt = %H:%M:%S time-alt = %H:%M:%S
format-prefix =  format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time% label = %date% %time%
label-padding-right=1
[module/volume] [module/volume]
type = internal/alsa type = internal/alsa
@ -309,51 +283,63 @@ bar-volume-empty = ─
bar-volume-empty-font = 2 bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt} bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery] [module/battery0]
type = internal/battery type = internal/battery
battery = BAT0 battery = BAT0
adapter = ADP1 adapter = AC
full-at = 98 full-at = 70
format-charging = <animation-charging> <label-charging> format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a format-discharging = <animation-discharging> <label-discharging>
format-discharging = <ramp-capacity> <label-discharging> format-full-prefix = " "
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt} format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =  animation-charging-0 = 
ramp-capacity-1 =  animation-charging-1 = 
ramp-capacity-2 =  animation-charging-2 = 
ramp-capacity-foreground = ${colors.foreground-alt} animation-charging-3 = 
animation-charging-4 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750 animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
animation-discharging-framerate = 500
[module/battery1]
type = internal/battery
battery = BAT1
adapter = AC
full-at = 70
format-charging = <animation-charging> <label-charging>
format-discharging = <animation-discharging> <label-discharging>
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
animation-discharging-framerate = 500
[module/temperature] [module/temperature]
type = internal/temperature type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label> format-prefix = " "
format-underline = #f50a4d label-warn-foreground = ${colors.alert}
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu] [module/powermenu]
type = custom/menu type = custom/menu
@ -386,27 +372,33 @@ menu-2-1-exec = menu-open-0
[module/github] [module/github]
type = internal/github type = internal/github
token = ${file:~/.github-access-token} token = ${file:~/.github-access-token}
format = <label> format-prefix = " "
label = " %notifications%" format-prefix-foreground=${colors.alert}
label-foreground = ${colors.alert}
[module/updates-arch-combined] [module/updates-arch-combined]
type = custom/script type = custom/script
exec = /bin/sh ~/.config/polybar/bin/updates-arch-combined/updates-arch-combined.sh exec = /bin/sh ~/.config/polybar/bin/updates-arch-combined/updates-arch-combined.sh
interval = 600 interval = 600
click-left = alacritty -e yay click-left = alacritty -e update-arch
label-foreground = ${colors.alert}
[module/player-mpris-tail] [module/player-mpris-tail]
type = custom/script type = custom/script
exec = python ~/.config/polybar/bin/player-mpris-tail/player-mpris-tail.py
exec = python ~/.config/polybar/bin/player-mpris-tail/player-mpris-tail.py -f '{:title: on {icon} {artist} - {title}:}' --icon-playing '契' --icon-paused '' --icon-stop '栗'
tail = true tail = true
click-left = /bin/sh ~/.config/polybar/bin/player-mpris-tail/player-ctrl.sh previous click-left = python ~/.config/polybar/bin/player-mpris-tail/player-mpris-tail.py previous &
click-right = /bin/sh ~/.config/polybar/bin/player-mpris-tail/player-ctrl.sh next click-right = python ~/.config/polybar/bin/player-mpris-tail/player-mpris-tail.py next &
click-middle = /bin/sh ~/.config/polybar/bin/player-mpris-tail/player-ctrl.sh play-pause click-middle = python ~/.config/polybar/bin/player-mpris-tail/player-mpris-tail.py play-pause &
[module/bluetooth] [module/bluetooth]
type = custom/script type = custom/script
exec = /bin/sh ~/.config/polybar/bin/isactive-bluetooth/isactive-bluetooth.sh exec = /bin/sh ~/.config/polybar/bin/isactive-bluetooth/isactive-bluetooth.sh
label-foreground = ${colors.alert}
[settings] [settings]
screenchange-reload = true screenchange-reload = true

4
polybar/.local/bin/update-arch Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
yay
sudo pacman -Rs (pacman -Qtdq)