Krolyxon
Commit 94041d0

Branches

Refs →

aurora94041d0

hyprland: add split-monitor-workspaces again

Author
krolyxon
Date
2026-08-14 20:25 +0530
Parent
79fb5e7
Commit
94041d01c3732ccf926913afe634d1833e04dd21

+17 −35

4 files changed

  1. M .config/hypr/hyprland.lua +5 −16
  2. M .config/hypr/source/keybinds.lua +8 −14
  3. M .config/waybar/style.css +1 −1
  4. M .local/bin/hypr/hypr_update_plugins.sh +3 −4
M .config/hypr/hyprland.lua View
@@ -1,4 +1,3 @@
1−
21 terminal = "foot"
32 menu = "fuzzel"
43 browser = "librewolf"
@@ -32,21 +31,11 @@ end)
3231 -- Plugins
3332 --------------------------------------------------
3433
35−-- hl.config({
36−-- plugin = {
37−-- hyprsplit = {
38−-- num_workspaces = 10,
39−-- persistent_workspaces = true,
40−-- },
41−--
42−-- ["split-monitor-workspaces"] = {
43−-- count = 10,
44−-- keep_focused = true,
45−-- enable_notifications = false,
46−-- enable_persistent_workspaces = true,
47−-- },
48−-- },
49−-- })
34+package.path = package.path .. ";./?.lua;./?/init.lua"
35+smw = require("plugins.split-monitor-workspaces")
36+smw.setup({
37+ workspace_count = 10,
38+})
5039
5140 -- -----------------------------------------------------
5241 -- SOURCE FILES
M .config/hypr/source/keybinds.lua View
@@ -62,20 +62,14 @@ hl.bind(mainMod .. " + j", hl.dsp.window.resize({ x = 0, y = 30, relative = true
6262 -- Workspace switching
6363 -- -----------------------------------------------------
6464
65−for i = 1, 10 do
66− local key = i % 10 -- 10 maps to key 0
67−
68− -- Switch to workspace
69− hl.bind(
70− mainMod .. " + " .. key,
71− hl.dsp.focus({ workspace = i })
72− )
73−
74− -- Move active window to workspace
75− hl.bind(
76− mainMod .. " + SHIFT + " .. key,
77− hl.dsp.window.move({ workspace = i, follow = false })
78− )
65+local mainMod = "SUPER"
66+for i = 1, smw.get_amount_of_workspaces() do
67+ local n = tostring(i)
68+ if n == "10" then n = "0" end -- Optional if you configured 10 workspaces: bind workspace 10 to SUPER + 0
69+ -- Switch to the Nth workspace on the currently focused monitor.
70+ hl.bind(mainMod .. " +" .. n, smw.workspace(n))
71+ -- Move the active window to the Nth workspace on the currently focused monitor silently (no focus change).
72+ hl.bind(mainMod .. " + SHIFT +" .. n, smw.move_to_workspace_silent(n))
7973 end
8074
8175 -- Example special workspace (scratchpad)
M .config/waybar/style.css View
@@ -67,7 +67,7 @@ window#waybar.hidden {
6767
6868 /* non-empty persistent workspaces */
6969 #workspaces button.persistent {
70− background-color: @color1;
70+ background-color: @color0;
7171 }
7272
7373
M .local/bin/hypr/hypr_update_plugins.sh View
@@ -1,6 +1,5 @@
11 #!/bin/env bash
22
3−hyprpm update
4−hyprpm add https://github.com/Duckonaut/split-monitor-workspaces
5−hyprpm enable split-monitor-workspaces
6−hyprpm reload
3+mkdir -p ~/.config/hypr/plugins
4+cd ~/.config/hypr/plugins
5+git clone https://github.com/zjeffer/split-monitor-workspaces