.local/bin/status.sh: change order and timeout
parent
1204977fde
commit
2b5c97b061
|
@ -12,6 +12,14 @@ fi
|
|||
|
||||
while :; do
|
||||
printf "["
|
||||
# notifications
|
||||
makoctl list | jq -Mcj '.data[] |
|
||||
if length>0 then {
|
||||
"full_text":(["(",length,") ",.[0].summary.data]|join("")),
|
||||
"urgent":(.[0].urgency.data==2),
|
||||
} else {
|
||||
"full_text":"(0)",
|
||||
} end, ","'
|
||||
# keyboard layout
|
||||
swaymsg -t get_inputs | jq -Mcj '[.[] | select(.type=="keyboard")][0] | {
|
||||
"full_text":.xkb_active_layout_name,
|
||||
|
@ -34,16 +42,8 @@ while :; do
|
|||
"full_text":length,
|
||||
"urgent":length,
|
||||
}, ","'
|
||||
# notifications
|
||||
makoctl list | jq -Mcj '.data[] |
|
||||
if length>0 then {
|
||||
"full_text":(["(",length,") ",.[0].summary.data]|join("")),
|
||||
"urgent":(.[0].urgency.data==2),
|
||||
} else {
|
||||
"full_text":"(0)",
|
||||
} end, ","'
|
||||
printf "],"
|
||||
# timeout
|
||||
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null
|
||||
sleep 0.02
|
||||
sleep 0.1
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue