1
0
Fork 0

update scripts

urosm 2024-06-12 00:49:03 +02:00
parent e6c1eee3ec
commit 828d85b774
1 changed files with 11 additions and 9 deletions

View File

@ -36,16 +36,18 @@ while true; do
# scratchpad
swaymsg -t get_tree | jq -Mcj '.nodes[] | select(.name=="__i3").nodes[] |
select(.name=="__i3_scratch").floating_nodes |
{
"full_text":length,
"urgent":length,
}, ","'
{
"full_text":length,
"urgent":length,
}, ","'
# notifications
makoctl list | jq -Mcj '.data[][0] |
{
"full_text":.summary.data,
"urgent":(.urgency.data==2),
}, ","'
makoctl list | jq -Mcj '.data[] |
if length>0 then {
"full_text":(["(",length,") ",.[0].summary.data]|join("")),
"urgent":(.[0].urgency.data==2),
} else {
"full_text":(["(",length,")"]|join("")),
} end, ","'
printf "],"
# timeout
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null