custom-hypr - up to date

This commit is contained in:
huyjaky
2024-10-29 13:26:28 +07:00
parent e9f06c7d3e
commit d0d707a0c0
82 changed files with 103 additions and 1703 deletions

View File

View File

@@ -21,7 +21,7 @@ hyprctl dispatch fullscreenstate 0 # minimize trước khi di chuyển
# NOTE: Di chuyển cửa sổ nếu vị trí X vượt qua ngưỡng
if [ $window_x_position -eq 1934 ] && [ $window_state -eq 1 ]; then
if [ $current_workspace -eq 6 ]; then
if [ $current_workspace -eq 8 ]; then
exit 1
fi
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \
@@ -33,7 +33,7 @@ fi
if [ $window_x_position -eq 1934 ] && [ $window_width -eq 1892 ]; then
if [ $current_workspace -eq 6 ]; then
if [ $current_workspace -eq 8 ]; then
exit 1
fi
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \
@@ -46,7 +46,7 @@ fi
if [ $window_x_position -eq 2990 ]; then
if [ $current_workspace -eq 6 ]; then
if [ $current_workspace -eq 8 ]; then
exit 1
fi
hyprctl dispatch movetoworkspace $((window_at_workspace+1)) \

View File

@@ -21,15 +21,14 @@ fi
# Check if primary_monitor_workspace is less than or equal to 0
# or if secondary_monitor_workspace is greater than or equal to 11
if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -ge 7 ]; then
if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -ge 9 ]; then
exit 1
fi
hyprctl dispatch fullscreenstate 0 \
&&hyprctl dispatch focusmonitor 1 \
hyprctl dispatch focusmonitor 0 \
&&hyprctl dispatch workspace $primary_monitor_workspace \
&&hyprctl dispatch focusmonitor 0 \
&&hyprctl dispatch focusmonitor 1 \
&&hyprctl dispatch workspace $secondary_monitor_workspace \
&&hyprctl dispatch focusmonitor $current_monitor \
&&hyprctl dispatch focusmonitor $current_monitor
exit 0

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Extract workspace ID from the output of hyprctl activewindow
current_monitor=$(hyprctl activeworkspace | grep 'monitorID' | awk '{print $2}')
current_workspace=$(hyprctl activeworkspace | grep 'workspace' | awk '{print $3}')
@@ -21,16 +22,13 @@ fi
# Check if primary_monitor_workspace is less than or equal to 0
# or if secondary_monitor_workspace is greater than or equal to 11
if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -ge 7 ]; then
if [ "$primary_monitor_workspace" -le 0 ] || [ "$secondary_monitor_workspace" -ge 9 ]; then
exit 1
fi
hyprctl dispatch fullscreenstate 0 \
&&hyprctl dispatch focusmonitor 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