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
@@ -55,6 +55,13 @@ with tempfile.TemporaryDirectory(prefix='glassmxrph-controls-') as tmp:
|
||||
assert ipc('controlTest','rightClick','outputTile');wait(lambda:not state()['extras'].get('output',0),'Sound folds back')
|
||||
assert ipc('controlTest','click','caffeineToggle');wait(lambda:state()['caffeine'] and state()['caffeineRunning'],'Caffeine on')
|
||||
assert ipc('controlTest','click','caffeineToggle');wait(lambda:not state()['caffeine'] and not state()['caffeineRunning'],'Caffeine off')
|
||||
# Game Mode runs its helper on and off (recorded, never the real compositor).
|
||||
gm=events.with_suffix('.gamemode')
|
||||
assert ipc('controlTest','click','gameModeToggle');wait(lambda:state()['gameModeApplied'],'Game Mode on')
|
||||
wait(lambda:gm.exists() and json.loads(gm.read_text().splitlines()[-1])['action']=='on','Game Mode helper on')
|
||||
assert ipc('controlTest','checked','gameModeToggle')
|
||||
assert ipc('controlTest','click','gameModeToggle');wait(lambda:not state()['gameMode'] and not state()['gameModeApplied'],'Game Mode off')
|
||||
wait(lambda:json.loads(gm.read_text().splitlines()[-1])['action']=='off','Game Mode helper off')
|
||||
assert ipc('controlTest','click','wifiToggle');wait(lambda:not state()['wifi'],'Wi-Fi toggle')
|
||||
assert ipc('controlTest','click','bluetoothToggle');wait(lambda:not state()['bluetooth'],'Bluetooth toggle')
|
||||
assert ipc('controlTest','click','bluetoothToggle')
|
||||
@@ -160,4 +167,4 @@ with tempfile.TemporaryDirectory(prefix='glassmxrph-controls-') as tmp:
|
||||
shell.terminate();shell.wait(timeout=5)
|
||||
if original:subprocess.run(['hyprctl','dispatch','focusmonitor',original],capture_output=True)
|
||||
text=log.read_text();assert 'WARN' not in text and 'ERROR' not in text,text
|
||||
print('PASS: native read-only discovery, active-monitor placement, system pill, recording audio/per-app volume/Caffeine/network/Bluetooth/display/DND actions, free grid edit mode (place, push down, air gaps, resize, remove, add, plugin tiles, reset), power confirmation/cancel, outside/Escape/exclusivity, settings, clean logs.')
|
||||
print('PASS: native read-only discovery, active-monitor placement, system pill, recording audio/per-app volume/Caffeine/Game Mode/network/Bluetooth/display/DND actions, free grid edit mode (place, push down, air gaps, resize, remove, add, plugin tiles, reset), power confirmation/cancel, outside/Escape/exclusivity, settings, clean logs.')
|
||||
Reference in new issue
Block a user