This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs.sway: improve tab/focus behavior, remove autotiling

- mod+w: flatten all workspace windows into tabbed layout
- mod+Tab: cycle focus through leaf windows in tree order
- Remove split bindings (mod+b/v) to avoid accidental sub-containers
- Remove autotiling (replaced by explicit layout control)

+61 -8
+61 -8
2configs/desktops/sway/default.nix
··· 241 241 bindsym $mod+Shift+Right move right 242 242 # Layout stuff: 243 243 # 244 - # Autotiling handles split direction automatically. 245 - # Use $mod+b/$mod+v only when you explicitly want to force a direction. 246 - bindsym $mod+b splith 247 - bindsym $mod+v splitv 248 - # Flatten a nested container back (undo accidental sub-containers) 244 + # Split bindings removed to avoid accidental sub-containers. 245 + # Use $mod+w to flatten into tabs, $mod+e to toggle split direction. 249 246 bindsym $mod+Shift+e split none 250 247 251 248 # Switch the current container between different layout styles 252 249 bindsym $mod+s layout stacking 253 - bindsym $mod+w layout tabbed 250 + bindsym $mod+w exec ${ 251 + lib.getExe ( 252 + pkgs.writeShellApplication { 253 + name = "sway-tabbed"; 254 + runtimeInputs = [ 255 + pkgs.sway 256 + pkgs.jq 257 + ]; 258 + text = '' 259 + # Get all leaf window IDs on the focused workspace 260 + ids=$(swaymsg -t get_tree | jq -r ' 261 + .. | select(.type? == "workspace") | 262 + select(.. | .focused? // false) | 263 + [.. | select(.type? == "con" and (.nodes? | length) == 0 and .pid? > 0)] | 264 + .[].id 265 + ') 266 + count=$(echo "$ids" | wc -l) 267 + if [ "$count" -le 1 ]; then 268 + swaymsg layout tabbed 269 + exit 0 270 + fi 271 + # Move all windows to scratchpad, then back — this flattens the tree 272 + for id in $ids; do 273 + swaymsg "[con_id=$id]" move scratchpad 274 + done 275 + swaymsg layout tabbed 276 + for id in $ids; do 277 + swaymsg "[con_id=$id]" move workspace current 278 + done 279 + ''; 280 + } 281 + ) 282 + } 254 283 bindsym $mod+e layout toggle split 255 284 256 285 # Make the current focus fullscreen ··· 332 361 333 362 bindsym $mod+y exec /run/current-system/sw/bin/switch-theme toggle 334 363 335 - bindsym $mod+Tab focus next 364 + bindsym $mod+Tab exec ${ 365 + lib.getExe ( 366 + pkgs.writeShellApplication { 367 + name = "sway-focus-next"; 368 + runtimeInputs = [ 369 + pkgs.sway 370 + pkgs.jq 371 + ]; 372 + text = '' 373 + swaymsg -t get_tree | jq -r ' 374 + # Find the focused workspace 375 + .. | select(.type? == "workspace") | 376 + select(.. | .focused? // false) | 377 + # Collect all leaf windows (containers with a pid) in tree order 378 + [.. | select(.type? == "con" and (.nodes? | length) == 0 and .pid? > 0)] | 379 + # Find focused index and pick next (wrapping) 380 + (map(.focused) | index(true)) as $i | 381 + if $i == null then empty 382 + else .[(($i + 1) % length)].id 383 + end 384 + ' | head -n1 | xargs -I{} swaymsg '[con_id={}]' focus 385 + ''; 386 + } 387 + ) 388 + } 336 389 bindsym $mod+Escape workspace back_and_forth 337 390 338 391 # Focus primary output ··· 416 469 exec ${pkgs.copyq}/bin/copyq --start-server 417 470 exec ydotoold 418 471 exec_always pkill kanshi; exec ${pkgs.kanshi}/bin/kanshi 419 - exec_always pkill autotiling; exec ${pkgs.autotiling}/bin/autotiling 472 + 420 473 421 474 # theme and env specific stuff 422 475 exec_always ${pkgs.writers.writeDash "dbus-sway-environment" ''