blob: 8be459372dc7a60942ecfec6a5ae50b079d4ec87 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env bash
activemonitor=$(hyprctl monitors -j | jq '.[] | select(.focused == true).id')
activemonitorname=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
passivemonitor=$(hyprctl monitors -j | jq '.[] | select(.focused == false).id')
activews=$(hyprctl monitors -j | jq '.[] | select(.focused == true).activeWorkspace.id')
passivews=$(hyprctl monitors -j | jq '.[] | select(.focused == false).activeWorkspace.id')
[[ $1 -eq $passivews ]] && [[ $passivemonitor != "$activemonitor" ]] && (hyprctl dispatch swapactiveworkspaces "$activemonitor $passivemonitor")
hyprctl dispatch moveworkspacetomonitor "$1 $activemonitor"
hyprctl dispatch focusmonitor "$activemonitor"
hyprctl dispatch workspace "$1"
hyprctl hyprpaper wallpaper "$activemonitorname,/etc/nixos/config/hypr/wallpaper.png"
|