Add a manual Game Mode Control Center tile
Turns off animations, blur, shadows and HyprGlass, switches to the performance power profile and turns on Do Not Disturb, each optional in Settings > Power. The helper journals the values it changes per Hyprland session and restores them exactly, also after a shell crash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e1ac4efe7
commit
bfbfc8961e
15 files changed
+325
-1
No files matched your search
@@ -166,6 +166,7 @@ Item {
|
||||
BluetoothService.backend = root.btBackend;
|
||||
SystemService.helper = "testing/recording_system.py";
|
||||
CaffeineService.command = ["sleep", "infinity"];
|
||||
GameModeService.helper = "testing/recording_gamemode.py";
|
||||
SystemService.refresh();
|
||||
return true;
|
||||
}
|
||||
@@ -292,6 +293,8 @@ Item {
|
||||
streams: AudioService.streams.map(n => AudioService.streamName(n)),
|
||||
streamMuted: root.streamNode.audio.muted,
|
||||
caffeine: CaffeineService.active,
|
||||
gameMode: GameModeService.active,
|
||||
gameModeApplied: GameModeService.applied,
|
||||
caffeineRunning: CaffeineService.running,
|
||||
active: ScreenService.active.name,
|
||||
screens: Quickshell.screens.map(s => s.name),
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test-only Game Mode adapter. Records requests; never calls hyprctl or D-Bus."""
|
||||
import json,os,sys
|
||||
from pathlib import Path
|
||||
base=Path(os.environ['GLASSMXRPH_SYSTEM_EVENTS']).with_suffix('.gamemode')
|
||||
req=json.loads(sys.argv[1])
|
||||
with base.open('a') as f:f.write(json.dumps(req)+'\n')
|
||||
print(json.dumps({'ok':True,'active':req.get('action')=='on'}))
|
||||
Reference in new issue
Block a user