Remove double negative tests
This commit is contained in:
parent
20ce5253a7
commit
25809bf721
15
fetch.sh
15
fetch.sh
|
@ -420,7 +420,7 @@ getwindowmanager () {
|
||||||
windowmanager="$(wmctrl -m | head -n1)"
|
windowmanager="$(wmctrl -m | head -n1)"
|
||||||
windowmanager=${windowmanager/Name: /}
|
windowmanager=${windowmanager/Name: /}
|
||||||
|
|
||||||
elif [ ! -z "$XDG_CURRENT_DESKTOP" ]; then
|
elif [ "$XDG_CURRENT_DESKTOP" ]; then
|
||||||
windowmanager="$XDG_CURRENT_DESKTOP"
|
windowmanager="$XDG_CURRENT_DESKTOP"
|
||||||
|
|
||||||
elif [ -e "$HOME/.xinitrc" ]; then
|
elif [ -e "$HOME/.xinitrc" ]; then
|
||||||
|
@ -844,7 +844,7 @@ exit 1
|
||||||
# Args {{{
|
# Args {{{
|
||||||
|
|
||||||
|
|
||||||
while [ ! -z "$1" ]; do
|
while [ "$1" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
# Info
|
# Info
|
||||||
--title) title="$2" ;;
|
--title) title="$2" ;;
|
||||||
|
@ -863,10 +863,10 @@ while [ ! -z "$1" ]; do
|
||||||
|
|
||||||
# Text Colors
|
# Text Colors
|
||||||
--colors) title_color=$2
|
--colors) title_color=$2
|
||||||
[ ! -z "$3" ] && subtitle_color=$3
|
[ "$3" ] && subtitle_color=$3
|
||||||
[ ! -z "$4" ] && colon_color=$4
|
[ "$4" ] && colon_color=$4
|
||||||
[ ! -z "$4" ] && underline_color=$5
|
[ "$4" ] && underline_color=$5
|
||||||
[ ! -z "$5" ] && info_color=$6 ;;
|
[ "$5" ] && info_color=$6 ;;
|
||||||
--title_color) title_color=$2 ;;
|
--title_color) title_color=$2 ;;
|
||||||
--subtitle_color) subtitle_color=$2 ;;
|
--subtitle_color) subtitle_color=$2 ;;
|
||||||
--colon_color) colon_color=$2 ;;
|
--colon_color) colon_color=$2 ;;
|
||||||
|
@ -903,8 +903,7 @@ while [ ! -z "$1" ]; do
|
||||||
--help) usage ;;
|
--help) usage ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# The check here fixes shift in sh/mksh
|
shift
|
||||||
[ ! -z "$1" ] && shift
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue