update:test mirror
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
sleep 0.5
|
||||
move_all_windows_to_workspace1() {
|
||||
# Get window count for feedback
|
||||
window_count=$(hyprctl clients -j | jq '. | length')
|
||||
@@ -10,6 +11,9 @@ move_all_windows_to_workspace1() {
|
||||
# Switch to workspace 1 to make it active
|
||||
hyprctl dispatch workspace 1
|
||||
}
|
||||
|
||||
# default monitor is eDP-1
|
||||
# external monitor is DP-3
|
||||
home_dock=$(hyprctl monitors | grep -E "(DP-3|eDP-1)" | wc -l)
|
||||
|
||||
workspace_file="/tmp/hyprland-workspaces.conf"
|
||||
@@ -30,6 +34,20 @@ if [[ $home_dock == 2 ]]; then
|
||||
echo "workspace = 9,monitor:eDP-1,persistent:true" >> $workspace_file
|
||||
echo "workspace = 10,monitor:eDP-1,persistent:true" >> $workspace_file
|
||||
notify-send "Monitor Reload" "Detected Home Dock Settings"
|
||||
hyprctl reload
|
||||
sleep 1
|
||||
hyprctl dispatch moveworkspacetomonitor 1 DP-3
|
||||
hyprctl dispatch moveworkspacetomonitor 2 DP-3
|
||||
hyprctl dispatch moveworkspacetomonitor 3 DP-3
|
||||
hyprctl dispatch moveworkspacetomonitor 4 DP-3
|
||||
hyprctl dispatch moveworkspacetomonitor 5 DP-3
|
||||
hyprctl dispatch moveworkspacetomonitor 6 eDP-1
|
||||
hyprctl dispatch moveworkspacetomonitor 7 eDP-1
|
||||
hyprctl dispatch moveworkspacetomonitor 8 eDP-1
|
||||
hyprctl dispatch moveworkspacetomonitor 9 eDP-1
|
||||
hyprctl dispatch moveworkspacetomonitor 10 eDP-1
|
||||
sleep 0.5
|
||||
hyprctl dispatch workspace 1
|
||||
else
|
||||
move_all_windows_to_workspace1
|
||||
# default
|
||||
@@ -37,6 +55,10 @@ else
|
||||
echo "workspace = $i,monitor:auto,persistent:true" >> $workspace_file
|
||||
done
|
||||
notify-send "Monitor Reload" "Detected Default Settings"
|
||||
|
||||
hyprctl reload
|
||||
sleep 1
|
||||
hyprctl dispatch workspace 1
|
||||
fi
|
||||
|
||||
hyprctl reload
|
||||
|
||||
Reference in New Issue
Block a user