mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2025-08-09 19:09:14 +02:00
visibleWorkspaces shortcut + weather now handles non-responses
This commit is contained in:
15
i3/scripts/visibleWorkspaces.sh
Normal file
15
i3/scripts/visibleWorkspaces.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get workspace information from i3
|
||||
workspaces_json=$(i3-msg -t get_workspaces)
|
||||
|
||||
# Extract active workspaces for each output
|
||||
notification_text=$(echo "$workspaces_json" | jq -r '.[] | select(.focused == true or .visible == true) | "\(.name) on \(.output | gsub("DisplayPort"; "DP"))"' | sort)
|
||||
|
||||
# Show notification with better styling
|
||||
notify-send -u critical \
|
||||
-i workspace \
|
||||
-a "i3-workspace-info" \
|
||||
-t 10000 \
|
||||
-e \
|
||||
"Visible workspaces:" "$notification_text"
|
Reference in New Issue
Block a user