fix: clean up cpugov scripts and waybar polling
Replace infinite loop with single execution (waybar handles polling via interval), fix unquoted variables, simplify jq invocation.
This commit is contained in:
@@ -49,19 +49,17 @@ value="$(start)"
|
||||
# Split input.
|
||||
# grab upto first space.
|
||||
choice=${value%%\ *}
|
||||
# graph remainder, minus space.
|
||||
input=${value:$((${#choice}+1))}
|
||||
|
||||
##
|
||||
# Cancelled? bail out
|
||||
##
|
||||
if test -z ${choice}
|
||||
if test -z "${choice}"
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
# check if choice exists
|
||||
if test ${COMMANDS[$choice]+isset}
|
||||
if test "${COMMANDS[$choice]+isset}"
|
||||
then
|
||||
# Execute the choice
|
||||
${COMMANDS[$choice]}
|
||||
|
||||
Reference in New Issue
Block a user