[Eww] Clean up shell scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,7 @@ set -e
|
|||||||
|
|
||||||
handle_event() {
|
handle_event() {
|
||||||
case $1 in
|
case $1 in
|
||||||
focusedmon*) active_workspace;;
|
focusedmon* | workspace*) active_workspace;;
|
||||||
workspace*) active_workspace;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ handle_event() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list_workspaces() {
|
list_workspaces() {
|
||||||
focused=`hyprctl activeworkspace -j | jq '.id'`
|
focused=$(hyprctl activeworkspace -j | jq '.id')
|
||||||
active=`hyprctl monitors -j | jq 'map(select(.name == "'$monitor'")) | .[0].activeWorkspace.id'`
|
active=$(hyprctl monitors -j | jq 'map(select(.name == "'$monitor'")) | .[0].activeWorkspace.id')
|
||||||
# Explanation
|
# Explanation
|
||||||
# 1. Select only workspaces on the current monitor.
|
# 1. Select only workspaces on the current monitor.
|
||||||
# 2. Remove duplicates (might be a bug with split-monitor-workspaces
|
# 2. Remove duplicates (might be a bug with split-monitor-workspaces
|
||||||
|
|||||||
Reference in New Issue
Block a user