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