Change if statement to a switch

parent 0c4d4eb2
...@@ -638,15 +638,12 @@ get_wm() { ...@@ -638,15 +638,12 @@ get_wm() {
"Mac OS X") "Mac OS X")
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
if echo "$ps_line" | grep -q "kwm"; then case "$ps_line" in
wm="Kwm" *"kwm"*) wm="Kwm" ;;
elif echo "$ps_line" | grep -q "Amethyst"; then *"Amethyst"*) wm="Amethyst" ;;
wm="Amethyst" *"Spectacle"*) wm="Spectacle" ;;
elif echo "$ps_line" | grep -q "Spectacle"; then *) wm="Quartz Compositor" ;;
wm="Spectacle" esac
else
wm="Quartz Compositor"
fi
;; ;;
"Windows") "Windows")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment