summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2021-02-16 22:48:28 +0100
committeraktersnurra <grydholm@kth.se>2021-02-16 22:48:28 +0100
commitadd7517e60b0cf427208867b505b616bacec8680 (patch)
tree72a0325a2f1fab4d2b561e9ed78970c7bca475bb
parent8ea1f5ef4574c627bc90360b9e22c60226879c5b (diff)
fixed color bug in tmux, and option key usage on mac in alacritty
-rw-r--r--.config/alacritty/alacritty.yml4
-rw-r--r--.config/nvim/themes/nord.vim8
-rw-r--r--.config/tmux/.tmux.conf85
3 files changed, 43 insertions, 54 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
index d173c4e..e478e3b 100644
--- a/.config/alacritty/alacritty.yml
+++ b/.config/alacritty/alacritty.yml
@@ -1,5 +1,5 @@
draw_bold_text_with_bright_colors: true
-
+alt_send_esc: false
colors:
primary:
background: '#2e3440'
@@ -49,7 +49,7 @@ colors:
cyan: '#6d96a5'
white: '#aeb3bb'
-background_opacity: 0.9
+background_opacity: 0.99
font:
# The normal (roman) font face to use.
diff --git a/.config/nvim/themes/nord.vim b/.config/nvim/themes/nord.vim
index ec15ad6..47c38ec 100644
--- a/.config/nvim/themes/nord.vim
+++ b/.config/nvim/themes/nord.vim
@@ -1,15 +1,15 @@
" Prevents the colorscheme from loading a custom bg color.
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
+
+let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
+let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
+
hi Comment cterm=italic
-let g:onedark_hide_endofbuffer=1
-let g:onedark_terminal_italics=1
-let g:onedark_termcolors=256
syntax on
colorscheme nord
-
" checks if your terminal has 24-bit color support
if (has("termguicolors"))
set termguicolors
diff --git a/.config/tmux/.tmux.conf b/.config/tmux/.tmux.conf
index 41070f7..bcf1583 100644
--- a/.config/tmux/.tmux.conf
+++ b/.config/tmux/.tmux.conf
@@ -1,4 +1,22 @@
# Stolen from: https://gist.github.com/spicycode/1229612
+# show session, window, pane in left status bar
+set -g terminal-overrides ',xterm-256color:Tc'
+set -g default-terminal "screen-256color"
+set -as terminal-overrides ',xterm*:sitm=\E[3m'
+
+set -g status-position top # statusbar position
+set -g status-interval 1
+set -g status-left-length 40
+set-option -g status-left '#[fg=white]⚡️#(whoami)@#(hostname -s) | #[fg=green]'
+set-option -g status-right '#[fg=aqua]%b %_d %H:%M'
+
+
+#+--- Colors ---+
+set -g status-bg black
+set -g status-fg white
+setw -g clock-mode-colour cyan
+
+
# 0 is too far from ` ;)
set -g base-index 1
@@ -12,11 +30,14 @@ set -g history-limit 10000
setw -g mode-keys vi
setw -g mouse on
-setw -g monitor-activity on
-setw -g alternate-screen on
+#setw -g monitor-activity on
+#setw -g alternate-screen on
-bind-key v split-window -h
-bind-key s split-window -v
+# split panes using | and -
+bind | split-window -h
+bind - split-window -v
+unbind '"'
+unbind %
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
@@ -50,51 +71,19 @@ bind -n M-Down select-pane -D
bind -n S-Left previous-window
bind -n S-Right next-window
+
+bind Escape copy-mode
+bind p paste-buffer
+bind -T copy-mode-vi v send -X begin-selection
+bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
+bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
+bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
+
+
# No delay for escape key press
set -sg escape-time 0
# Reload tmux config
-bind r source-file ~/.config/tmux/.tmux.conf
-
-
-# Nord Theme
-NORD_TMUX_COLOR_THEME_FILE=src/nord.conf
-NORD_TMUX_VERSION=0.3.0
-NORD_TMUX_STATUS_CONTENT_FILE="src/nord-status-content.conf"
-NORD_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE="src/nord-status-content-no-patched-font.conf"
-NORD_TMUX_STATUS_CONTENT_OPTION="@nord_tmux_show_status_content"
-NORD_TMUX_NO_PATCHED_FONT_OPTION="@nord_tmux_no_patched_font"
-_current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-__cleanup() {
- unset -v NORD_TMUX_COLOR_THEME_FILE NORD_TMUX_VERSION
- unset -v NORD_TMUX_STATUS_CONTENT_FILE NORD_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE
- unset -v NORD_TMUX_STATUS_CONTENT_OPTION NORD_TMUX_NO_PATCHED_FONT_OPTION
- unset -v _current_dir
- unset -f __load __cleanup
- tmux set-environment -gu NORD_TMUX_STATUS_TIME_FORMAT
-}
-
-__load() {
- tmux source-file "$_current_dir/$NORD_TMUX_COLOR_THEME_FILE"
-
- local status_content=$(tmux show-option -gqv "$NORD_TMUX_STATUS_CONTENT_OPTION")
- local no_patched_font=$(tmux show-option -gqv "$NORD_TMUX_NO_PATCHED_FONT_OPTION")
-
- if [ "$(tmux show-option -gqv "clock-mode-style")" == '12' ]; then
- tmux set-environment -g NORD_TMUX_STATUS_TIME_FORMAT "%I:%M %p"
- else
- tmux set-environment -g NORD_TMUX_STATUS_TIME_FORMAT "%H:%M"
- fi
-
- if [ "$status_content" != "0" ]; then
- if [ "$no_patched_font" != "1" ]; then
- tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_FILE"
- else
- tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE"
- fi
- fi
-}
-
-__load
-__cleanup
+bind r source-file $HOME/.config/tmux/.tmux.conf
+
+if-shell 'test "$SSH_CONNECTION"' 'set -g status-bg red'