Enable ghostty theme switch with manual reload

This commit is contained in:
2024-11-14 00:19:36 +01:00
parent ab0f1d66e6
commit 4f8cede5c0
3 changed files with 12 additions and 8 deletions
+3 -1
View File
@@ -16,6 +16,8 @@ keybind = clear
keybind = ctrl+shift+c=copy_to_clipboard
keybind = ctrl+shift+v=paste_from_clipboard
keybind = alt+r=reload_config
keybind = ctrl+plus=increase_font_size:1
keybind = ctrl+equal=increase_font_size:1
keybind = ctrl+minus=decrease_font_size:1
@@ -55,6 +57,6 @@ shell-integration-features = cursor,sudo,title
theme = catppuccin-latte
# theme = catppuccin-mocha
# config-file = ?~/.config/ghostty/theme.config
config-file = ?theme.config
# vim: ft=conf
-3
View File
@@ -27,9 +27,6 @@
map ctrl+minus change_font_size current -2.0
map ctrl+backspace change_font_size current 0
# map kitty_mod+r launch --type background --stdin-source=@screen_scrollback sh -c 'grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | rofi -dmenu -p "Launch in browser" | xargs xdg-open'
map kitty_mod+r open_url_with_hints
map kitty_mod+e scroll_line_up
map kitty_mod+y scroll_line_down
+9 -4
View File
@@ -30,10 +30,15 @@ in {
${pkgs.coreutils}/bin/ln -sf $XDG_CONFIG_HOME/kitty/${theme}.conf $XDG_CONFIG_HOME/kitty/theme.conf
${pkgs.procps}/bin/pkill -USR1 kitty
'';
# ghostty = ''
# echo ${theme} > ~/.config/ghostty/theme.config
# ghostty +reload_config
# '';
ghostty = let
variant =
if theme == "light"
then "latte"
else "mocha";
in ''
echo "theme = catppuccin-${variant}" > ~/.config/ghostty/theme.config
# ghostty +reload_config
'';
};
in {
enable = true;