Move to Xonsh, add hypr scripts

This commit is contained in:
JuliaLange 2024-01-20 14:03:54 -08:00
parent 7f324958a5
commit ce9124c7ed
13 changed files with 224 additions and 48 deletions

View file

@ -0,0 +1,27 @@
#!/usr/bin/env xonsh
import shelve
import copy
# Usage:
# ./changesecondary.xsh
# cycles through the secondary workspaces
current_secondary = "chat"
with shelve.open($HYPR_WORK_DB) as db:
workspaces = db.get("secondaries").copy()
current_primary = db.get("primary")
current_secondary = db.get("secondary")
#extras = db.get("secondary_extras")
if current_primary in workspaces:
workspaces.remove(current_primary)
current_secondary = workspaces[
(workspaces.index(current_secondary)+1) % len(workspaces)
]
db["secondary"] = current_secondary
# Change primary to bind
hyprctl dispatch moveworkspacetomonitor name:@(current_secondary) $HYPR_MON_SECONDARY
hyprctl dispatch workspace name:@(current_secondary)