custom-hypr - up to date config
This commit is contained in:
@@ -12,3 +12,4 @@ if [ $window_state -eq 1 ]; then
|
||||
fi
|
||||
|
||||
hyprctl dispatch movefocus l
|
||||
exit 0
|
||||
|
||||
@@ -15,3 +15,4 @@ if [ $window_state -eq 1 ]; then
|
||||
fi
|
||||
|
||||
hyprctl dispatch movefocus r
|
||||
exit 0
|
||||
|
||||
@@ -25,10 +25,10 @@ if [ $window_x_position -eq 14 ] && [ $window_state -eq 1 ]; then
|
||||
if [ $current_workspace -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $((current_workspace-2))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1)) \
|
||||
&& hyprctl dispatch focusmonitor 0 \
|
||||
&& hyprctl dispatch workspace $((current_workspace-2)) \
|
||||
&& hyprctl dispatch focusmonitor 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -37,10 +37,10 @@ if [ $window_x_position -eq 14 ] && [ $window_width -eq 1892 ]; then
|
||||
if [ $current_workspace -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $((current_workspace-2))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1)) \
|
||||
&& hyprctl dispatch focusmonitor 0 \
|
||||
&& hyprctl dispatch workspace $((current_workspace-2)) \
|
||||
&& hyprctl dispatch focusmonitor 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -50,12 +50,13 @@ if [ $window_x_position -eq 14 ]; then
|
||||
if [ $current_workspace -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $((current_workspace-2))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace-1)) \
|
||||
&& hyprctl dispatch focusmonitor 0 \
|
||||
&& hyprctl dispatch workspace $((current_workspace-2)) \
|
||||
&& hyprctl dispatch focusmonitor 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Nếu không thoả điều kiện di chuyển, di chuyển cửa sổ sang phải
|
||||
hyprctl dispatch movewindow l
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Lấy thông tin của cửa sổ hiện tại chỉ một lần
|
||||
window_info=$(hyprctl activewindow)
|
||||
|
||||
@@ -25,10 +24,10 @@ if [ $window_x_position -eq 1934 ] && [ $window_state -eq 1 ]; then
|
||||
if [ $current_workspace -eq 6 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $((current_workspace+2))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \
|
||||
&& hyprctl dispatch focusmonitor 1 \
|
||||
&& hyprctl dispatch workspace $((current_workspace+2)) \
|
||||
&& hyprctl dispatch focusmonitor 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -37,10 +36,10 @@ if [ $window_x_position -eq 1934 ] && [ $window_width -eq 1892 ]; then
|
||||
if [ $current_workspace -eq 6 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $((current_workspace+2))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \
|
||||
&& hyprctl dispatch focusmonitor 1 \
|
||||
&& hyprctl dispatch workspace $((current_workspace+2)) \
|
||||
&& hyprctl dispatch focusmonitor 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -50,12 +49,13 @@ if [ $window_x_position -eq 2990 ]; then
|
||||
if [ $current_workspace -eq 6 ]; then
|
||||
exit 1
|
||||
fi
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1))
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $((current_workspace+2))
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \
|
||||
&& hyprctl dispatch focusmonitor 1 \
|
||||
&& hyprctl dispatch workspace $((current_workspace+2)) \
|
||||
&& hyprctl dispatch focusmonitor 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Nếu không thoả điều kiện di chuyển, di chuyển cửa sổ sang phải
|
||||
hyprctl dispatch movewindow r
|
||||
exit 0
|
||||
|
||||
@@ -26,13 +26,10 @@ if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -g
|
||||
fi
|
||||
|
||||
|
||||
hyprctl dispatch fullscreenstate 0 # minimize trước khi di chuyển
|
||||
# Switch focus and workspace for both monitors
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $primary_monitor_workspace
|
||||
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $secondary_monitor_workspace
|
||||
|
||||
# Optionally focus back to the original monitor if desired (adjust this part if needed)
|
||||
hyprctl dispatch focusmonitor $current_monitor
|
||||
hyprctl dispatch fullscreenstate 0 \
|
||||
&&hyprctl dispatch focusmonitor 1 \
|
||||
&&hyprctl dispatch workspace $primary_monitor_workspace \
|
||||
&&hyprctl dispatch focusmonitor 0 \
|
||||
&&hyprctl dispatch workspace $secondary_monitor_workspace \
|
||||
&&hyprctl dispatch focusmonitor $current_monitor \
|
||||
exit 0
|
||||
|
||||
@@ -25,14 +25,12 @@ if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -g
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hyprctl dispatch fullscreenstate 0 \
|
||||
&&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
|
||||
exit 0
|
||||
|
||||
hyprctl dispatch fullscreenstate 0 # minimize trước khi di chuyển
|
||||
# Switch focus and workspace for both monitors
|
||||
hyprctl dispatch focusmonitor 0
|
||||
hyprctl dispatch workspace $primary_monitor_workspace
|
||||
|
||||
hyprctl dispatch focusmonitor 1
|
||||
hyprctl dispatch workspace $secondary_monitor_workspace
|
||||
|
||||
# Optionally focus back to the original monitor if desired (adjust this part if needed)
|
||||
hyprctl dispatch focusmonitor $current_monitor
|
||||
|
||||
Reference in New Issue
Block a user