1
0
Fork 0

.local/bin/status.sh: change order and timeout

main
urosm 2024-07-29 12:25:44 +02:00
parent 1204977fde
commit 2b5c97b061
1 changed files with 9 additions and 9 deletions

View File

@ -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