# Gamemode Script in new Lua Syntax

**URL:** <http://forum.hypr.land/t/gamemode-script-in-new-lua-syntax/2119>\
**Category:** Bugs / FRs / Support\
**Tags:** question, help, hyprland, config, other\
**Created:** [August 27, 2026, 4:21pm UTC](http://forum.hypr.land/t/gamemode-script-in-new-lua-syntax/2119 "2026-08-27T16:21:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![4ctiv](http://forum.hypr.land/letter_avatar_proxy/v4/letter/4/65b543/32.png) [@4ctiv](http://forum.hypr.land/u/4ctiv)\
**Post date:** [August 27, 2026, 4:21pm UTC](http://forum.hypr.land/t/gamemode-script-in-new-lua-syntax/2119/1 "2026-08-27T16:21:25Z")

</div>

> **Hyprland version**
>
> ```auto
> Hyprland 0.56.2 built from branch v0.56.2 at commit efb50993780079460b0cbed1363e2166a2de1d9f clean ([gha] Nix: update inputs).Date: Wed Aug 5 14:13:21 2026Tag: v0.56.2, commits: 7661
> 
> Libraries:Hyprgraphics: built against 0.5.1, system has 0.5.1Hyprutils: built against 0.14.0, system has 0.14.1Hyprcursor: built against 0.1.13, system has 0.1.13Hyprlang: built against 0.6.8, system has 0.6.8Aquamarine: built against 0.14.0, system has 0.14.0
> 
> Version ABI string: efb50993780079460b0cbed1363e2166a2de1d9f_aq_0.14_hu_0.14_hg_0.5_hc_0.1_hlg_0.6no flags were set
> 
> ```

## Describe your issue / feature…

```bash
hyprctl --batch "\
    eval hl.config({'\
      animations = {\
        enabled = false,\
        borderangle = { enabled = false }\
      },\
      decoration = {\
        shadow = { enabled = false },\
        blur = { enabled = false },\
        active_opacity = 1,\
        inactive_opacity = 1,\
        fullscreen_opacity = 1,\
        rounding = 0,\
      },\
      general = {\
        gaps_in = 0,\
        gaps_out = 0,\
        border_size = 1\
      }'\
    });"

```

I want to transfer the (old wiki) gamemode script to lua but I can not seem to get this right.  
The above batch command executes with ok but does not actually change anything (blur and window borders are still animated/active).

If I execute the below oneliner it does stop the window animations and would work as expected.  
``hyprctl eval 'hl.config({ animations = { enabled = false } })``

What I am doing wrong ?  
I supsect it is something with the multiline string.

System Info:  
Operating System: Arch  
LinuxKernel: Linux 7.1.8-arch1-3  
Architecture: x86-64

---

<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 28, 2026, 4:56am UTC](http://forum.hypr.land/t/gamemode-script-in-new-lua-syntax/2119/2 "2026-08-28T04:56:15Z")

</div>

- First of all, because of the way you are quoting the lua you don’t need all those backslashes. They might cause problems.
- Second, I find it easier to use eval directly, as i always get weird errors that i cant work out when trying to `--batch`
- Third, the way to configure animations has now [changed](https://wiki.hypr.land/0.56.0/Configuring/Basics/Variables/#animations), and so you should probably remove the borderangle part and replace it with the new style as a second lua command in the eval.

So try this:

```lua
hyprctl eval 'hl.config({
      animations = {
        enabled = false,
      },
      decoration = {
        shadow = { enabled = false },
        blur = { enabled = false },
        active_opacity = 1,
        inactive_opacity = 1,
        fullscreen_opacity = 1,
        rounding = 0,
      },
      general = {
        gaps_in = 0,
        gaps_out = 0,
        border_size = 1
      }
    });
hl.animation({ leaf = "borderangle", enabled = false})'

```

---

<div class="post-metadata">

**Author:** ![4ctiv](http://forum.hypr.land/letter_avatar_proxy/v4/letter/4/65b543/32.png) [@4ctiv](http://forum.hypr.land/u/4ctiv)\
**Post date:** [August 31, 2026, 12:59pm UTC](http://forum.hypr.land/t/gamemode-script-in-new-lua-syntax/2119/3 "2026-08-31T12:59:21Z")

</div>

> [@vito](#):
>
> ```auto
> hyprctl eval 'hl.config({
> animations = {
> enabled = false,
> },
> decoration = {
> shadow = { enabled = false },
> blur = { enabled = false },
> active_opacity = 1,
> inactive_opacity = 1,
> fullscreen_opacity = 1,
> rounding = 0,
> },
> general = {
> gaps_in = 0,
> gaps_out = 0,
> border_size = 1
> }
> });
> hl.animation({ leaf = "borderangle", enabled = false})'
> 
> ```

Hi,

sorry for the late reply, this works wonderfully ;)

Thx!

Marking as solved.

This is the current gamemode script I use:

```bash
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if \["${HYPRGAMEMODE,,}" == 'true' \] ; then
hyprctl eval 'hl.config({
animations = {
enabled = false,
},
decoration = {
shadow = { enabled = false },
blur = { enabled = false },
active_opacity = 1,
inactive_opacity = 1,
fullscreen_opacity = 1,
rounding = 0,
},
general = {
gaps_in = 0,
gaps_out = 0,
border_size = 1
}
});
hl.animation({ leaf = "borderangle", enabled = false})'
hyprctl hyprsunset temperature identitiy # remove blue light filter
hyprctl notify 1 5000 "rgb(ff1ea3)" "Gamemode \[ON\]"
#killall waybar
exit 0
else
hyprctl notify 1 5000 "rgb(ff1ea3)" "Gamemode \[OFF\]"
hyprctl eval 'hl.config({
animations = {
enabled = true,
},});'
hyprctl reload
\[! -z "$(ps -x | awk 'match($5,/waybar/) {print $5}')" \] || (nohup waybar >/dev/null 2>/dev/null & disown %)
exit 0
fi
exit 1

```
