aboutsummaryrefslogtreecommitdiff
path: root/dwm/.dwm/bar/bar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dwm/.dwm/bar/bar.sh')
-rwxr-xr-xdwm/.dwm/bar/bar.sh14
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