diff options
author | AnInternetTroll <lucafulger@gmail.com> | 2022-01-23 17:45:47 +0000 |
---|---|---|
committer | AnInternetTroll <lucafulger@gmail.com> | 2022-01-23 17:45:47 +0000 |
commit | b8821cb26c5d87386fb052ea279afbe467d232d3 (patch) | |
tree | 5b0e772403da7cbe2b0f91485630140636dddcaf /dwm/.dwm/bar | |
parent | 92c1d51a5006edaf72b148d7440853e220fcb592 (diff) | |
download | dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar.gz dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar.bz2 dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar.lz dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar.xz dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.tar.zst dotfiles-b8821cb26c5d87386fb052ea279afbe467d232d3.zip |
Small updates
Diffstat (limited to 'dwm/.dwm/bar')
-rwxr-xr-x | dwm/.dwm/bar/bar.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dwm/.dwm/bar/bar.sh b/dwm/.dwm/bar/bar.sh index 89cfdf4..6dafda4 100755 --- a/dwm/.dwm/bar/bar.sh +++ b/dwm/.dwm/bar/bar.sh @@ -6,10 +6,10 @@ interval=0 # run bar script and dwm ( do not remove this ) -SYMLINKDIR=(readlink -f "$0") +SYMLINKDIR=$(readlink -f "$0") BASEDIR=$(dirname "$SYMLINKDIR") # load colors! -. $BASEDIR/.dwm/bar/themes/onedark +. $BASEDIR/themes/onedark cpu() { cpu_val=$(grep -o "^[^ ]*" /proc/loadavg) @@ -20,7 +20,7 @@ cpu() { pkg_updates() { #updates=$(doas xbps-install -un | wc -l) # void - updates=$(checkupdates | wc -l) # arch , needs pacman contrib + #updates=$(checkupdates | wc -l) # arch , needs pacman contrib # updates=$(aptitude search '~U' | wc -l) # apt (ubuntu,debian etc) if [ -z "$updates" ]; then @@ -44,8 +44,8 @@ battery() { } brightness() { - brightness="$(cat /sys/class/backlight/*/brightness)" - brightness_max="$(cat /sys/class/backlight/*/max_brightness)" + brightness="$(cat /sys/class/backlight/intel_backlight/brightness)" + brightness_max="$(cat /sys/class/backlight/intel_backlight/max_brightness)" level=$(echo "scale=2; $brightness / $brightness_max * 100" | bc) printf "^c$red^ " @@ -91,8 +91,8 @@ keyboard() { while true; do - [ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates) + #[ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates) interval=$((interval + 1)) - sleep 1 && xsetroot -name "$updates $(battery) $(brightness) $(cpu) $(mem) $(keyboard) $(wlan) $(volume) $(clock)" + sleep 1 && xsetroot -name "$updates $(battery) $(brightness) $(cpu) $(mem) $(wlan) $(volume) $(clock)" done |