custom-hypr - modifier form

This commit is contained in:
huyjaky
2024-10-22 08:41:42 +07:00
parent 39467b1bbe
commit 3655aef8e9
61 changed files with 4559 additions and 158 deletions

View File

@@ -5,4 +5,5 @@ exec-once = corectrl
exec-once = otd-daemon # run driver veikk
exec-once = fcitx5
exec = gsettings set org.gnome.desktop.interface icon-theme 'Tela-circle-blue'
exec = gsettings set org.gnome.desktop.interface icon-theme 'Nordzy'
exec = hyprctl setcursor Gruvbox-Retro 20

View File

@@ -20,11 +20,11 @@ unbind = Super, L
# move windown
bind = Alt, H, fullscreenstate, 0 # [hidden]
bind = Alt, H, movefocus, l # [hidden]
bind = Alt, H, exec, source /home/duckq1u/.config/hypr/scripts/focusStateToLeft.sh # [hidden]
# bind = Alt, H, movefocus, l # [hidden]
bind = Alt, L, fullscreenstate, 0 # [hidden]
bind = Alt, L, movefocus, r # [hidden]
bind = Alt, L, exec, source /home/duckq1u/.config/hypr/scripts/focusStateToRight.sh # [hidden]
# bind = Alt, L, movefocus, r # [hidden]
bind = Alt, K, fullscreenstate, 0 # [hidden]
bind = Alt, K, movefocus, u # [hidden]
@@ -46,7 +46,7 @@ bind = Ctrl+Alt, J, movewindow, d # [hidden]
bind = Alt, Q, killactive,
bind = Alt, F, fullscreen, 1
bind = Alt, R, exec, killall ags ydotool; ags & # Restart widgets
# bind = Alt, R, exec, killall ags ydotool; ags & # Restart widgets
bind = Alt, E, exec, nautilus --new-window # Launch Nautilus (file manager)
# bind = Alt, M, exec, ags run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' # Toggle music controls
# bind = Alt, N, exec, ags -t 'sideright' # Toggle right sidebar
@@ -57,18 +57,13 @@ bind = Alt, B, exec, brave
bind = Alt, O, exec, obsidian --no-sandbox --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations %U
bind = Alt, V, exec, vesktop --no-sandbox --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations %U
# bind = Ctrl+Super+Shift, Right, movetoworkspace, +1 # [hidden]
# bind = Shift+Alt, L, focusmonitor, 1
# bind = Shift+Alt, H, focusmonitor, 0
bind = SUPER, SUPER_L, exec, pkill -x rofi || $scrPath/rofilaunch.sh d # launch application launcher
# bind = Ctrl+Alt, E, exec, pkill -x rofi || $scrPath/rofilaunch.sh f # launch file explorer
# bind = Shift+Alt, L, exec, source /home/duckq1u/.config/hypr/scripts/workspacePLUS.sh
# bind = Shift+Alt, H, exec, source /home/duckq1u/.config/hypr/scripts/workspaceEXCEPT.sh
bind = Shift+Alt, L, exec, source /home/duckq1u/.config/hypr/scripts/workspaceV2inscrease.sh
bind = Shift+Alt, H, exec, source /home/duckq1u/.config/hypr/scripts/workspaceV2descrease.sh
bind = Alt, S, exec, volumecontrol.sh -s ''
$mainMod = Super # super / meta / windows key
$scrPath = $HOME/.local/share/bin # set scripts path

View File

@@ -0,0 +1,14 @@
#!/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)
window_state=$(echo "$window_info" | grep 'fullscreen:' | awk '{print $2}')
# NOTE: Di chuyển cửa sổ nếu vị trí X vượt qua ngưỡng
if [ $window_state -eq 1 ]; then
hyprctl dispatch focusmonitor 0
exit 0
fi
hyprctl dispatch movefocus l

View File

@@ -0,0 +1,17 @@
#!/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)
window_state=$(echo "$window_info" | grep 'fullscreen:' | awk '{print $2}')
# NOTE: Di chuyển cửa sổ nếu vị trí X vượt qua ngưỡng
if [ $window_state -eq 1 ]; then
hyprctl dispatch focusmonitor 1
exit 0
fi
hyprctl dispatch movefocus r

View File

@@ -1,25 +0,0 @@
#!/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 fullscreenstate 0
hyprctl dispatch workspace $PRIMARY_MONITOR_WORKSPACE
hyprctl dispatch focusmonitor 1
# hyprctl dispatch fullscreenstate 0
hyprctl dispatch workspace $SECONDARY_MONITOR_WORKSPACE
# hyprctl dispatch workspace 4
hyprctl dispatch focusmonitor $current_monitor

View File

@@ -1,20 +0,0 @@
#!/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

View File

@@ -26,6 +26,7 @@ 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

View File

@@ -26,6 +26,7 @@ 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

View File

@@ -1,36 +0,0 @@
#!/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}')
# Determine the second workspace based on whether the current workspace is even or odd
if [ $((current_workspace % 2)) -eq 0 ]; then
second_workspace=$((current_workspace - 1))
else
second_workspace=$((current_workspace + 1))
fi
# Assign primary and secondary monitor workspaces based on the current workspace
if [ $((current_workspace % 2)) -eq 0 ]; then
primary_monitor_workspace=$((second_workspace + 2)) # left
secondary_monitor_workspace=$((current_workspace + 2)) # right
else
primary_monitor_workspace=$((current_workspace + 2))
secondary_monitor_workspace=$((second_workspace + 2))
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
exit 1
fi
# 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 0

View File

@@ -5,7 +5,7 @@
# |____| \______ /|__| / ____|| __/|__|
# \/ \/ |__|
exec = gsettings set org.gnome.desktop.interface icon-theme 'Uos'
# exec = gsettings set org.gnome.desktop.interface icon-theme 'Uos'
# exec = gsettings set org.gnome.desktop.interface gtk-theme 'Gruvbox-Retro'
# exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'