From 51113330dfcfa318721af3ffef26f04440c288f7 Mon Sep 17 00:00:00 2001 From: nub31 Date: Thu, 8 May 2025 19:07:50 +0200 Subject: [PATCH] ... --- .config/hypr/bindings.conf | 44 +++++++++++++++++++----------------- .config/hypr/hyprland.conf | 3 ++- .config/hypr/workspaces.conf | 11 --------- setup.sh | 44 ++++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 33 deletions(-) delete mode 100644 .config/hypr/workspaces.conf create mode 100644 setup.sh diff --git a/.config/hypr/bindings.conf b/.config/hypr/bindings.conf index ae4efbf..a4eb51b 100644 --- a/.config/hypr/bindings.conf +++ b/.config/hypr/bindings.conf @@ -1,7 +1,7 @@ # https://wiki.hyprland.org/Configuring/Binds/ $terminal = alacritty -$fileManager = dolphin +$fileManager = thunar $menu = rofi -show drun -config "$HOME/.config/rofi/config.rasi" $browser = librewolf $code = code @@ -29,27 +29,29 @@ bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -# Independent workspaces per monitor -bind = $mainMod, 1, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'01' -bind = $mainMod, 2, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'02' -bind = $mainMod, 3, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'03' -bind = $mainMod, 4, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'04' -bind = $mainMod, 5, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'05' -bind = $mainMod, 6, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'06' -bind = $mainMod, 7, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'07' -bind = $mainMod, 8, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'08' -bind = $mainMod, 9, exec, hyprctl dispatch workspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'09' +plugin { + split-monitor-workspaces { + count = 3 + keep_focused = 0 + enable_notifications = 1 + enable_persistent_workspaces = 1 + } +} -# Move apps between workspacer per monitor -bind = $mainMod SHIFT, 1, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'01' -bind = $mainMod SHIFT, 2, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'02' -bind = $mainMod SHIFT, 3, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'03' -bind = $mainMod SHIFT, 4, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'04' -bind = $mainMod SHIFT, 5, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'05' -bind = $mainMod SHIFT, 6, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'06' -bind = $mainMod SHIFT, 7, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'07' -bind = $mainMod SHIFT, 8, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'08' -bind = $mainMod SHIFT, 9, exec, hyprctl dispatch movetoworkspace $((`hyprctl monitors -j | jq -r ".[] | select(.focused==true).id"`))'09' +$mainMod = SUPER +# Switch workspaces with mainMod + [0-5] +bind = $mainMod, 1, split-workspace, 1 +bind = $mainMod, 2, split-workspace, 2 +bind = $mainMod, 3, split-workspace, 3 +bind = $mainMod, 4, split-workspace, 4 +bind = $mainMod, 5, split-workspace, 5 + +# Move active window to a workspace with mainMod + SHIFT + [0-5] +bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1 +bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2 +bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3 +bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4 +bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index bbe0704..bebe3e7 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -6,7 +6,8 @@ source = env.conf source = input.conf source = monitors.conf source = rules.conf -source = workspaces.conf + +exec-once = hyprpm reload -n general { # https://wiki.hyprland.org/Configuring/Variables/#general diff --git a/.config/hypr/workspaces.conf b/.config/hypr/workspaces.conf deleted file mode 100644 index c26e561..0000000 --- a/.config/hypr/workspaces.conf +++ /dev/null @@ -1,11 +0,0 @@ -workspace = 001, monitor:DP-1, default:true -workspace = 002, monitor:DP-1 -workspace = 003, monitor:DP-1 - -workspace = 101, monitor:DP-3, default:true -workspace = 102, monitor:DP-3 -workspace = 103, monitor:DP-3 - -workspace = 201, monitor:HDMI-A-1, default:true -workspace = 202, monitor:HDMI-A-1 -workspace = 203, monitor:HDMI-A-1 \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..21ee887 --- /dev/null +++ b/setup.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +stow . --adopt +git reset --hard + +sudo pacman -Syu --noconfirm +sudo pacman -S --noconfirm \ + librewolf \ + code \ + alacritty \ + thunar + +if ! command -v yay 2>&1 >/dev/null +then + sudo pacman -S --needed --noconfirm git base-devel + git clone https://aur.archlinux.org/yay-bin.git + cd yay-bin + makepkg -si + cd ../ + rm -rf yay-bin +fi + +yay -Syu --noconfirm +yay -S --noconfirm \ + hyprpaper-git \ + hyprpicker-git \ + hypridle-git \ + hyprlock-git \ + xdg-desktop-portal-hyprland-git \ + hyprpolkitagent-git \ + hyprsysteminfo-git \ + hyprland-qt-support-git \ + hyprcursor-git \ + hyprutils-git \ + hyprlang-git \ + hyprwayland-scanner-git \ + aquamarine-git \ + hyprgraphics-git \ + hyprland-qtutils-git \ + rofi-lbonn-wayland-git + +hyprpm add https://github.com/Duckonaut/split-monitor-workspaces +hyprpm enable split-monitor-workspaces +hyprpm reload \ No newline at end of file