# Naming workspaces with rules

**URL:** <http://forum.hypr.land/t/naming-workspaces-with-rules/2107>\
**Category:** General\
**Tags:** help\
**Created:** [August 21, 2026, 3:34am UTC](http://forum.hypr.land/t/naming-workspaces-with-rules/2107 "2026-08-21T03:34:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drone4four](http://forum.hypr.land/letter_avatar_proxy/v4/letter/d/3ec8ea/32.png) [@Drone4four](http://forum.hypr.land/u/Drone4four)\
**Post date:** [August 21, 2026, 3:34am UTC](http://forum.hypr.land/t/naming-workspaces-with-rules/2107/1 "2026-08-21T03:34:51Z")

</div>

I am trying to set persistent workspace names in my bar. Here is [the Hyprland doc for setting workspace rules](https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/). Based on this doc, I made these two attempts of which both don’t change the names of my workspaces:

```auto
hl.workspace_rule({ workspace = "1", default_name = "slider" })
hl.workspace_rule({ workspace = "2", "name:Hello"})

```

What should I really be using name a workspace?

---

<div class="post-metadata">

**Author:** ![ajgringo619](http://forum.hypr.land/user_avatar/forum.hypr.land/ajgringo619/32/1240_2.png) [@ajgringo619](http://forum.hypr.land/u/ajgringo619)\
**Post date:** [August 21, 2026, 4:26am UTC](http://forum.hypr.land/t/naming-workspaces-with-rules/2107/2 "2026-08-21T04:26:17Z")

</div>

Why don’t you think it’s working? I just ran a test, created a workspace and window rule:

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![vito](http://forum.hypr.land/user_avatar/forum.hypr.land/vito/32/1354_2.png) [@vito](http://forum.hypr.land/u/vito)\
**Post date:** [August 21, 2026, 4:32am UTC](http://forum.hypr.land/t/naming-workspaces-with-rules/2107/3 "2026-08-21T04:32:49Z")

</div>

> [@Drone4four](#):
>
> `hl.workspace_rule({ workspace = "1", default_name = "slider" })`

For me this also doesn’t work. The key seems to be using a `number` for the workspace, rather than a `string`  
So:

```lua
hl.workspace_rule({ workspace = 1, default_name = "slider" })

```
