diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1af07c1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ansible/roles/hyprland/tasks/main.yml b/ansible/roles/hyprland/tasks/main.yml index 97da516..280261f 100644 --- a/ansible/roles/hyprland/tasks/main.yml +++ b/ansible/roles/hyprland/tasks/main.yml @@ -67,6 +67,7 @@ - { src: 'hyprland.conf.j2', dest: 'hypr/hyprland.conf' } - { src: 'hyprlock.conf.j2', dest: 'hypr/hyprlock.conf' } - { src: 'hypridle.conf.j2', dest: 'hypr/hypridle.conf' } + - { src: 'hyprpaper.conf.j2', dest: 'hypr/hyprpaper.conf' } - { src: 'waybar_config.j2', dest: 'waybar/config' } - { src: 'waybar_style.css.j2', dest: 'waybar/style.css' } - { src: 'dunstrc.j2', dest: 'dunst/dunstrc' } diff --git a/ansible/roles/hyprland/templates/hyprland.conf.j2 b/ansible/roles/hyprland/templates/hyprland.conf.j2 index 5ec64a4..a2b8d96 100644 --- a/ansible/roles/hyprland/templates/hyprland.conf.j2 +++ b/ansible/roles/hyprland/templates/hyprland.conf.j2 @@ -80,6 +80,12 @@ bind = $mainMod, L, exec, hyprlock # Focus bind = $mainMod, left, movefocus, l + +# Workspace to monitor pinning +workspace = 1, monitor:DP-1, default:true +workspace = 2, monitor:DVI-D-1, default:true +workspace = 3, monitor:HDMI-A-1, default:true + bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d diff --git a/ansible/roles/hyprland/templates/hyprpaper.conf.j2 b/ansible/roles/hyprland/templates/hyprpaper.conf.j2 new file mode 100644 index 0000000..d28f8e0 --- /dev/null +++ b/ansible/roles/hyprland/templates/hyprpaper.conf.j2 @@ -0,0 +1,4 @@ +preload=/usr/share/wallpapers/Next/contents/images/5120x2880.png +wallpaper=DP-1,/usr/share/wallpapers/Next/contents/images/5120x2880.png +wallpaper=HDMI-A-1,/usr/share/wallpapers/Next/contents/images/5120x2880.png +wallpaper=DVI-D-1,/usr/share/wallpapers/Next/contents/images/5120x2880.png diff --git a/ansible/vars/secrets.yml b/ansible/vars/secrets.yml new file mode 100644 index 0000000..6aff054 --- /dev/null +++ b/ansible/vars/secrets.yml @@ -0,0 +1,6 @@ +--- +# Minimal placeholder so ansible/workstation.yml `vars_files` loads cleanly. +# The `system-upgrade` role does not reference any secrets. +# To add real secrets, vault-encrypt this file: +# ansible-vault encrypt ansible/vars/secrets.yml +# and provide the password via `--vault-password-file ansible/vault_password`. diff --git a/scripts/realign-workspaces.sh b/scripts/realign-workspaces.sh new file mode 100644 index 0000000..7051730 --- /dev/null +++ b/scripts/realign-workspaces.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# Realign Hyprland workspaces to their configured monitors. +# Run this after changing monitor layout or workspace rules in hyprland.conf. +# Workspace pinning rules are NOT retroactive on reload. +# +# Current layout (3 monitors): +# workspace 1-3 -> DP-1 (left, TERRA 2560x1440@144) +# workspace 4-6 -> DVI-D-1 (center, BenQ 1920x1080@60, portrait) +# workspace 7-9 -> HDMI-A-1 (right, TERRA 2560x1440@144) + +set -euo pipefail + +# Check we're running inside Hyprland +if ! command -v hyprctl &>/dev/null; then + echo "ERROR: hyprctl not found. Is Hyprland installed?" >&2 + exit 1 +fi + +if [ -z "${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then + echo "ERROR: Not running inside a Hyprland session." >&2 + exit 1 +fi + +echo "Realigning Hyprland workspaces to monitors..." + +# Move workspaces 1-3 to left monitor (DP-1) +for ws in 1 2 3; do + echo " Moving workspace $ws -> DP-1" + hyprctl dispatch moveworkspacetomonitor "$ws" DP-1 +done + +# Move workspaces 4-6 to center monitor (DVI-D-1) +for ws in 4 5 6; do + echo " Moving workspace $ws -> DVI-D-1" + hyprctl dispatch moveworkspacetomonitor "$ws" DVI-D-1 +done + +# Move workspaces 7-9 to right monitor (HDMI-A-1) +for ws in 7 8 9; do + echo " Moving workspace $ws -> HDMI-A-1" + hyprctl dispatch moveworkspacetomonitor "$ws" HDMI-A-1 +done + +sleep 1 + +# Verify +echo "" +echo "Current workspace assignments:" +hyprctl workspaces -j 2>/dev/null | jq -r \ + '.[] | " ws\(.name) -> \(.monitor) (\(.windows) window(s))"' 2>/dev/null \ + || echo " (jq parse failed, run 'hyprctl workspaces' manually)" + +echo "" +echo "Configured pinning rules:" +hyprctl workspacerules -j 2>/dev/null | jq -r \ + '.[] | " ws\(.workspaceString) -> \(.monitor)"' 2>/dev/null \ + || echo " (jq parse failed, run 'hyprctl workspacerules' manually)" + +echo "" +echo "Done. Workspaces realigned."