Removed subshell from ps grep for macOS wm
This commit is contained in:
parent
a5c4a020c0
commit
5dc00cba14
19
neofetch
19
neofetch
|
@ -1631,18 +1631,13 @@ get_wm() {
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
wm_names=(
|
ps_line="$(ps -e | grep -o \
|
||||||
"[S]pectacle"
|
-e "[S]pectacle" \
|
||||||
"[A]methyst"
|
-e "[A]methyst" \
|
||||||
"[k]wm"
|
-e "[k]wm" \
|
||||||
"[c]hun[k]wm"
|
-e "[c]hun[k]wm" \
|
||||||
"[y]abai"
|
-e "[y]abai" \
|
||||||
"[R]ectangle"
|
-e "[R]ectangle")"
|
||||||
)
|
|
||||||
|
|
||||||
regex_part=$( IFS='|'; echo "${wm_names[*]}" )
|
|
||||||
|
|
||||||
ps_line=$(ps -e | grep -Eo "$regex_part")
|
|
||||||
|
|
||||||
case "$ps_line" in
|
case "$ps_line" in
|
||||||
*"chunkwm"*) wm="chunkwm" ;;
|
*"chunkwm"*) wm="chunkwm" ;;
|
||||||
|
|
Reference in New Issue