Jason Ryan avatar Jason Ryan committed 44f9cf8

Include usage message

Comments (0)

Files changed (2)

Scripts/dwm-status

     artist="${track%%- *}"
     title="${track##*- }"
     if [[ -n "$artist" ]]; then
-        echo -e "\x08$artist\x01\x06$title\x01 "
+        echo -e "\x08$artist\x01\x06$title\x01 "
     fi
 }
 
 }
 
 # Pipe to status bar
-xsetroot -name "$(music) [$(mbt) $(gpu)] [CPU $(cpu) MEM $(mem)] [HDD $(hdd)] \
-[EML $(eml) PKG $(pac) AUR $(ups)$(aur)] [ETH $(int)]  $(dte) "
+xsetroot -name "$(music) $(mbt) $(gpu) • CPU $(cpu) MEM $(mem) • HDD $(hdd) \
+• EML $(eml) PKG $(pac) AUR $(ups)$(aur) • ETH $(int) • $(dte) "
 
 
 #!/bin/bash
 # screensaving when streaming video
 
+usage() {
+    printf "%s\n" "Usage: ${0##*/} on|off"
+    exit 1
+}
+
 case "$1" in
     on) xautolock -disable &&
         xset s off; xset s noblank; xset -dpms
+        printf "%s\n" "Blanking disabled"
         ;;
     off) xautolock -enable &&
         xset s on; xset s blank; xset +dpms
+        printf "%s\n" "Blanking enabled"
+        ;;
+    *) usage
         ;;
 esac
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.