mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(config): add scrolloverview plugin config and revise keybindings
This commit is contained in:
1 parent
55ed0d89d3
commit
c22bcfbd94
1 file changed
+45
-11
@@ -11,9 +11,13 @@
|
||||
hl.unbind("SUPER + Q")
|
||||
o.bind("SUPER + Q", "Close window", hl.dsp.window.close())
|
||||
|
||||
-- Mod+W was tabbed display. Here it flips the workspace layout.
|
||||
-- Mod+W was tabbed display. Here it flips the workspace layout, and sets every
|
||||
-- column to 75% of the screen when the workspace turns to scrolling. Dwindle
|
||||
-- needs no widths, because it re-tiles on its own.
|
||||
-- Needs ~/.local/bin/omarchy-toggle-layout. Pass another fraction to change
|
||||
-- the width, e.g. "omarchy-toggle-layout 0.6".
|
||||
hl.unbind("SUPER + W") -- was: close window
|
||||
o.bind("SUPER + W", "Toggle workspace layout", "omarchy-hyprland-workspace-layout-toggle")
|
||||
o.bind("SUPER + W", "Toggle workspace layout", "omarchy-toggle-layout")
|
||||
|
||||
-- Mod+BackSpace -> last window.
|
||||
hl.unbind("SUPER + BACKSPACE") -- was: toggle window transparency
|
||||
@@ -38,6 +42,10 @@ o.bind("SUPER + J", "Focus on below window", hl.dsp.focus({ direction = "d" }))
|
||||
o.bind("SUPER + K", "Focus on above window", hl.dsp.focus({ direction = "u" }))
|
||||
o.bind("SUPER + L", "Focus on right window", hl.dsp.focus({ direction = "r" }))
|
||||
|
||||
-- The old SUPER + J job, moved to a free key. Dwindle only; toggling needs
|
||||
-- dwindle.preserve_split, which Omarchy already sets.
|
||||
o.bind("SUPER + D", "Toggle window split", hl.dsp.layout("togglesplit"))
|
||||
|
||||
-- Smart move: merge into the neighboring group if there is one, else swap.
|
||||
-- Needs ~/.local/bin/omarchy-smart-move.
|
||||
o.bind("SUPER + SHIFT + H", "Move or merge left", "omarchy-smart-move l")
|
||||
@@ -82,10 +90,10 @@ o.bind("SUPER + SHIFT + R", "Cycle window size back", "omarchy-cycle-window-size
|
||||
|
||||
-- Alt+Shift+hjkl. Hyprland resizes by pixels, not by percent, so 100 px
|
||||
-- replaces the niri 10%.
|
||||
o.bind("ALT + SHIFT + H", "Shrink window width", hl.dsp.window.resize({ x = -100, y = 0, relative = true }))
|
||||
o.bind("ALT + SHIFT + L", "Grow window width", hl.dsp.window.resize({ x = 100, y = 0, relative = true }))
|
||||
o.bind("ALT + SHIFT + J", "Shrink window height", hl.dsp.window.resize({ x = 0, y = -100, relative = true }))
|
||||
o.bind("ALT + SHIFT + K", "Grow window height", hl.dsp.window.resize({ x = 0, y = 100, relative = true }))
|
||||
o.bind("ALT + H", "Shrink window width", hl.dsp.window.resize({ x = -100, y = 0, relative = true }))
|
||||
o.bind("ALT + L", "Grow window width", hl.dsp.window.resize({ x = 100, y = 0, relative = true }))
|
||||
o.bind("ALT + K", "Shrink window height", hl.dsp.window.resize({ x = 0, y = -100, relative = true }))
|
||||
o.bind("ALT + J", "Grow window height", hl.dsp.window.resize({ x = 0, y = 100, relative = true }))
|
||||
|
||||
-- Column fitting. These are scrolling layout messages, so they do nothing on
|
||||
-- a dwindle workspace. Mod+F (expand to available width) has no exact match;
|
||||
@@ -109,9 +117,8 @@ o.bind("SUPER + CTRL + ALT + G", "Ghostty", "omarchy-cycle ghostty")
|
||||
o.bind("SUPER + CTRL + ALT + Y", "Web apps", "omarchy-cycle webapp")
|
||||
o.bind("SUPER + CTRL + ALT + O", "Obsidian", "omarchy-cycle obsidian")
|
||||
o.bind("SUPER + CTRL + ALT + F", "File manager", "omarchy-launch-or-focus nautilus \"gtk-launch org.gnome.Nautilus\"")
|
||||
o.bind("SUPER + CTRL + ALT + E", "Fastmail", "omarchy-launch-or-focus fastmail \"gtk-launch com.fastmail.Fastmail\"")
|
||||
o.bind("SUPER + CTRL + ALT + E", "Fastmail", "omarchy-launch-or-focus fastmail \"gtk-launch fastmail\"")
|
||||
o.bind("SUPER + CTRL + ALT + M", "Beeper", "omarchy-launch-or-focus beeper \"gtk-launch beeper\"")
|
||||
o.bind("SUPER + CTRL + ALT + L", "Linear", "omarchy-launch-or-focus linear \"gtk-launch WebApp-Linear3312\"")
|
||||
|
||||
hl.unbind("SUPER + CTRL + ALT + T") -- was: show time
|
||||
o.bind("SUPER + CTRL + ALT + T", "Todoist", "omarchy-launch-or-focus todoist \"gtk-launch todoist\"")
|
||||
@@ -155,6 +162,33 @@ o.bind("SUPER + SHIFT + SPACE", "Emojis", "omarchy-shell shell toggle omarchy.em
|
||||
hl.unbind("SUPER + P") -- was: pseudo window
|
||||
o.bind("SUPER + P", "Clipboard manager", "omarchy-shell shell toggle omarchy.clipboard")
|
||||
|
||||
-- Mod+Shift+Return was the vicinae window switcher. Omarchy has no window
|
||||
-- switcher menu, so ALT + TAB (an Omarchy default) is the replacement, and
|
||||
-- SUPER + SHIFT + RETURN keeps its default job of opening the browser.
|
||||
-- Mod+Shift+Return was the vicinae window switcher. ScrollOverview on
|
||||
-- ALT + TAB below takes that job, so SUPER + SHIFT + RETURN keeps its default
|
||||
-- job of opening the browser.
|
||||
|
||||
-- ─── ScrollOverview plugin ──────────────────────────────────────────────────
|
||||
|
||||
hl.config({
|
||||
plugin = {
|
||||
scrolloverview = {
|
||||
gesture_distance = 300, -- how far is the "max" for the gesture
|
||||
scale = 0.5, -- preferred overview scale
|
||||
workspace_gap = 100,
|
||||
layout = "vertical", -- vertical or horizontal
|
||||
wallpaper = 2, -- 0: global only, 1: per-workspace only, 2: both
|
||||
blur = true, -- blur only the main overview wallpaper
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 50,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Omarchy puts two binds on ALT + TAB: focus next window, and reveal the
|
||||
-- active window on top. Both go, and the overview takes the key. Written with
|
||||
-- o.bind and a description, so it shows up in the keybindings menu.
|
||||
hl.unbind("ALT + TAB")
|
||||
o.bind("ALT + TAB", "Toggle overview", function()
|
||||
hl.plugin.scrolloverview.overview("toggle all")
|
||||
end)
|
||||
Reference in new issue
Block a user