diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl new file mode 100644 index 0000000..378a75e --- /dev/null +++ b/.chezmoi.toml.tmpl @@ -0,0 +1,2 @@ +[data] + hyprlandLayout = {{ promptString "Hyprland layout (dwindle/scrolling)" | quote }} diff --git a/dot_config/hypr/hyprland.conf.tmpl b/dot_config/hypr/hyprland.conf.tmpl index 94a2abb..1fbf2b6 100644 --- a/dot_config/hypr/hyprland.conf.tmpl +++ b/dot_config/hypr/hyprland.conf.tmpl @@ -67,7 +67,11 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = true + {{- if eq .hyprlandLayout "dwindle" }} layout = dwindle + {{- else if eq .hyprlandLayout "scrolling" }} + layout = scrolling + {{- end }} snap { enabled = true @@ -130,6 +134,11 @@ dwindle { preserve_split = true } +# See https://wiki.hyprland.org/Configuring/Scrolling-Layout/ for more +scrolling { + direction = right +} + # https://wiki.hyprland.org/Configuring/Variables/#misc misc { disable_hyprland_logo = true @@ -231,13 +240,15 @@ bind = $mainMod SHIFT, B, exec, pkill fuzzel || bluetoothctl -- connect "$(bluet bind = $mainMod SHIFT, A, exec, ~/scripts/select-audio-sink.sh # Move focus +{{- if eq .hyprlandLayout "dwindle" }} bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r -bind = $mainMod, K, movefocus, u bind = $mainMod, J, movefocus, d - -bind = $mainMod, period, layoutmsg, move +col -bind = $mainMod, comma, layoutmsg, move -col +bind = $mainMod, K, movefocus, u +{{- else if eq .hyprlandLayout "scrolling" }} +bind = $mainMod, H, layoutmsg, move -col +bind = $mainMod, L, layoutmsg, move +col +{{- end }} # Switch workspaces bind = $mainMod, 1, workspace, 1 @@ -268,6 +279,14 @@ bind = $mainMod SHIFT CTRL, TAB, movecurrentworkspacetomonitor, +1 # Move/resize windows bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow +{{- if eq .hyprlandLayout "scrolling" }} +bind = $mainMod SHIFT, H, layoutmsg, swapcol l +bind = $mainMod SHIFT, L, layoutmsg, swapcol r +bind = $mainMod, J, layoutmsg, colresize -conf +bind = $mainMod SHIFT, J, layoutmsg, colresize -0.1 +bind = $mainMod, K, layoutmsg, colresize +conf +bind = $mainMod SHIFT, K, layoutmsg, colresize +0.1 +{{- end }} # Laptop multimedia keys for volume and LCD brightness bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && ~/scripts/volume-control.sh