commit f3b95d79654023ae6b7da4f35d2ad83006c871ba
parent 267bc79de2f59124e955cefa6616de6eaaeb7e80
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 31 Aug 2019 07:34:47 +0200
Fix help output and remove list command
Diffstat:
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/.local/bin/colortheme b/.local/bin/colortheme
@@ -10,13 +10,12 @@ die() {
}
show_help() {
- echo "usage: ${0##*/} [OPTION] COMMAND THEMEFILE"
+ echo "usage: ${0##*/} [OPTION] THEMEFILE"
echo "Writes colors from THEMEFILE to:"
echo " ~/.Xresources"
echo " $slroot/st/config.h"
echo " $slroot/tabbed/config.h"
echo " $slroot/dwm/config.h"
- echo "if they exist."
echo "Valid OPTIONS are:"
echo " -h, --help show this message"
echo " -v, --version show version information"
@@ -177,7 +176,6 @@ set_colors() {
[ $# -lt 1 ] && (show_help && exit 1)
-settheme=0
while :; do
case "$1" in
-h|-\?|--help)
@@ -188,13 +186,6 @@ while :; do
show_version
exit 0
;;
- list)
- show_themes
- exit 0
- ;;
- set)
- settheme=1
- ;;
--) # end all options
shift
break
@@ -208,7 +199,7 @@ while :; do
shift
done
-[ $settheme = 1 ] && [ $# -lt 1 ] && die 'Error: No THEMEFILE specified'
-[ $settheme = 1 ] && [ $# -gt 1 ] && die 'Error: More than one THEMEFILE specified'
+[ $# -lt 1 ] && die 'Error: No THEMEFILE specified'
+[ $# -gt 1 ] && die 'Error: More than one THEMEFILE specified'
set_colors "$1"