summaryrefslogtreecommitdiff
path: root/src/caelestia/subcommands/toggle.py
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-16 16:13:02 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-16 16:13:02 +1000
commitc9c1be183a2606f8cb7716ef2318d39dac1890db (patch)
tree2ba100fe27e50423bf650d1fa89aed223c3f8ffd /src/caelestia/subcommands/toggle.py
parent[CI] chore: update flake (diff)
downloadcaelestia-cli-c9c1be183a2606f8cb7716ef2318d39dac1890db.tar.gz
caelestia-cli-c9c1be183a2606f8cb7716ef2318d39dac1890db.tar.bz2
caelestia-cli-c9c1be183a2606f8cb7716ef2318d39dac1890db.zip
toggle: fix specialws
Diffstat (limited to 'src/caelestia/subcommands/toggle.py')
-rw-r--r--src/caelestia/subcommands/toggle.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/caelestia/subcommands/toggle.py b/src/caelestia/subcommands/toggle.py
index 74be80e..f082ce2 100644
--- a/src/caelestia/subcommands/toggle.py
+++ b/src/caelestia/subcommands/toggle.py
@@ -147,13 +147,5 @@ class Command:
self.move_client(selector, self.args.workspace)
def specialws(self) -> None:
- workspaces = hypr.message("workspaces")
- on_special_ws = any(ws["name"] == "special:special" for ws in workspaces)
- toggle_ws = "special"
-
- if not on_special_ws:
- active_ws = hypr.message("activewindow")["workspace"]["name"]
- if active_ws.startswith("special:"):
- toggle_ws = active_ws[8:]
-
- hypr.dispatch("togglespecialworkspace", toggle_ws)
+ special = next(m for m in hypr.message("monitors") if m["focused"])["specialWorkspace"]["name"]
+ hypr.dispatch("togglespecialworkspace", special[8:] or "special")