add layout toggle script

This commit is contained in:
2026-03-09 19:19:58 +00:00
parent 73f6fffd28
commit 0ccb081963
+9
View File
@@ -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"