[Eww] Clean up shell scripts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 16:17:44 -07:00
parent e6e4c5a683
commit fb95bcb6cf
2 changed files with 3 additions and 4 deletions

View File

@@ -5,8 +5,7 @@ set -e
handle_event() {
case $1 in
focusedmon*) active_workspace;;
workspace*) active_workspace;;
focusedmon* | workspace*) active_workspace;;
esac
}

View File

@@ -12,8 +12,8 @@ handle_event() {
}
list_workspaces() {
focused=`hyprctl activeworkspace -j | jq '.id'`
active=`hyprctl monitors -j | jq 'map(select(.name == "'$monitor'")) | .[0].activeWorkspace.id'`
focused=$(hyprctl activeworkspace -j | jq '.id')
active=$(hyprctl monitors -j | jq 'map(select(.name == "'$monitor'")) | .[0].activeWorkspace.id')
# Explanation
# 1. Select only workspaces on the current monitor.
# 2. Remove duplicates (might be a bug with split-monitor-workspaces