From 0838d75af0af0f074dfbab5a098c8fcfab4eb585 Mon Sep 17 00:00:00 2001 From: Justin Krueger Date: Wed, 7 Nov 2018 05:04:14 -0700 Subject: [PATCH] Use a custom terminfo entry for italics. --- .alacritty.yml | 10 +++++----- .config/fish/functions/fish_prompt.fish | 6 ++++-- .hovel/install.sh | 2 ++ .hovel/tmux-256color-italic.terminfo | 4 ++++ .tmux.conf | 5 +++-- 5 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 .hovel/tmux-256color-italic.terminfo diff --git a/.alacritty.yml b/.alacritty.yml index 0a9f69b..cf68e6b 100644 --- a/.alacritty.yml +++ b/.alacritty.yml @@ -1,15 +1,15 @@ -dynamic_title: true +dynamic_title: false hide_cursor_when_typing: true cursor_style: Block unfocused_hollow_cursor: true live_config_reload: true render_timer: false -background_opacity: 0.965 +background_opacity: 0.9 custom_cursor_colors: false tabspaces: 8 env: - TERM: xterm-256color + TERM: tmux-256color-italic window: dimensions: @@ -17,7 +17,7 @@ window: lines: 24 padding: - x: 6 + x: 9 y: 6 decorations: full @@ -91,7 +91,7 @@ mouse: selection: semantic_escape_chars: ",│`|:\"' ()[]{}<>" - save_to_clipboard: false + save_to_clipboard: true key_bindings: - { key: Space, mods: Control, chars: "\x1b" } diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish index c7e7ab3..d28c561 100644 --- a/.config/fish/functions/fish_prompt.fish +++ b/.config/fish/functions/fish_prompt.fish @@ -1,9 +1,11 @@ function fish_prompt - set prompt (echo $PWD | grep -Eo '([^/]+)?/([^/]+)?$') + set -l prompt (echo $PWD | grep -Eo '([^/]+)?/([^/]+)?$') which arcus > /dev/null 2>&1 - if test "$status" -a -n "$fish_color_cwd_fade_to" + if test $status -a -n "$fish_color_cwd_fade_to" + set_color -i echo -n $prompt | arcus $fish_color_cwd $fish_color_cwd_fade_to + set_color normal else set_color $fish_color_cwd echo -n $prompt diff --git a/.hovel/install.sh b/.hovel/install.sh index 17c4237..c1fdbeb 100644 --- a/.hovel/install.sh +++ b/.hovel/install.sh @@ -38,3 +38,5 @@ if [ $? -a "$SHELL" != "$newsh" ]; then echo "Changing shell to '$newsh'" chsh -s $newsh fi + +tic ~/.hovel/tmux-256color-italic.terminfo diff --git a/.hovel/tmux-256color-italic.terminfo b/.hovel/tmux-256color-italic.terminfo new file mode 100644 index 0000000..9355820 --- /dev/null +++ b/.hovel/tmux-256color-italic.terminfo @@ -0,0 +1,4 @@ +tmux-256color-italic|tmux with 256 color and italic support, + sitm=\E[3m, ritm=\E[23m, + use=xterm-256color, + use=screen-256color, diff --git a/.tmux.conf b/.tmux.conf index c259057..c3659ba 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,7 +1,8 @@ set -g prefix C-a -# Ensure proper colors and neovim cursor. -set -ga terminal-overrides "xterm-256color:Tc,screen-256color:Tc" +# Enable truecolor and bar cursors +set -g default-terminal "tmux-256color-italic" +set -ga terminal-overrides "tmux-256color-italic:Tc" set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' set -g pane-base-index 1