From ba7e7a52268887b2991a5f64318cf565c1a53e02 Mon Sep 17 00:00:00 2001 From: kokopi-dev Date: Tue, 28 Oct 2025 16:33:23 +0900 Subject: [PATCH] update:test mirror --- hyprland/hypr/hyprland.conf | 8 +++- hyprland/hypr/reload-monitors.sh | 22 ++++++++++ .../rofi/help-manager/neovim-keybinds.txt | 42 +++++++++++++------ .../rofi/help-manager/rofi-help-manager.sh | 41 +++++++++++------- .../rofi/help-manager/system-keybinds.txt | 15 ++++--- 5 files changed, 93 insertions(+), 35 deletions(-) diff --git a/hyprland/hypr/hyprland.conf b/hyprland/hypr/hyprland.conf index d758916..31c71ee 100644 --- a/hyprland/hypr/hyprland.conf +++ b/hyprland/hypr/hyprland.conf @@ -61,19 +61,22 @@ env = GLFW_IM_MODULE,fcitx # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: +source = /tmp/hyprland-workspaces.conf + exec-once = fcitx5 -d exec-once = hyprpaper & hypridle & mako exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'tokyonight-dark' exec-once = gsettings set org.gnome.desktop.interface icon-theme 'catppuccin-mocha' exec-once = gsettings set org.gnome.desktop.interface font-name 'Geist 11' + exec-once = ~/.config/hypr/reload-monitors.sh # contains waybar + exec-once = ~/.config/wlsunset/run-wlsunset.sh init exec-once = ~/.config/waybar/scripts/fcitx5-monitor.sh & # so far, for bazecor exec-once = /usr/lib/hyprpolkitagent/hyprpolkitagent & disown -source = /tmp/hyprland-workspaces.conf ############################# ### ENVIRONMENT VARIABLES ### ############################# @@ -312,6 +315,8 @@ bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 +bind = $mainMod ALT, p, pin, active + # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 @@ -358,6 +363,7 @@ bind = SUPER SHIFT, right, movewindow, r bind = SUPER SHIFT, up, movewindow, u bind = SUPER SHIFT, down, movewindow, d + ############################## ### WINDOWS AND WORKSPACES ### ############################## diff --git a/hyprland/hypr/reload-monitors.sh b/hyprland/hypr/reload-monitors.sh index b8869e4..92f05bd 100755 --- a/hyprland/hypr/reload-monitors.sh +++ b/hyprland/hypr/reload-monitors.sh @@ -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 diff --git a/hyprland/rofi/help-manager/neovim-keybinds.txt b/hyprland/rofi/help-manager/neovim-keybinds.txt index 7b61339..a44461e 100644 --- a/hyprland/rofi/help-manager/neovim-keybinds.txt +++ b/hyprland/rofi/help-manager/neovim-keybinds.txt @@ -1,13 +1,29 @@ -Ldr + l → Refresh LSP -Ldr + s → Search Replace Current -Ldr + S → Search Replace Global -Ldr + cc → Comment/Uncomment -Ldr + x → Navigate/Show Errors/Warnings -Ctrl + f → Find Search File -Ldr + fg → Find Live Grep Search -Ldr + ca → Show Code Actions -K → Peek Signature -gd → Go To Definition -gr → Find References -Ctrl + l → Clear Highlights -Alt + Arrows → Navigate/Switch Panels +Ldr + l → Refresh LSP +Ctl + f → Scroll Up Cmp +Ctl + b → Scroll Down Cmp +]d → Next Diagnostic +[d → Prev Diagnostic +Ldr + s → Search Replace Current +Ldr + S → Search Replace Global +Ldr + F → Format Code +Ldr + x → Clear Diagnostics +Ldr + cc → Comment/Uncomment +Ldr + xx → Toggle/Show Errors/Warnings +Ctrl + f → Find Search File +Ldr + fg → Find Live Grep Search +Ldr + ca → Show Code Actions +K → Peek Signature +gd → Go To Definition +gr → Find References +Ctrl + l → Clear Highlights +Alt + Arrows → Navigate/Switch Panels +Alt + b → Navigate/Jump Back Buf +Alt + n → Navigate/Jump Next Buf +Alt + c → Clear Jumps/Buf +Alt + q → Clear/Quit Current Jump/Buf +Ctrl + Tab → Add File To Tab +Ldr + E → Open Directory/netrw +(netrw) Ldr + ER → Close netrw +(netrw) Ldr + d → Duplicate file +(netrw) Ldr + sw → Set Current Root Dir +Ldr + e{,<,(,",' → Wrap Word With Wrapper diff --git a/hyprland/rofi/help-manager/rofi-help-manager.sh b/hyprland/rofi/help-manager/rofi-help-manager.sh index ff36f97..aac8fde 100755 --- a/hyprland/rofi/help-manager/rofi-help-manager.sh +++ b/hyprland/rofi/help-manager/rofi-help-manager.sh @@ -2,16 +2,16 @@ get_current_monitor_width() { # Get cursor position from Hyprland local pos=$(hyprctl cursorpos 2>/dev/null | head -n 1) - + if [ -z "$pos" ]; then echo "Error: Could not get cursor position from Hyprland" >&2 return 1 fi - + # Extract coordinates (hyprctl cursorpos returns: "x, y") local x=$(echo "$pos" | awk -F',' '{print $1}' | tr -d ' ') local y=$(echo "$pos" | awk -F',' '{print $2}' | tr -d ' ') - + # Get the width of the monitor containing the cursor local width=$(hyprctl monitors -j | jq -r --argjson x "$x" --argjson y "$y" ' .[] | select( @@ -20,7 +20,7 @@ get_current_monitor_width() { (.x + .width) > $x and (.y + .height) > $y ) | .width' | head -n 1) - + echo "$width" } @@ -47,21 +47,30 @@ else THEME_FILE=~/.config/rofi/help-manager/help-manager.rasi fi - SYSTEM="󰟀 System" NVIM=" Neovim" -chosen=$(echo -e "$SYSTEM\n$NVIM" | rofi -mesg " Keybinds" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi) +BASH_HELP=" Bash" +chosen=$(echo -e "$SYSTEM\n$NVIM\n$BASH_HELP" | rofi -mesg " Keybinds" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi) case $chosen in - "$NVIM") - cat ~/.config/rofi/help-manager/neovim-keybinds.txt | rofi -mesg " Neovim Binds" -dmenu -i -p "󰍉" -config $THEME_FILE \ - -font "Geist Mono 14" \ - -kb-accept-entry "" - ;; - "$SYSTEM") - cat ~/.config/rofi/help-manager/system-keybinds.txt | rofi -mesg " System Binds" -dmenu -i -p "󰍉" -config $THEME_FILE \ - -font "Geist Mono 14" \ - -kb-accept-entry "" - ;; +"$NVIM") + cat ~/.config/rofi/help-manager/neovim-keybinds.txt | rofi -mesg " Neovim Binds" -dmenu -i -p "󰍉" -config $THEME_FILE \ + -font "Geist Mono 14" \ + -kb-accept-entry "" + ;; +"$SYSTEM") + cat ~/.config/rofi/help-manager/system-keybinds.txt | rofi -mesg " System Binds" -dmenu -i -p "󰍉" -config $THEME_FILE \ + -font "Geist Mono 14" \ + -kb-accept-entry "" + ;; +"$BASH_HELP") + if [ ! -d "/tmp/firefox-dev" ]; then + echo "Creating firefox profile" + mkdir -p /tmp/firefox-dev + firefox -CreateProfile "dev-profile /tmp/firefox-dev" + fi + + firefox -P dev-profile -private-window https://devhints.io/bash & + ;; esac post_rofi & diff --git a/hyprland/rofi/help-manager/system-keybinds.txt b/hyprland/rofi/help-manager/system-keybinds.txt index 4ad4df5..fa468cc 100644 --- a/hyprland/rofi/help-manager/system-keybinds.txt +++ b/hyprland/rofi/help-manager/system-keybinds.txt @@ -1,11 +1,16 @@ Super + Return → Terminal -Super + B → Browser -Super + Shift + q → Quit Window -Super + Shift + c → Configs Launcher -Super + Shift + x → Settings Launcher -Super + Shift + p → Power/System Launcher +Super + e → File Manager +Super + Shft + q → Quit Window +Super + Shft + c → Configs Launcher +Super + Shft + x → Settings Launcher +Super + Shft + p → Power/System Launcher Super + d → App/Program Launcher Super + t → Toggle Floating Window Super + Arrows → Navigate Windows +Super + (0-9) → Navigate To Workspace# Super + Shft + Arrows → Move Windows +Super + Shft + (0-9) → Move Window To Workspace# Super + s → Toggle Scratchpad/Special +Super + S → Move Win To Scratchpad/Special +Super + LMB (Drag) → Move Window +Super + RMB (Drag) → Resize Window