Update polybar config for use with Linux
This commit is contained in:
parent
8cb021608c
commit
51303d5dac
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
icon2() {
|
||||
printf "%s\\n" "%{F${color11:-#F0F0F0}}${1}%{F}"
|
||||
}
|
||||
|
||||
status=$(acpiconf -i 0 | grep State | cut -c 10-)
|
||||
capacity=$(acpiconf -i 0 | grep % | cut -f2 | cut -c -4 | sed s/%//)
|
||||
|
||||
if [ "$status" == "charging" ]; then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif [ "$status" == "high" ]; then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif (("$capacity" <= "20")); then
|
||||
printf "%s\\n" "$(icon2 "") ${capacity}%"
|
||||
elif (("$capacity" <= "60")); then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif (("$capacity" <= "100")); then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
fi
|
|
@ -24,7 +24,7 @@ font-1 = Siji:size=10;0
|
|||
|
||||
modules-left = workspaces
|
||||
modules-center = date
|
||||
modules-right = mpd wifi vol bat
|
||||
modules-right = mpd network alsa battery
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
|
@ -40,7 +40,7 @@ format-foreground = ${colors.foreground-alt}
|
|||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
host = /home/coolneng/.mpd/socket
|
||||
host = /home/coolneng/.config/mpd/socket
|
||||
|
||||
format-online = <icon-play> <icon-pause> <label-song>
|
||||
format-offline = <label-offline>
|
||||
|
@ -55,30 +55,10 @@ interval = 2
|
|||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
|
||||
; See "man date" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %a %d %b
|
||||
|
||||
; Optional time format
|
||||
time = %H:%M
|
||||
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
;date-alt = %A, %d %B %Y
|
||||
;time-alt = %H:%M:%S
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
|
||||
; Available tokens:
|
||||
; %date%
|
||||
; %time%
|
||||
; Default: %date%
|
||||
label = %date% %time%
|
||||
format-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
@ -104,17 +84,37 @@ label-empty = %name%
|
|||
label-empty-padding = 1
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/vol]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/volume.sh
|
||||
interval = 2
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
label-connected = %essid%
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-foreground = ${colors.icon}
|
||||
|
||||
[module/bat]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/battery.sh
|
||||
interval = 2
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.icon}
|
||||
ramp-volume = ${colors.icon}
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-foreground = ${colors.icon}
|
||||
|
||||
[module/wifi]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/wifi.sh
|
||||
interval = 2
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP0
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
animation-charging-0 =
|
||||
animation-charging-foreground = ${colors.icon}
|
||||
ramp-capacity-foreground = ${colors.icon}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
volume="$(mixer vol | cut -c 36- | cut -c -3)"
|
||||
|
||||
case "$volume" in
|
||||
0|[0-9]) vol_icon=" " ;;
|
||||
1?|2?|3?) vol_icon="" ;;
|
||||
4?|5?|6?) vol_icon="" ;;
|
||||
*) vol_icon="" ;;
|
||||
esac
|
||||
|
||||
printf "%s\\n" "$(icon "$vol_icon") ${volume}%"
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
wifi="$(echo -e "$(wpa_cli status | grep ssid | awk 'NR==2{print $1}' | cut -c 6-)")"
|
||||
wifi_icon=""
|
||||
|
||||
printf "%s\\n" "$(icon "$wifi_icon") ${wifi}"
|
Loading…
Reference in New Issue