diff options
| author | Andrew Guschin <guschin@altlinux.org> | 2023-07-28 01:29:51 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin@altlinux.org> | 2023-07-28 01:29:51 +0400 |
| commit | 5ec338174c5ef3225d6b7009b8ac55772f76008e (patch) | |
| tree | cecece430097d887a4d32ff303b9269ddc75a07f /.local/bin/dwmbar | |
| parent | 71713fc3c3b15891606e553befd2e9a0a7221861 (diff) | |
Changed dwm bar scripts
Diffstat (limited to '.local/bin/dwmbar')
| -rwxr-xr-x | .local/bin/dwmbar/dwm-battery | 2 | ||||
| -rwxr-xr-x | .local/bin/dwmbar/dwm-clock | 2 | ||||
| -rwxr-xr-x | .local/bin/dwmbar/dwm-kblayout | 2 | ||||
| -rwxr-xr-x | .local/bin/dwmbar/dwm-volume | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/.local/bin/dwmbar/dwm-battery b/.local/bin/dwmbar/dwm-battery index 11ad5c3..249cc33 100755 --- a/.local/bin/dwmbar/dwm-battery +++ b/.local/bin/dwmbar/dwm-battery @@ -4,5 +4,5 @@ for battery in /sys/class/power_supply/BAT? do capacity=$(cat "$battery"/capacity) || break - printf "%s%%" "$capacity" + printf "[BAT %s%%]" "$capacity" done | sed 's/ *$//' diff --git a/.local/bin/dwmbar/dwm-clock b/.local/bin/dwmbar/dwm-clock index b793e7e..fac6e29 100755 --- a/.local/bin/dwmbar/dwm-clock +++ b/.local/bin/dwmbar/dwm-clock @@ -1,2 +1,2 @@ #!/bin/sh -printf "$(date "+%d %b (%a) %k:%M")" +printf "[$(date "+%d %b (%a) %k:%M")]" diff --git a/.local/bin/dwmbar/dwm-kblayout b/.local/bin/dwmbar/dwm-kblayout new file mode 100755 index 0000000..f305d6c --- /dev/null +++ b/.local/bin/dwmbar/dwm-kblayout @@ -0,0 +1,2 @@ +#!/bin/sh +printf "[$(xkb-switch)]" diff --git a/.local/bin/dwmbar/dwm-volume b/.local/bin/dwmbar/dwm-volume index 50b04e8..d0da2c0 100755 --- a/.local/bin/dwmbar/dwm-volume +++ b/.local/bin/dwmbar/dwm-volume @@ -88,4 +88,4 @@ def get_sink_volume(sink): def_sink = get_default_sink() vol = get_sink_volume(def_sink) -print(vol) +print(f"[VOL {vol}]") |