Window rule for games

These are my window rules. As far as I can tell from the documentation, these are at least correct:

windowrule = content game, initialClass:^(steam_app_\d+)|(cyberpunk2077.exe)$, title:negative:|^(?i)(.*(Launcher|NetEase Game Security).*)$
windowrule = fullscreen, content:game
windowrule = immediate, content:game
windowrule = workspace 4, initialClass:steam
windowrule = workspace 2, initialClass:discord

However, when I launch Marvel Rivals from Steam, if it’s set to Borderless Windowed in-game, the window will not be full-screened.

I have a little rungame script which is this:

#!/usr/bin/env bash
HYPRGAMEMODE="$(hyprctl -j getoption animations:enabled | jq -r '.set')"

if $HYPRGAMEMODE; then
    hyprctl --batch "\
        keyword animations:enabled 0; \
        keyword animation borderangle,0: \
        keyword decoration:shadow:enabled 0;\
        keyword decoration:blur:enabled 0;\
        keyword decoration:fullscreen_opacity 1;\
        keyword general:gaps_in 0;\
        keyword general:gaps_out 0;\
        keyword general:border_size 1;\
        keyword decoration:rounding 0"
fi

systemctl --user stop kanata.service

cmd=(prime-run game-performance)

cmd+=("$@")

"${cmd[@]}"

systemctl --user start kanata.service
hyprctl reload

Does it affect how window rules are applied?

What am I doing wrong?

Setting and matching tag instead of content works. Though according to the docs content should work.

Edit: these are the rules (might be helpful):

windowrule = tag +game, initialClass:^(steam_app_\d+)|(cyberpunk2077.exe)$, title:negative:|^(?i)(.*(Launcher|NetEase Game Security).*)$
windowrule = fullscreen, tag:game
windowrule = immediate, tag:game

for static rules, content is not reflected by the time rules are applied, so they miss the change if the app didnt have content game to begin with

Why wouldn’t you just use Gamescope with it’s Fullscreen property?

I run gamescope -W 1920 -H 1080 -r 165 -f -b --force-grab-cursor – %command% on all of my games so that they run in Fullscreen. Obviously set your Width and Height to your correct screen size, and refresh rate to your display’s refresh rate.

There’s a bug with gamescope that inverts reds with blues on my games.

I like gamescope, but it’s not good enough for me just yet.

@vaxry is there a way to set the “Do not disturb” from a command?

For DE? No, you can make a feature request and I’ll add it :)

Done :)

Your link is broken.

It’s not, it just points to the forum section you don’t have access to (hyprperks)