dotfiles/.config/ghostty/config.cgt

82 lines
1.8 KiB
Text

font-family = "<% opt.term_font %>"
# Broken thanks to GNOME's influence in the Linux desktop ecosystem (thanks!)
#background-opacity = 0.8
# Disable useless GTK bar
gtk-titlebar = false
# Use one Process
gtk-single-instance = true
window-save-state = "never"
# Accidentally paste multiple commands with honor
clipboard-paste-protection = false
keybind = clear
<! local function key(k, v) !>
keybind = <% k %>=<% v %>
<! end !>
<!
-- Prefix for window-management keybinds
local win_pref = "ctrl+alt+"
-- Prefix for action keybinds
local act_pref = "ctrl+shift+"
key("ctrl+t", "next_tab")
key("ctrl+shift+t", "new_tab")
key("ctrl+plus", "increase_font_size:1")
key("ctrl+minus", "decrease_font_size:1")
key(win_pref .. "d", "jump_to_prompt:1")
key(win_pref .. "u", "jump_to_prompt:-1")
key(win_pref .. "s", "new_split:down")
key(win_pref .. "v", "new_split:right")
for k, v in pairs {
h = "left",
j = "bottom",
k = "top",
l = "right"
} do key(win_pref .. k, "goto_split:" .. v) end
key(act_pref .. "c", "copy_to_clipboard")
key(act_pref .. "v", "paste_from_clipboard")
!>
<! -- Cattpuccin palette.
-- Implemented here instead of using the builtin theme to use my catppuccin
-- palette in case of future changes.
local pal = opt.catppuccin
for i, col in ipairs {
pal.surface1,
pal.red,
pal.green,
pal.yellow,
pal.blue,
pal.pink,
pal.teal,
pal.subtext1,
pal.surface2,
pal.red,
pal.green,
pal.yellow,
pal.blue,
pal.pink,
pal.teal,
pal.subtext0,
} do!>
palette = <% i - 1 %>=#<% col %>
<! end !>
selection-background = <% pal.surface2 %>
background = <% pal.base %>
foreground = <% pal.text %>
selection-foreground = <% pal.text %>
cursor-color = <% pal.rosewater %>