diff options
| author | krolyxon <me@krolyxon.com> | 2026-08-14 20:25:29 +0530 |
|---|---|---|
| committer | krolyxon <me@krolyxon.com> | 2026-08-14 20:25:29 +0530 |
| commit | 94041d01c3732ccf926913afe634d1833e04dd21 (patch) | |
| tree | 0ccbe8fdcfda698c66598a799360315d01cdd812 | |
| parent | 79fb5e7ad21678a1310ee16356ca5796e4135502 (diff) | |
hyprland: add split-monitor-workspaces again
| -rw-r--r-- | .config/hypr/hyprland.lua | 21 | ||||
| -rw-r--r-- | .config/hypr/source/keybinds.lua | 22 | ||||
| -rw-r--r-- | .config/waybar/style.css | 2 | ||||
| -rwxr-xr-x | .local/bin/hypr/hypr_update_plugins.sh | 7 |
4 files changed, 17 insertions, 35 deletions
diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua index 285b3d0..e57e527 100644 --- a/.config/hypr/hyprland.lua +++ b/.config/hypr/hyprland.lua @@ -1,4 +1,3 @@ - terminal = "foot" menu = "fuzzel" browser = "librewolf" @@ -32,21 +31,11 @@ end) -- Plugins -------------------------------------------------- --- hl.config({ --- plugin = { --- hyprsplit = { --- num_workspaces = 10, --- persistent_workspaces = true, --- }, --- --- ["split-monitor-workspaces"] = { --- count = 10, --- keep_focused = true, --- enable_notifications = false, --- enable_persistent_workspaces = true, --- }, --- }, --- }) +package.path = package.path .. ";./?.lua;./?/init.lua" +smw = require("plugins.split-monitor-workspaces") +smw.setup({ + workspace_count = 10, +}) -- ----------------------------------------------------- -- SOURCE FILES diff --git a/.config/hypr/source/keybinds.lua b/.config/hypr/source/keybinds.lua index 2afeca7..b16b299 100644 --- a/.config/hypr/source/keybinds.lua +++ b/.config/hypr/source/keybinds.lua @@ -62,20 +62,14 @@ hl.bind(mainMod .. " + j", hl.dsp.window.resize({ x = 0, y = 30, relative = true -- Workspace switching -- ----------------------------------------------------- -for i = 1, 10 do - local key = i % 10 -- 10 maps to key 0 - - -- Switch to workspace - hl.bind( - mainMod .. " + " .. key, - hl.dsp.focus({ workspace = i }) - ) - - -- Move active window to workspace - hl.bind( - mainMod .. " + SHIFT + " .. key, - hl.dsp.window.move({ workspace = i, follow = false }) - ) +local mainMod = "SUPER" +for i = 1, smw.get_amount_of_workspaces() do + local n = tostring(i) + if n == "10" then n = "0" end -- Optional if you configured 10 workspaces: bind workspace 10 to SUPER + 0 + -- Switch to the Nth workspace on the currently focused monitor. + hl.bind(mainMod .. " +" .. n, smw.workspace(n)) + -- Move the active window to the Nth workspace on the currently focused monitor silently (no focus change). + hl.bind(mainMod .. " + SHIFT +" .. n, smw.move_to_workspace_silent(n)) end -- Example special workspace (scratchpad) diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 5dc9387..212be7c 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -67,7 +67,7 @@ window#waybar.hidden { /* non-empty persistent workspaces */ #workspaces button.persistent { - background-color: @color1; + background-color: @color0; } diff --git a/.local/bin/hypr/hypr_update_plugins.sh b/.local/bin/hypr/hypr_update_plugins.sh index d280c9c..5edbaed 100755 --- a/.local/bin/hypr/hypr_update_plugins.sh +++ b/.local/bin/hypr/hypr_update_plugins.sh @@ -1,6 +1,5 @@ #!/bin/env bash -hyprpm update -hyprpm add https://github.com/Duckonaut/split-monitor-workspaces -hyprpm enable split-monitor-workspaces -hyprpm reload +mkdir -p ~/.config/hypr/plugins +cd ~/.config/hypr/plugins +git clone https://github.com/zjeffer/split-monitor-workspaces |
