Use Lua dispatches and options for Hyprland 0.57

Hyprland 0.57 removed hyprctl keyword and name-style dispatches, and
hyprglass 1.1 dropped its layer namespace options. Move workspace, window,
logout, glass and Game Mode calls to hl.dsp and hyprctl eval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-06 20:39:45 +01:00
1 parent bfbfc8961e
commit c716a20e04
6 files changed
+31 -13

No files matched your search

+1 -1
View File
@@ -129,7 +129,7 @@ def action(req):
if value in ['logout','reboot','shutdown'] and req.get('confirmed') is not True:raise ValueError('Explicit confirmation required')
if not power(options['power']).get(value):raise ValueError('Power action unavailable')
if value=='lock':subprocess.Popen(lock_command(options['power']),stdin=subprocess.DEVNULL,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,start_new_session=True)
elif value=='logout':run(['hyprctl','dispatch','exit'])
elif value=='logout':run(['hyprctl','dispatch','hl.dsp.exit()'])
else:run(['busctl','--system','--auto-start=no','--timeout=10','call','org.freedesktop.login1','/org/freedesktop/login1','org.freedesktop.login1.Manager',{'suspend':'Suspend','reboot':'Reboot','shutdown':'PowerOff'}[value],'b','true'],15)
elif kind=='manager':
executable={'network':'nm-connection-editor','bluetooth':'blueman-manager'}.get(value)