# Lua: Start program at boot, but have it minimized?

**URL:** <http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571>\
**Category:** General\
**Tags:** help\
**Created:** [May 12, 2026, 10:55pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571 "2026-05-12T22:55:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitzie](http://forum.hypr.land/user_avatar/forum.hypr.land/bitzie/32/1319_2.png) [@bitzie](http://forum.hypr.land/u/bitzie)\
**Post date:** [May 12, 2026, 10:55pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/1 "2026-05-12T22:55:36Z")

</div>

With my old hyprlang config, I had it set to open my music player (Tauon) on boot, but have it minimized with the following line:

exec-once = [workspace 2; silent] tauonmb

I’m having a brutal time trying to figure out how to accomplish this in Lua. I’m not even sure how many different things I’ve tried. Anyone have a solution?

---

<div class="post-metadata">

**Author:** ![tekstryder](http://forum.hypr.land/user_avatar/forum.hypr.land/tekstryder/32/258_2.png) [@tekstryder](http://forum.hypr.land/u/tekstryder)\
**Post date:** [May 12, 2026, 11:13pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/2 "2026-05-12T23:13:58Z")

</div>

So what have you tried when using Lua that’s not working?

- [Dispatchers – Hyprland Wiki](https://wiki.hypr.land/Configuring/Basics/Dispatchers/#dispatchers-1)

`hl.exec_cmd()` takes rules.

---

<div class="post-metadata">

**Author:** ![bitzie](http://forum.hypr.land/user_avatar/forum.hypr.land/bitzie/32/1319_2.png) [@bitzie](http://forum.hypr.land/u/bitzie)\
**Post date:** [May 13, 2026, 12:35am UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/3 "2026-05-13T00:35:48Z")

</div>

Right now I have two programs I want to start up like this: Steam and Tauon. Steam works perfectly with:

hl.exec\_cmd(“[workspace 2] steam -silent”)

But if I use the same structure for Tauon, it doesn’t work. Tauon opens, but full size on my secondary monitor which is set to Workspace 2. At this point, I can’t remember the other lines I’ve tried because I do some searching, find a possible solution, try it, and if it doesn’t work, I simply delete it.

---

<div class="post-metadata">

**Author:** ![tekstryder](http://forum.hypr.land/user_avatar/forum.hypr.land/tekstryder/32/258_2.png) [@tekstryder](http://forum.hypr.land/u/tekstryder)\
**Post date:** [May 13, 2026, 12:40am UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/4 "2026-05-13T00:40:12Z")

</div>

I don’t know anything about either of those apps (is `-silent` a flag they both accept?), or your config, or desired workspaces, but how about something like…

```lua
hl.on("hyprland.start", function ()
    hl.exec_cmd("tauonmb", { workspace = "1" })
    hl.exec_cmd("steam", { workspace = "2" })
end)

```

> **[How do I autostart my favorite apps? - FAQ](https://wiki.hypr.land/FAQ/#how-do-i-autostart-my-favorite-apps)**
>
> If you are getting an error like: | The documentation for Hyprland.

---

<div class="post-metadata">

**Author:** ![bitzie](http://forum.hypr.land/user_avatar/forum.hypr.land/bitzie/32/1319_2.png) [@bitzie](http://forum.hypr.land/u/bitzie)\
**Post date:** [May 13, 2026, 1:36am UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/5 "2026-05-13T01:36:47Z")

</div>

That works as far as opening the apps to a specific workspace, but not whether they’re minimized or not.

It looks like the -silent flag only works with Steam. So far, it’s looking like starting Tauon minimized does not want to work at the moment unfortunately. It’s not really a big deal as I don’t actually reboot all that often, but just one of the last annoyances left after converting over to lua.

---

<div class="post-metadata">

**Author:** ![schnakus](http://forum.hypr.land/letter_avatar_proxy/v4/letter/s/4491bb/32.png) [@schnakus](http://forum.hypr.land/u/schnakus)\
**Post date:** [May 14, 2026, 8:01am UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/6 "2026-05-14T08:01:53Z")

</div>

Do you mean that they then are in tray? I belief, only some apps support minimizing them. I like to put music in its own special workspace, so you can access it from any workspace, and it’s kinda like it’s minimized.

```auto
hl.unbind("SUPER + M") --as this normally quits hyprland
hl.bind("SUPER + M", hl.dsp.workspace.toggle_special("music"))
hl.bind("SUPER + SHIFT + M", hl.dsp.window.move({ workspace = "special:music" })) --not necessary

```

and then in hl.on() sth like:

```auto
hl.dsp.exec_cmd("tauonmb", { workspace = "special:music silent" })

```

---

<div class="post-metadata">

**Author:** ![fishtronics](http://forum.hypr.land/letter_avatar_proxy/v4/letter/f/6bbea6/32.png) [@fishtronics](http://forum.hypr.land/u/fishtronics)\
**Post date:** [May 15, 2026, 8:35pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/7 "2026-05-15T20:35:33Z")

</div>

The lua version of `[workspace 2 silent]` is

```lua
hl.on("hyprland.start", function ()
    hl.exec_cmd("tauonmb", { workspace = "2 silent" })
end)

```

---

<div class="post-metadata">

**Author:** ![bitzie](http://forum.hypr.land/user_avatar/forum.hypr.land/bitzie/32/1319_2.png) [@bitzie](http://forum.hypr.land/u/bitzie)\
**Post date:** [May 15, 2026, 9:14pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/8 "2026-05-15T21:14:58Z")

</div>

Unfortunately, this didn’t work. Tauon starts on the correct monitor, but remains visible. I think that at the moment, Tauon simply won’t play nice with the lua config in terms of opening silently. Using Claude (I know.. I know..) I did get the following to work. It’s not 100% the way I want as Tauon is visible for a moment on boot, but at least it does get closed properly and remains in the tray.

`hl.exec_cmd(“tauonmb”, { workspace = “2” })`  
`hl.timer(function()`  
`hl.exec_cmd(“pkill -f tauonmb”)`  
`end, { timeout = 1000, type = “oneshot” })`

---

<div class="post-metadata">

**Author:** ![Ergon](http://forum.hypr.land/user_avatar/forum.hypr.land/ergon/32/1172_2.png) [@Ergon](http://forum.hypr.land/u/Ergon)\
**Post date:** [May 16, 2026, 10:33am UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/9 "2026-05-16T10:33:16Z")

</div>

Since hyprland doens’t have a taskbar or anything like that, it has no concept of “minimized”. It’s a window manager, so it only displays windows. If the application say: Hey i want a window, and rule say; windows go to workspace 2. It will put window on workspace 2.

Not a hyprland problem, but a application problem. ( which is why steam -silent works, since that doesn’t say hey i want a window )

Edit: And i should clarify, the silent in the windowrule is just telling hyprland; “when window open, don’t focus that workspace”, it has been renamed to follow to be more descriptive.

---

<div class="post-metadata">

**Author:** ![bitzie](http://forum.hypr.land/user_avatar/forum.hypr.land/bitzie/32/1319_2.png) [@bitzie](http://forum.hypr.land/u/bitzie)\
**Post date:** [May 16, 2026, 5:33pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/10 "2026-05-16T17:33:14Z")

</div>

I get that, but the odd thing is that prior to 55, it worked perfectly; launching Tauon on boot, but minimizing, or I guess more accurately, closing it immediately, making it available in Noctalia’s tray.

---

<div class="post-metadata">

**Author:** ![Yngviwarr](http://forum.hypr.land/user_avatar/forum.hypr.land/yngviwarr/32/1398_2.png) [@Yngviwarr](http://forum.hypr.land/u/Yngviwarr)\
**Post date:** [June 18, 2026, 6:52pm UTC](http://forum.hypr.land/t/lua-start-program-at-boot-but-have-it-minimized/1571/11 "2026-06-18T18:52:10Z")

</div>

Hey thanks, I was looking for this exactly, the way wiki explains operators makes little sense to me practically…
