diff options
| -rwxr-xr-x | archsetup | 26 | ||||
| -rw-r--r-- | dotfiles/hyprland/.config/hypr/hyprland.conf | 8 | ||||
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/focus-restore | 9 | ||||
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/hyprland-plugins-setup | 47 | ||||
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/layout-cycle | 35 |
5 files changed, 40 insertions, 85 deletions
@@ -1425,7 +1425,6 @@ hyprland() { pacman_install hyprlock action="Hyprland Utilities" && display "subtitle" "$action" - pacman_install cpio # hyprpm (plugin manager) dependency aur_install pyprland # scratchpads, magnify, expose (fixes special workspace issues) pacman_install gtk4-layer-shell # GTK4 layer shell protocol (pocketbook dependency) pip_install git+https://github.com/cjennings/pocketbook.git # notes panel (layer-shell, toggled via waybar) @@ -1454,30 +1453,6 @@ hyprland() { pacman_install hyprpaper # wallpaper utility with IPC controls pacman_install wev # wayland event debugger (xev equivalent) - # Hyprland Plugins (via hyprpm) - # Plugins are installed on first login via hyprland-plugins-setup script - # (hyprpm requires running Hyprland to determine version for compilation) - action="Hyprland Plugins" && display "subtitle" "$action" - pacman_install cmake # required for plugin compilation - - # Pacman hook to rebuild plugins after Hyprland updates - # Prevents plugin version mismatch that causes plugins to fail loading - action="creating hyprpm pacman hook" && display "task" "$action" - mkdir -p /etc/pacman.d/hooks - cat > /etc/pacman.d/hooks/hyprpm.hook << 'HOOKEOF' -[Trigger] -Operation = Upgrade -Type = Package -Target = hyprland - -[Action] -Description = Rebuilding Hyprland plugins after update... -When = PostTransaction -Exec = /usr/bin/runuser -u ARCHSETUP_USERNAME -- /usr/bin/hyprpm update --no-shallow -HOOKEOF - # Replace placeholder with actual username - sed -i "s/ARCHSETUP_USERNAME/${username}/" /etc/pacman.d/hooks/hyprpm.hook - chmod 644 /etc/pacman.d/hooks/hyprpm.hook # Logitech BRIO webcam auto-configuration action="creating Logitech BRIO udev rule" && display "task" "$action" @@ -1565,6 +1540,7 @@ desktop_environment() { pacman_install testdisk pacman_install tickrs pacman_install udisks2 + pacman_install cpio # supermin/virt-install dependency aur_install touchpad-indicator-git aur_install dotpac diff --git a/dotfiles/hyprland/.config/hypr/hyprland.conf b/dotfiles/hyprland/.config/hypr/hyprland.conf index 0550a76..9a895fc 100644 --- a/dotfiles/hyprland/.config/hypr/hyprland.conf +++ b/dotfiles/hyprland/.config/hypr/hyprland.conf @@ -21,7 +21,6 @@ exec-once = systemctl --user restart xdg-desktop-portal-hyprland xdg-desktop-por exec-once = /usr/lib/polkit-kde-authentication-agent-1 exec-once = /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh exec-once = dunst > ~/.local/var/log/dunst-$(date +%Y-%m-%d-%H%M%S).log 2>&1 -exec-once = hyprland-plugins-setup && sleep 1 && hyprctl dismissnotify -1 # Desktop appearance exec-once = swww-daemon && sleep 1 && swww img ~/pictures/wallpaper/trondheim-norway.jpg @@ -200,12 +199,13 @@ bind = $mod, G, centerwindow bind = $mod, TAB, workspace, previous bind = $mod SHIFT, C, killactive -# Layouts: master -> scrolling -> monocle -> floating -# Click waybar layout icon to cycle, or use direct keybindings: +# Layouts: master -> scrolling -> monocle +# Cycle with Shift+arrows, or jump directly with Shift+T/S/M +bind = $mod SHIFT, RIGHT, exec, layout-cycle next +bind = $mod SHIFT, LEFT, exec, layout-cycle prev bind = $mod SHIFT, T, exec, hyprctl keyword general:layout master && hyprctl keyword master:orientation left bind = $mod SHIFT, S, exec, hyprctl keyword general:layout scrolling bind = $mod SHIFT, M, exec, hyprctl keyword general:layout monocle -bind = $mod SHIFT, F, exec, hyprctl dispatch workspaceopt allfloat bind = $mod SHIFT, SPACE, togglefloating # Master layout adjustments diff --git a/dotfiles/hyprland/.local/bin/focus-restore b/dotfiles/hyprland/.local/bin/focus-restore deleted file mode 100755 index 7f87390..0000000 --- a/dotfiles/hyprland/.local/bin/focus-restore +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Restore unfocused windows from workspace 10 without disrupting master position. -# Records the focused window, brings all back, then swaps it back to master. - -FOCUSED=$(hyprctl activewindow -j | jq -r '.address') -hyprctl dispatch plugin:xtd:bringallfrom 10 -sleep 0.1 -hyprctl dispatch focuswindow "address:$FOCUSED" -hyprctl dispatch layoutmsg swapwithmaster master diff --git a/dotfiles/hyprland/.local/bin/hyprland-plugins-setup b/dotfiles/hyprland/.local/bin/hyprland-plugins-setup deleted file mode 100755 index 29619c7..0000000 --- a/dotfiles/hyprland/.local/bin/hyprland-plugins-setup +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# hyprland-plugins-setup - Install Hyprland plugins on first login -# Called from hyprland.conf exec-once -# -# As of Hyprland 0.54, hyprscrolling is in core. Only xtra-dispatchers -# needs to be installed via hyprpm. - -LOGFILE="$HOME/.local/var/log/hyprland-plugins-setup.log" -mkdir -p "$(dirname "$LOGFILE")" - -log() { - echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOGFILE" -} - -# Check if xtra-dispatchers already installed and enabled -if hyprpm list 2>/dev/null | grep -q "xtra-dispatchers"; then - if hyprpm list | grep -q "enabled: .*true"; then - log "Plugins already installed, loading into session" - hyprpm reload 2>&1 | tee -a "$LOGFILE" - exit 0 - fi -fi - -log "Starting Hyprland plugin setup" - -# Add hyprland-plugins repository -log "Adding hyprland-plugins repository..." -if hyprpm add https://github.com/hyprwm/hyprland-plugins 2>&1 | tee -a "$LOGFILE"; then - log "hyprland-plugins repository added" -else - log "Failed to add hyprland-plugins repository" -fi - -# Enable xtra-dispatchers (provides plugin:xtd:bringallfrom used by focus-restore) -log "Enabling xtra-dispatchers..." -if hyprpm enable xtra-dispatchers 2>&1 | tee -a "$LOGFILE"; then - log "xtra-dispatchers enabled" -else - log "Failed to enable xtra-dispatchers" -fi - -# Reload plugins into Hyprland -log "Reloading plugins..." -hyprpm reload 2>&1 | tee -a "$LOGFILE" - -log "Plugin setup complete" -notify-send "Hyprland Plugins" "Plugin setup complete" -t 3000 diff --git a/dotfiles/hyprland/.local/bin/layout-cycle b/dotfiles/hyprland/.local/bin/layout-cycle new file mode 100755 index 0000000..dcc7b6b --- /dev/null +++ b/dotfiles/hyprland/.local/bin/layout-cycle @@ -0,0 +1,35 @@ +#!/bin/sh +# Cycle Hyprland layout forward (next) or backward (prev) +# Usage: layout-cycle next | layout-cycle prev + +LAYOUTS="master scrolling monocle" +CURRENT=$(hyprctl getoption general:layout -j | jq -r '.str') +DIR="${1:-next}" + +set -- $LAYOUTS +COUNT=$# +INDEX=0 + +i=0 +for layout in $LAYOUTS; do + if [ "$layout" = "$CURRENT" ]; then + INDEX=$i + break + fi + i=$((i + 1)) +done + +if [ "$DIR" = "next" ]; then + INDEX=$(( (INDEX + 1) % COUNT )) +else + INDEX=$(( (INDEX - 1 + COUNT) % COUNT )) +fi + +i=0 +for layout in $LAYOUTS; do + if [ $i -eq $INDEX ]; then + hyprctl keyword general:layout "$layout" + break + fi + i=$((i + 1)) +done |
