I am trying to set persistent workspace names in my bar. Here is the Hyprland doc for setting workspace rules . Based on this doc, I made these two attempts of which both don’t change the names of my workspaces:
hl.workspace_rule({ workspace = "1", default_name = "slider" })
hl.workspace_rule({ workspace = "2", "name:Hello"})
What should I really be using name a workspace?
Why don’t you think it’s working? I just ran a test, created a workspace and window rule:
hl.workspace_rule({ workspace = "21", monitor = "DP-3", default_name = "testing" })
hl.window_rule({
name = "testing",
match = { class = "org.kde.dolphin" },
workspace = 21,
})
Dolphin started in workspace 21, as expected, hyprctl clients returned this:
Window 560710a88cd0 -> /home/ajgringo619/Documents/My Games/Grim Dawn/.softcore — Dolphin:
mapped: 1
hidden: 0
visible: 1
acceptsInput: 1
at: 2380,140
size: 1000,800
workspace: 21 (testing)
floating: 1
monitor: 0
class: org.kde.dolphin
title: /home/ajgringo619/Documents/My Games/Grim Dawn/.softcore — Dolphin
initialClass: org.kde.dolphin
initialTitle: /home/ajgringo619/Documents/My Games/Grim Dawn/.softcore — Dolphin
pid: 399443
xwayland: 0
pinned: 0
pinFullscreened: 0
fullscreen: 0
fullscreenClient: 0
fullscreenHandler: default
allowedOverFullscreen: 1
grouped: 0
tags:
swallowing: 0
focusHistoryID: 1
inhibitingIdle: 0
xdgTag:
xdgDescription:
contentType: none
tearingHint: 0
stableID: 180000f2
Workspace 21, name = testing.
vito
August 21, 2026, 4:32am
3
For me this also doesn’t work. The key seems to be using a number for the workspace, rather than a string
So:
hl.workspace_rule({ workspace = 1, default_name = "slider" })