nix/home/config/sway/module/Tiling.nix

36 lines
1,005 B
Nix
Raw Normal View History

2024-06-25 04:04:39 +03:00
{ config, ... }: {
2024-04-06 03:03:58 +03:00
text = ''
# Toggle tiling.
bindsym --to-code $mod+shift+f floating toggle
2024-04-06 03:03:58 +03:00
# Swap focus between the tiling area and the floating area
bindsym --to-code $mod+r focus mode_toggle
2024-04-06 03:03:58 +03:00
# Split directions.
bindsym --to-code $mod+backslash splith
bindsym --to-code $mod+minus splitv
2024-04-06 03:03:58 +03:00
# Switch the current container between different layout styles.
bindsym --to-code $mod+Tab layout toggle split tabbed
2024-04-06 03:03:58 +03:00
# Fullscreen.
bindsym --to-code $mod+f fullscreen
2024-04-06 03:03:58 +03:00
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Kill focused window.
bindsym --to-code $mod+x kill
2024-04-06 03:03:58 +03:00
# Add gaps.
2024-06-29 18:05:39 +03:00
gaps inner ${toString config.style.window.gap}
2024-04-06 03:03:58 +03:00
# Launch everything tiled.
# for_window [all] floating disable
'';
}