mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-09-23 18:48:53 +02:00
ghostty: add resize keybinds
This commit is contained in:
parent
1ff4427b76
commit
1bde76ece4
1 changed files with 20 additions and 10 deletions
|
@ -14,19 +14,27 @@ window-save-state = "never"
|
||||||
# Accidentally paste multiple commands with honor
|
# Accidentally paste multiple commands with honor
|
||||||
clipboard-paste-protection = false
|
clipboard-paste-protection = false
|
||||||
|
|
||||||
|
# Disable redundant resize overlays
|
||||||
|
resize-overlay = "never"
|
||||||
|
|
||||||
keybind = clear
|
keybind = clear
|
||||||
|
|
||||||
<! local function key(k, v) !>
|
<! local function key(k, v) !>
|
||||||
keybind = <% k %>=<% v %>
|
keybind = <% k %>=<% v %><! end !>
|
||||||
<! end !>
|
|
||||||
|
|
||||||
<!
|
<!
|
||||||
-- Prefix for window-management keybinds
|
-- Prefix for window-management keybinds
|
||||||
local win_pref = "ctrl+alt+"
|
local win_pref = "ctrl+alt+"
|
||||||
|
|
||||||
|
-- Prefix for resize keybinds
|
||||||
|
local res_pref = "ctrl+shift+alt+"
|
||||||
|
|
||||||
-- Prefix for action keybinds
|
-- Prefix for action keybinds
|
||||||
local act_pref = "ctrl+shift+"
|
local act_pref = "ctrl+shift+"
|
||||||
|
|
||||||
|
-- Amount to resize by
|
||||||
|
local res_amnt = 24
|
||||||
|
|
||||||
key("ctrl+t", "next_tab")
|
key("ctrl+t", "next_tab")
|
||||||
key("ctrl+shift+t", "new_tab")
|
key("ctrl+shift+t", "new_tab")
|
||||||
|
|
||||||
|
@ -40,11 +48,14 @@ keybind = <% k %>=<% v %>
|
||||||
key(win_pref .. "v", "new_split:right")
|
key(win_pref .. "v", "new_split:right")
|
||||||
|
|
||||||
for k, v in pairs {
|
for k, v in pairs {
|
||||||
h = "left",
|
h = { "left", "left" },
|
||||||
j = "bottom",
|
j = { "bottom", "down" },
|
||||||
k = "top",
|
k = { "top", "up" },
|
||||||
l = "right"
|
l = { "right", "right" },
|
||||||
} do key(win_pref .. k, "goto_split:" .. v) end
|
} do
|
||||||
|
key(win_pref .. k, "goto_split:" .. v[1])
|
||||||
|
key(res_pref .. k, "resize_split:" .. v[2] .. "," .. res_amnt)
|
||||||
|
end
|
||||||
|
|
||||||
key(act_pref .. "c", "copy_to_clipboard")
|
key(act_pref .. "c", "copy_to_clipboard")
|
||||||
key(act_pref .. "v", "paste_from_clipboard")
|
key(act_pref .. "v", "paste_from_clipboard")
|
||||||
|
@ -72,8 +83,7 @@ for i, col in ipairs {
|
||||||
pal.teal,
|
pal.teal,
|
||||||
pal.subtext0,
|
pal.subtext0,
|
||||||
} do !>
|
} do !>
|
||||||
palette = <% i - 1 %>=#<% col %>
|
palette = <% i - 1 %>=#<% col %><! end !>
|
||||||
<! end !>
|
|
||||||
|
|
||||||
selection-background = <% pal.surface2 %>
|
selection-background = <% pal.surface2 %>
|
||||||
background = <% pal.base %>
|
background = <% pal.base %>
|
||||||
|
|
Loading…
Reference in a new issue