diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2023-09-16 12:01:01 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2023-09-16 12:02:00 +0000 |
commit | 63fee6b75ff7c508ef959cb6515f733c29f3d837 (patch) | |
tree | 73bfac3ae70485fa27dfd638b75df97e93ac6e0a /dwm/.dwm/bar | |
parent | 2e5aa362b54d0a4865b58a9fbf8834a870b4ba0e (diff) | |
download | dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.gz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.bz2 dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.lz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.xz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.zst dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.zip |
Update MANPAGER to use nvim and update dwm
Diffstat (limited to 'dwm/.dwm/bar')
-rwxr-xr-x | dwm/.dwm/bar/bar.sh | 15 | ||||
-rwxr-xr-x | dwm/.dwm/bar/themes/dracula | 1 |
2 files changed, 12 insertions, 4 deletions
diff --git a/dwm/.dwm/bar/bar.sh b/dwm/.dwm/bar/bar.sh index 796453c..65eb35e 100755 --- a/dwm/.dwm/bar/bar.sh +++ b/dwm/.dwm/bar/bar.sh @@ -44,8 +44,8 @@ battery() { } brightness() { - brightness="$(cat /sys/class/backlight/intel_backlight/brightness)" - brightness_max="$(cat /sys/class/backlight/intel_backlight/max_brightness)" + brightness="$(cat /sys/class/backlight/*/brightness)" + brightness_max="$(cat /sys/class/backlight/*/max_brightness)" level=$(echo "scale=2; $brightness / $brightness_max * 100" | bc) printf "^c$red^ " @@ -70,8 +70,15 @@ clock() { } volume() { - volume_status="$(pamixer --get-volume-human)" - printf "^c$blue^ 🔊 $volume_status" + pactl_output="$(pactl list sinks )" + is_mute="$(echo "$pactl_output" | grep Mute | grep -oE "yes|no")" + if [ $is_mute = "yes" ] + then + printf "^c$red^ 🔇 mute" + else + volume_status="$(echo "$pactl_output" | grep olume | grep -oE "\w+%" | head -n 1)" + printf "^c$yellow^ 🔊 %s" $volume_status + fi } keyboard() { diff --git a/dwm/.dwm/bar/themes/dracula b/dwm/.dwm/bar/themes/dracula index ea2b4f4..6f7a699 100755 --- a/dwm/.dwm/bar/themes/dracula +++ b/dwm/.dwm/bar/themes/dracula @@ -9,3 +9,4 @@ grey=#282a36 blue=#d6acff red=#ff5555 darkblue=#bd93f9 +yellow=#f1fa8c |