diff --git a/.config/hypr/workspaces.lua b/.config/hypr/workspaces.lua index 8f88a8a..88168c1 100644 --- a/.config/hypr/workspaces.lua +++ b/.config/hypr/workspaces.lua @@ -22,19 +22,23 @@ local function setup_monitors() for i = 1, 5 do for j = monitor_count, 1, -1 do local monitor = monitors[j] - local workspace_id = "name:" .. workspace_map[i] .. "_" .. j - hl.notification.create({ text = workspace_id, duration = 2000 }) + -- local workspace_id = "name:" .. workspace_map[i] .. "_" .. j + local workspace_id = (i - 1) * monitor_count + j + local workspace_name = workspace_map[i] .. "_" .. j hl.workspace_rule({ - workspace = tostring(workspace_id), + workspace = workspace_id, + default_name = workspace_name, monitor = monitor.name, + default = i == 1, }) table.insert( monitor_binds, - hl.bind("SUPER + code:1" .. (i - 1), function() - hl.dsp.focus({ workspace = workspace_id }) - hl.notification.create({ text = workspace_id, duration = 2000 }) - end, { description = "Switch to workspace " .. workspace_map[i] }) + hl.bind( + "SUPER + code:1" .. (i - 1), + hl.dsp.focus({ workspace = "name:" .. workspace_name }), + { description = "Switch to workspace " .. workspace_map[i] } + ) ) end @@ -45,6 +49,7 @@ local function setup_monitors() local active_workspace_name = active_workspace.name local monitor_suffix = active_workspace_name:match("_(%d+)$") or "1" local new_workspace = "name:" .. workspace_map[i] .. "_" .. monitor_suffix + -- local new_workspace = (i - 1) * monitor_count + active_workspace.id hl.notification.create({ text = new_workspace, duration = 2000 }) hl.dispatch(hl.dsp.window.move({ workspace = new_workspace, follow = false })) end, { description = "Move window to workspace " .. workspace_map[i] }) diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 111acad..9a9a7be 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -17,33 +17,24 @@ "hyprland/workspaces": { "on-click": "activate", "format": "{icon}", + "sort-by": "id", "format-icons": { "default": "", - "1": "", - "2": "", - "3": "", - "4": "", - "5": "", - "6": "", - "7": "", - "8": "", - "9": "󱚍", - "10": "󱚍", - "name:Home_1": "", - "name:Dev_1": "", - "name:Art_1": "", - "name:Gaming_1": "", - "name:Writing_1": "󱚍", - "name:Home_2": "", - "name:Dev_2": "", - "name:Art_2": "", - "name:Gaming_2": "", - "name:Writing_2": "󱚍", + "Home_1": "", + "Dev_1": "", + "Art_1": "", + "Gaming_1": "", + "Writing_1": "󱚍", + "Home_2": "", + "Dev_2": "", + "Art_2": "", + "Gaming_2": "", + "Writing_2": "󱚍", }, "persistent-workspaces": { - "eDP-1": ["name:Home_1", "name:Dev_1", "name:Art_1", "name:Gaming_1", "name:Writing_1"], - "DP-1": ["name:Home_1", "name:Dev_1", "name:Art_1", "name:Gaming_1", "name:Writing_1"], - "DP-2": ["name:Home_2", "name:Dev_2", "name:Art_2", "name:Gaming_2", "name:Writing_2"], + "eDP-1": ["Home_1", "Dev_1", "Art_1", "Gaming_1", "Writing_1"], + "DP-1": ["Home_1", "Dev_1", "Art_1", "Gaming_1", "Writing_1"], + "DP-2": ["Home_2", "Dev_2", "Art_2", "Gaming_2", "Writing_2"], } }, "custom/station": {