custom-hypr - add config hypr
This commit is contained in:
20
.config/hypr/scripts/workspacePLUS.sh
Executable file
20
.config/hypr/scripts/workspacePLUS.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
current_monitor=$(hyprctl activewindow | grep 'monitor' | awk '{print $2}')
|
||||
export PRIMARY_MONITOR_WORKSPACE=$((PRIMARY_MONITOR_WORKSPACE+2))
|
||||
export SECONDARY_MONITOR_WORKSPACE=$((SECONDARY_MONITOR_WORKSPACE+2))
|
||||
|
||||
if [ "$PRIMARY_MONITOR_WORKSPACE" -lt 1 ]; then
|
||||
export PRIMARY_MONITOR_WORKSPACE=1
|
||||
exit 1
|
||||
elif [ "$SECONDARY_MONITOR_WORKSPACE" -gt 10 ]; then
|
||||
export SECONDARY_MONITOR_WORKSPACE=10
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $PRIMARY_MONITOR_WORKSPACE
|
||||
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $SECONDARY_MONITOR_WORKSPACE
|
||||
|
||||
hyprctl dispatch focusmonitor $current_monitor
|
||||
Reference in New Issue
Block a user