updated monocle bar and added wayshell framework with some modules.

This commit is contained in:
2026-06-27 17:35:39 +02:00
parent 79b45ab123
commit 66065960cf
43 changed files with 2163 additions and 97 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
#!/bin/bash
MONITOR=HDMI-A-1
MONITOR=$1
# get all clients on that monitor: mmsg get all-clients | jq '.clients[] | select( .monitor == "HDMI-A-1") | .id' -r
@@ -10,26 +10,26 @@ ACTIVEMON=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) |
#echo "activemon is $ACTIVEMON"
ACTIVETAG=$(mmsg get tags $MONITOR | jq '.tags[] | select(.is_active == true) | .index' -r)
#echo "activetag is $ACTIVETAG"
ACTIVEWINDOWS=$(mmsg get all-clients | jq -r --arg ACTIVETAG "$ACTIVETAG" --arg ACTIVEMON "$MONOCLEMON" '.clients[] | select(.tags[] == ($ACTIVETAG | tonumber) and .monitor == $ACTIVEMON) | .id' | sort)
ACTIVEWINDOWS=$(mmsg get all-clients | jq -r --arg ACTIVETAG "$ACTIVETAG" --arg ACTIVEMON "$MONITOR" '.clients[] | select(.tags[] == ($ACTIVETAG | tonumber) and .monitor == $ACTIVEMON) | .id' | sort)
#echo "active windows are:"
#echo "----------------------------------------"
#echo "$ACTIVEWINDOWS"
#echo "----------------------------------------"
echo "lock" > ~/.config/monocle.lock
echo "lock" > ~/.config/monocle-$MONITOR.lock
sleep 0.05
INDEX=0
echo "" > ~/.config/monocle.state
echo "" > ~/.config/monocle-$MONITOR.state
while read LINE; do
ID=$LINE
TITLE=$(mmsg get all-clients | jq -r --arg ID "$LINE" '.clients[] | select(.id == ($ID | tonumber)) | .title' )
INDEX=$((INDEX+1))
echo "index:$INDEX \ $TITLE \ $ID" >> ~/.config/monocle.state
echo "index:$INDEX \ $TITLE \ $ID" >> ~/.config/monocle-$MONITOR.state
done <<< "$ACTIVEWINDOWS"
sleep 0.05
rm ~/.config/monocle.lock
rm ~/.config/monocle-$MONITOR.lock
echo "(running)"