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

+10 -2
View File
@@ -27,12 +27,20 @@ def get_many(keys):
nxt=out.find('{',pos+1)
if nxt<0:break
pos=nxt;continue
if isinstance(data,dict) and 'int' in data:found[str(data.get('option',''))]=data['int']
if isinstance(data,dict) and ('int' in data or 'bool' in data):found[str(data.get('option',''))]=int(data.get('int',data.get('bool')))
return {k:found[k] for k in keys if k in found}
def lua_set(key,value):
# "decoration:blur:enabled" -> hl.config({ decoration = { blur = { enabled = false } } })
path=key.split(':');text='true' if value else 'false'
target='hl.config('
if path[0]=='plugin':target='hl.plugin.%s.config('%path[1];path=path[2:]
for part in reversed(path):text='{ '+part+' = '+text+' }'
return target+text+')'
def put_many(values):
if not values:return
out=run(['--batch',';'.join('keyword %s %d'%(k,v) for k,v in values.items())])
out=run(['--batch',';'.join('eval '+lua_set(k,v) for k,v in values.items())])
bad=[line for line in out.splitlines() if line.strip() and line.strip()!='ok']
if bad:raise ValueError(bad[0][:350])