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')

View File

@@ -0,0 +1,4 @@
#!/usr/bin/bash
# clear all files in ~/Downloads older than 24h
fd --changed-before 1d --full-path ~/Downloads --exec-batch rm -rf

View File

@@ -0,0 +1,7 @@
#!/usr/bin/bash
# current highest-numbered workspace
MAX_WORKSPACE=$(hyprctl workspaces -j | jq 'sort_by(.id) | reverse | .[0].id')
hyprctl dispatch workspace $(($MAX_WORKSPACE + 1))