.local/bin/status.sh: formatting
parent
aad9b6d99e
commit
48086ee69a
|
@ -21,11 +21,11 @@ while :; do
|
|||
# shellcheck disable=SC2002
|
||||
cat /sys/class/power_supply/BAT0/capacity | jq -Mcj '
|
||||
if .<20 then {
|
||||
"full_text":([.," %"]|join("")),
|
||||
"urgent":true,
|
||||
} else {
|
||||
"full_text":([.," %"]|join("")),
|
||||
} end, ","'
|
||||
"full_text":([.," %"]|join("")),
|
||||
"urgent":true,
|
||||
} else {
|
||||
"full_text":([.," %"]|join("")),
|
||||
} end, ","'
|
||||
# date
|
||||
date +%c | jq -RMcj '{ "full_text":., }, ","'
|
||||
# scratchpad
|
||||
|
|
Loading…
Reference in New Issue