about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-11 09:30:56 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-11 09:30:56 +0200
commitdd748573b261181f94d47ef7c0bf3e116d07409f (patch)
tree7f9fb08136f23f1ecf29787090a489123ec8d313
parentAdded separation of colors in config.h for title bar [Patch] (diff)
downloaddwm-dd748573b261181f94d47ef7c0bf3e116d07409f.tar.gz
dwm-dd748573b261181f94d47ef7c0bf3e116d07409f.tar.bz2
dwm-dd748573b261181f94d47ef7c0bf3e116d07409f.zip
Improved status bar
-rwxr-xr-xscripts/dwm-status17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status
index 02aca75..2715c1d 100755
--- a/scripts/dwm-status
+++ b/scripts/dwm-status
@@ -13,7 +13,8 @@ delim="|"
 # explained.
 status() { \
 
-	echo $(python /home/baitinq/.config/polybar/scripts/weather.py)
+	# Directs to the path of the weather script.
+	echo $(python $( cd "$(dirname "$0")" ; pwd -P )/weather.py)
 
 	echo "$delim"
 
@@ -50,16 +51,18 @@ status() { \
 	for x in /sys/class/power_supply/BAT?/capacity;
 	do
 	case "$(cat $x)" in
-		100|9[0-9])	echo "" ;;
-		8[0-9]|7[0-9])	echo "" ;;
-		6[0-9]|5[0-9])	echo "" ;;
-		4[0-9]|3[0-9])	echo "" ;;
-		*)		echo "" ;;
+		100)            echo ""            ;;
+		9[0-9])	        echo " $(cat $x)%" ;;
+		8[0-9]|7[0-9])	echo " $(cat $x)%" ;;
+		6[0-9]|5[0-9])	echo " $(cat $x)%" ;;
+		4[0-9]|3[0-9])	echo " $(cat $x)%" ;;
+		2[0-9]|1[0-9])	echo " $(cat $x)%" ;;
+		[0-9])	        echo " $(cat $x)%" ;;
 	esac
 	done && echo "$delim"
 
 	# Date and time. FORMAT CORRECT NO PM
-	echo " $(date '+%Y %b %d (%a) %I:%M%p')"
+	echo " $(date '+%d-%m-%y (%a) |  %H:%M')"
 	}
 
 while :; do