add waybar config, scripts, mic tweaks

This commit is contained in:
2025-09-03 14:48:51 -04:00
parent 0f7e79849d
commit 7431c5f191
9 changed files with 283 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
#!/usr/bin/python
import json
import subprocess
CONFIG = {
'Samsung Electric Company LS27A800U HCJW301093': 1,
'Seanix Technology Inc NX-EDG27X C6F0K3CN07UL': 2,
'BOE 0x0BCA': 3
}
p = subprocess.run(
['hyprctl', 'monitors', '-j'],
capture_output=True,
check=True,
encoding='utf-8'
)
monitors = json.loads(p.stdout)
print('monitors:', monitors)
if set(m['description'] for m in monitors) == CONFIG.keys():
print('config matched, assigning:')
dispatches = []
for m in monitors:
workspace = CONFIG[m['description']]
# move workspace to desired monitor
dispatches.append(f"dispatch moveworkspacetomonitor {workspace} {m['name']}")
# focus the workspace so that it's visible after moving
dispatches.append(f"workspace {workspace}")
cmd = ['hyprctl', '--batch', ' ; '.join(dispatches)]
print('\n'.join(cmd))
subprocess.run(cmd, check=True)
else:
print('config not matched')