Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions default/hypr/apps/steam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ o.window("steam", { float = true, idle_inhibit = "fullscreen" })
o.window({ class = "steam", title = "Steam" }, { center = true, size = { 1100, 700 } })
o.window("steam.*", { tag = "-default-opacity", opacity = "1 1" })
o.window({ class = "steam", title = "Friends List" }, { size = { 460, 800 } })

-- A running game is a separate window from the Steam client above, and Steam
-- classes it steam_app_<appid> (both native and Proton titles). Without this,
-- the screensaver and lock still engage during play since controller/gamepad
-- input doesn't register as activity.
o.window("^steam_app_[0-9]+$", { idle_inhibit = "fullscreen" })
15 changes: 15 additions & 0 deletions test/shell.d/steam-idle-inhibit-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

steam_rules="$ROOT/default/hypr/apps/steam.lua"

# Steam classes the running game's own window steam_app_<appid>, separate from
# the Steam client window matched above it. Without this rule the screensaver
# and lock still engage during play, since gamepad input doesn't register as
# activity.
rg -q '^o\.window\("\^steam_app_\[0-9\]\+\$", \{ idle_inhibit = "fullscreen" \}\)$' "$steam_rules" ||
fail "Steam game windows (steam_app_<appid>) inhibit idle while fullscreen"
pass "Steam game windows (steam_app_<appid>) inhibit idle while fullscreen"