Refactor switch-theme using kitty theme-switcher
This commit is contained in:
parent
80e5f3e090
commit
cb6d36b983
|
@ -4,3 +4,4 @@ gpg/.gnupg/**
|
|||
!gpg/.gnupg/gpg-agent.conf
|
||||
beets/.config/beets/**
|
||||
!beets/.config/beets/config.yaml
|
||||
kitty/.config/kitty/current-theme.conf
|
||||
|
|
|
@ -73,12 +73,10 @@ box_drawing_scale 0.001, 1, 1.5, 2
|
|||
#: }}}
|
||||
|
||||
#: Cursor customization {{{
|
||||
|
||||
cursor #cccccc
|
||||
# cursor #cccccc
|
||||
|
||||
#: Default cursor color
|
||||
|
||||
cursor_text_color #111111
|
||||
# cursor_text_color #111111
|
||||
|
||||
#: Choose the color of text under the cursor. If you want it rendered
|
||||
#: with the background color of the cell underneath instead, use the
|
||||
|
@ -154,8 +152,7 @@ mouse_hide_wait 3.0
|
|||
#: mouse not being used. Set to zero to disable mouse cursor hiding.
|
||||
#: Set to a negative value to hide the mouse cursor immediately when
|
||||
#: typing text.
|
||||
|
||||
url_color #0087bd
|
||||
# url_color #0087bd
|
||||
url_style curly
|
||||
|
||||
#: The color and style for highlighting URLs on mouse-over. url_style
|
||||
|
@ -354,17 +351,14 @@ placement_strategy center
|
|||
#: this option. Using a value of center means the cell area will be
|
||||
#: placed centrally. A value of top-left means the padding will be on
|
||||
#: only the bottom and right edges.
|
||||
|
||||
active_border_color #00ff00
|
||||
# active_border_color #00ff00
|
||||
|
||||
#: The color for the border of the active window. Set this to none to
|
||||
#: not draw borders around the active window.
|
||||
|
||||
inactive_border_color #cccccc
|
||||
# inactive_border_color #cccccc
|
||||
|
||||
#: The color for the border of inactive windows
|
||||
|
||||
bell_border_color #ff5a00
|
||||
# bell_border_color #ff5a00
|
||||
|
||||
#: The color for the border of inactive windows in which a bell has
|
||||
#: occurred
|
||||
|
@ -445,12 +439,11 @@ tab_title_template {title}
|
|||
#: title. If you wish to include the tab-index as well, use something
|
||||
#: like: {index}: {title}. Useful if you have shortcuts mapped for
|
||||
#: goto_tab N.
|
||||
|
||||
active_tab_foreground #000
|
||||
active_tab_background #eee
|
||||
# active_tab_foreground #000
|
||||
# active_tab_background #eee
|
||||
active_tab_font_style bold-italic
|
||||
inactive_tab_foreground #444
|
||||
inactive_tab_background #999
|
||||
# inactive_tab_foreground #444
|
||||
# inactive_tab_background #999
|
||||
inactive_tab_font_style normal
|
||||
|
||||
#: Tab bar colors and styles
|
||||
|
@ -583,8 +576,7 @@ term xterm-kitty
|
|||
#: }}}
|
||||
|
||||
#: OS specific tweaks {{{
|
||||
|
||||
macos_titlebar_color system
|
||||
# macos_titlebar_color system
|
||||
|
||||
#: Change the color of the kitty window's titlebar on macOS. A value
|
||||
#: of system means to use the default system color, a value of
|
||||
|
@ -999,3 +991,9 @@ map kitty_mod+delete clear_terminal reset active
|
|||
#: }}}
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Iceberg Dark
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
|
@ -8,24 +8,23 @@ fi
|
|||
|
||||
mode=$1
|
||||
|
||||
capitalize() {
|
||||
printf '%s' "$1" | head -c 1 | tr [:lower:] [:upper:]
|
||||
printf '%s' "$1" | tail -c '+2'
|
||||
}
|
||||
|
||||
change_theme() {
|
||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/kitty/kitty.conf
|
||||
sed -i "s/bg=$1/bg=$2/" ~/.config/nvim/init.vim
|
||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.dotfiles/tmux/.tmux.conf
|
||||
}
|
||||
|
||||
reload_kitty() {
|
||||
pkill kitty
|
||||
kitty +kitten themes --reload-in=all "Iceberg $(capitalize "$2")"
|
||||
tmux source-file ~/.tmux.conf
|
||||
kitty --class tmux tmux a
|
||||
}
|
||||
|
||||
if [ "$mode" = "light" ]; then
|
||||
emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)"
|
||||
change_theme dark light
|
||||
reload_kitty
|
||||
else
|
||||
emacsclient --eval "(load-theme 'doom-nord 'no-confirm)"
|
||||
change_theme light dark
|
||||
reload_kitty
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue