[hyprland] Uses mainline packages, updates config as necessary

This commit is contained in:
2025-04-24 10:56:32 -07:00
parent 5645867776
commit 771c3618bc
10 changed files with 104 additions and 573 deletions

View File

@@ -30,7 +30,7 @@
)
(defwindow primary-statusbar
:monitor '[ "<primary>", "DP-2", 0 ]'
:monitor '[ "<primary>", "DP-2", 1 ]'
:geometry (geometry
:x "0%"
:y "0%"

View File

@@ -18,15 +18,17 @@ list_workspaces() {
# 1. Select only workspaces on the current monitor.
# 2. Remove duplicates (might be a bug with split-monitor-workspaces
# 3. Create the output structure
# 4. Select interesting entries, ones that are focused, active or have windows
# 5. Sort
hyprctl workspaces -j | jq --compact-output --monochrome-output "
map( select( .monitor | contains(\"${monitor}\") ) ) |
reduce .[] as \$item ( []; if any( .[]; .id == \$item.id ) then . else . + [\$item] end ) |
map( { id: .id, name, active: (.id == ${active}), focused: (.id == ${focused}), has_windows: (.lastwindowtitle != \"\") } ) |
map( select (.active or .focused or .has_windows)) |
sort_by(.id)
"
# Other lines that may be useful in the future
# - Select interesting entries, ones that are focused, active or have windows
# map( select (.active or .focused or .has_windows))
}
monitor=$1

View File

@@ -47,7 +47,7 @@
)
(defwindow secondary-statusbar
:monitor '[ "<secondary>", "DP-1" ]'
:monitor '[ "<secondary>", "DP-1", "0" ]'
:geometry (geometry
:x "0px"
:y "0px"

View File

@@ -1,4 +1,4 @@
{ pkgs, inputs, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs; [
hyprlock # lock screen
@@ -12,8 +12,10 @@
wayland.windowManager.hyprland = {
enable = true;
plugins = [
inputs.hy3.packages.${pkgs.system}.hy3
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
# https://github.com/outfoxxed/hy3
pkgs.hyprlandPlugins.hy3
# https://github.com/shezdy/hyprsplit
pkgs.hyprlandPlugins.hyprsplit
];
# Disable systemd because it conflicts with UWSM
@@ -246,12 +248,9 @@
};
};
split-monitor-workspaces = {
# Keep the focus when reloading.
keep_focused = true;
# Allocate persistent workspaces. If this is off there are some bugs
# when trying to move to a new workspace if it doesn't already exist.
enable_persistent_workspaces = true;
hyprsplit = {
num_workspaces = 10;
persistent_workspaces = true;
};
};
@@ -326,35 +325,39 @@
"$mainMod, right, hy3:movefocus, r"
"$mainMod, up, hy3:movefocus, u"
"$mainMod, down, hy3:movefocus, d"
"$mainMod, r, focusmonitor, l"
"$mainMod, s, focusmonitor, r"
"$mainMod + SHIFT, left, hy3:movewindow, l"
"$mainMod + SHIFT, right, hy3:movewindow, r"
"$mainMod + SHIFT, up, hy3:movewindow, u"
"$mainMod + SHIFT, down, hy3:movewindow, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, split-workspace, 1"
"$mainMod, 2, split-workspace, 2"
"$mainMod, 3, split-workspace, 3"
"$mainMod, 4, split-workspace, 4"
"$mainMod, 5, split-workspace, 5"
"$mainMod, 6, split-workspace, 6"
"$mainMod, 7, split-workspace, 7"
"$mainMod, 8, split-workspace, 8"
"$mainMod, 9, split-workspace, 9"
"$mainMod, 0, split-workspace, 10"
"$mainMod, 1, split:workspace, 1"
"$mainMod, 2, split:workspace, 2"
"$mainMod, 3, split:workspace, 3"
"$mainMod, 4, split:workspace, 4"
"$mainMod, 5, split:workspace, 5"
"$mainMod, 6, split:workspace, 6"
"$mainMod, 7, split:workspace, 7"
"$mainMod, 8, split:workspace, 8"
"$mainMod, 9, split:workspace, 9"
"$mainMod, 0, split:workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, split-movetoworkspace, 1, follow"
"$mainMod SHIFT, 2, split-movetoworkspace, 2, follow"
"$mainMod SHIFT, 3, split-movetoworkspace, 3, follow"
"$mainMod SHIFT, 4, split-movetoworkspace, 4, follow"
"$mainMod SHIFT, 5, split-movetoworkspace, 5, follow"
"$mainMod SHIFT, 6, split-movetoworkspace, 6, follow"
"$mainMod SHIFT, 7, split-movetoworkspace, 7, follow"
"$mainMod SHIFT, 8, split-movetoworkspace, 8, follow"
"$mainMod SHIFT, 9, split-movetoworkspace, 9, follow"
"$mainMod SHIFT, 0, split-movetoworkspace, 10, follow"
# Note: using hy3:movetoworkspace instead of split:movetoworkspace.
# The plugins are compatible.
"$mainMod SHIFT, 1, hy3:movetoworkspace, 1, follow"
"$mainMod SHIFT, 2, hy3:movetoworkspace, 2, follow"
"$mainMod SHIFT, 3, hy3:movetoworkspace, 3, follow"
"$mainMod SHIFT, 4, hy3:movetoworkspace, 4, follow"
"$mainMod SHIFT, 5, hy3:movetoworkspace, 5, follow"
"$mainMod SHIFT, 6, hy3:movetoworkspace, 6, follow"
"$mainMod SHIFT, 7, hy3:movetoworkspace, 7, follow"
"$mainMod SHIFT, 8, hy3:movetoworkspace, 8, follow"
"$mainMod SHIFT, 9, hy3:movetoworkspace, 9, follow"
"$mainMod SHIFT, 0, hy3:movetoworkspace, 10, follow"
# These don't take monitor numbers, but rather differences. It's next/prev but
# it'll always just move it to the other monitor
"$mainMod SHIFT, r, split-changemonitor, prev"
"$mainMod SHIFT, r, movewindow, mon:+1"
];
# m = mouse bindings
@@ -416,16 +419,26 @@
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
workspace = [
"11, defaultName:1"
"12, defaultName:2"
"13, defaultName:3"
"14, defaultName:4"
"15, defaultName:5"
"16, defaultName:6"
"17, defaultName:7"
"18, defaultName:8"
"19, defaultName:9"
"20, defaultName:10"
"1, defaultName:L1"
"2, defaultName:L2"
"3, defaultName:L3"
"4, defaultName:L4"
"5, defaultName:L5"
"6, defaultName:L6"
"7, defaultName:L7"
"8, defaultName:L8"
"9, defaultName:L9"
"10, defaultName:L10"
"11, defaultName:R1"
"12, defaultName:R2"
"13, defaultName:R3"
"14, defaultName:R4"
"15, defaultName:R5"
"16, defaultName:R6"
"17, defaultName:R7"
"18, defaultName:R8"
"19, defaultName:R9"
"20, defaultName:R10"
];
};
};