diff --git a/.local/bin/status.sh b/.local/bin/status.sh index 0984389..2638056 100755 --- a/.local/bin/status.sh +++ b/.local/bin/status.sh @@ -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