From 0ccb0819639bef7895ebc71ef822b059ab6b7aea Mon Sep 17 00:00:00 2001 From: Liam Malone Date: Mon, 9 Mar 2026 19:19:58 +0000 Subject: [PATCH] add layout toggle script --- configs/hypr/ws-layout-toggle.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 configs/hypr/ws-layout-toggle.sh diff --git a/configs/hypr/ws-layout-toggle.sh b/configs/hypr/ws-layout-toggle.sh new file mode 100755 index 0000000..c5c36cc --- /dev/null +++ b/configs/hypr/ws-layout-toggle.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +current_layout=$(hyprctl activeworkspace | awk '/tiledLayout/ {print $2}' | tail -1) + +tgt_layout=$( [ "$current_layout" == 'scrolling' ] && + echo 'pseudo' || echo 'scrolling' ) + +ws_id=$(hyprctl activeworkspace | awk 'NR==1 && /workspace ID/ {print $3}') +hyprctl keyword workspace "$ws_id, layout:$tgt_layout" \ No newline at end of file