dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 2712250021f5535463936f37ff926359bb35f272
parent b3d06c7525659d725e6435b26ad28945845cdd5d
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Sat, 27 Feb 2021 14:05:36 +0100

Switch from iTerm to Alacritty

Diffstat:
Mscripts/notify | 2+-
Mscripts/set-theme | 10++++++++--
Mvim/vimrc | 17++++++++---------
3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/scripts/notify b/scripts/notify @@ -2,7 +2,7 @@ [ $# -ge 2 ] || { printf "Arguments: title, message\n" && exit 1; } group=${3:-$TERM} if type terminal-notifier 1> /dev/null 2>&1; then - terminal-notifier -title "$1" -message "$2" -activate com.googlecode.iterm2 -group "$group" + terminal-notifier -title "$1" -message "$2" -activate io.alacritty -group "$group" else printf '\a' fi diff --git a/scripts/set-theme b/scripts/set-theme @@ -44,6 +44,10 @@ except Exception as exception: EOF } +macos_alacritty_load_colors() { + [ -x "$DOTFILES"/tools/alacritty-color-export/script.sh ] && "$DOTFILES"/tools/alacritty-color-export/script.sh +} + set_terminal_and_wallpaper() { if [ "$1" = "light" ]; then /Users/alex/.local/bin/wal --saturate 0.8 -i "$(realpath ~/Pictures/Backgrounds/light.jpg)" -l; @@ -78,13 +82,15 @@ case "$theme" in esac os=$(uname -s | tr '[:upper:]' '[:lower:]') +set_terminal_and_wallpaper "$theme" case "$os" in darwin*) set_macos "$theme" - set_iterm2 "$theme" + # I don't use iterm2 + # set_iterm2 "$theme" + macos_alacritty_load_colors ;; esac -set_terminal_and_wallpaper "$theme" set_p10k "$theme" set_tmux "$theme" diff --git a/vim/vimrc b/vim/vimrc @@ -574,15 +574,14 @@ if has('conceallevel') set conceallevel=0 endif " -" Change cursor shape between insert and normal mode in iTerm2.app -if $TERM_PROGRAM =~ "iTerm" - if exists('$TMUX') - let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" - let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" - else - let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode - let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode - endif +" Change cursor shape between insert and normal mode in iTerm2.app and +" Alacritty +if exists('$TMUX') + let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" + let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" +else + let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode + let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode endif " Highlight current line