# Special workspace overlay

**URL:** <http://forum.hypr.land/t/special-workspace-overlay/2096>\
**Category:** Bugs / FRs / Support\
**Tags:** question, help, hyprland, config, window-management\
**Created:** [August 16, 2026, 3:35am UTC](http://forum.hypr.land/t/special-workspace-overlay/2096 "2026-08-16T03:35:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaydenJN](http://forum.hypr.land/letter_avatar_proxy/v4/letter/c/e68b1a/32.png) [@CaydenJN](http://forum.hypr.land/u/CaydenJN)\
**Post date:** [August 16, 2026, 3:35am UTC](http://forum.hypr.land/t/special-workspace-overlay/2096/1 "2026-08-16T03:35:46Z")

</div>

> **Hyprland version**
>
> Hyprland 0.56.2

On my original hyprlang config I used this syntax:

```auto
windowrule = workspace special:spotify, match:class ^(spotify|Spotify)$

```

and

```auto
bind = $mainMod, S, exec, sh -c 'if ! pgrep -x spotify-launcher >/dev/null; then spotify-launcher & fi; hyprctl dispatch togglespecialworkspace spotify'

```

making a special workspace the overlayed spotify on my currently open workspace without closing it, but on the new lua config when trying to replicate this:

```auto
hl.bind(
    mainMod .. " + S",
    hl.dsp.exec_cmd(
        "pgrep -x spotify-launcher >/dev/null || spotify-launcher; hyprctl dispatch togglespecialworkspace spotify"
    )
)

```

```auto
hl.window_rule({
    name = "spotify-special-workspace",
    match = {
        class = "^(spotify|Spotify)$"
    },
    workspace = "special:spotify"
})

```

it opens the special workspace and closes the currently open window.

does anyone know what I did wrong or how to fix it?

---

<div class="post-metadata">

**Author:** ![vaxry](http://forum.hypr.land/user_avatar/forum.hypr.land/vaxry/32/3_2.png) [@vaxry](http://forum.hypr.land/u/vaxry)\
**Post date:** [August 17, 2026, 7:27pm UTC](http://forum.hypr.land/t/special-workspace-overlay/2096/2 "2026-08-17T19:27:53Z")

</div>

> [@CaydenJN](#):
>
> `hyprctl dispatch togglespecialworkspace spotify`

that doesn’t work in lua. With lua, `dispatch` is a shorthand for `eval hl.dispatch(...)`. :)

---

<div class="post-metadata">

**Author:** ![CaydenJN](http://forum.hypr.land/letter_avatar_proxy/v4/letter/c/e68b1a/32.png) [@CaydenJN](http://forum.hypr.land/u/CaydenJN)\
**Post date:** [August 18, 2026, 12:34pm UTC](http://forum.hypr.land/t/special-workspace-overlay/2096/3 "2026-08-18T12:34:47Z")

</div>

Thank you vaxry 👍, I also realized that mainMod + C was a fallback/default kill window command so changing the bind fixed the window closing problem.
