Add nord theme for tmux

This commit is contained in:
CramMK
2020-03-20 15:21:49 +01:00
parent 5083780a5a
commit cd141d9f02
6 changed files with 154 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ dotfiles:
f_tmux:
src: tmux/tmux
dst: ~/.tmux.conf
d_tmux_themes:
src: tmux/themes
dst: ~/.tmux/themes
d_wallpaper:
src: wallpaper
dst: ~/.wallpaper
@@ -114,6 +117,7 @@ profiles:
tmux:
dotfiles:
- f_tmux
- d_tmux_themes
wallpaper:
dotfiles:
- d_wallpaper

43
dotfiles/tmux/themes/nord.tmux Executable file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
# Project: Nord tmux
# Repository: https://github.com/arcticicestudio/nord-tmux
# License: MIT
# References:
# https://tmux.github.io
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
}
__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 [ "$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

View File

@@ -0,0 +1,24 @@
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
# Project: Nord tmux
# Repository: https://github.com/arcticicestudio/nord-tmux
# License: MIT
#+----------------+
#+ Plugin Support +
#+----------------+
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_copy_mode_attr "fg=black,bg=brightcyan"
#+--------+
#+ Status +
#+--------+
#+--- Bars ---+
set -g status-left "#[fg=black,bg=blue,bold] #S "
set -g status-right "#{prefix_highlight}#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]|#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=cyan,bold] #H "
#+--- Windows ---+
set -g window-status-format " #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack]#W #F"
set -g window-status-current-format " #[fg=black,bg=cyan]#I#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F"
set -g window-status-separator ""

View File

@@ -0,0 +1,27 @@
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
# Project: Nord tmux
# Repository: https://github.com/arcticicestudio/nord-tmux
# License: MIT
#+----------------+
#+ Plugin Support +
#+----------------+
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
set -g @prefix_highlight_output_suffix ""
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
#+--------+
#+ Status +
#+--------+
#+--- Bars ---+
#set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]"
set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
#+--- Windows ---+
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
set -g window-status-separator ""

View File

@@ -0,0 +1,53 @@
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
# Project: Nord tmux
# Repository: https://github.com/arcticicestudio/nord-tmux
# License: MIT
#+----------------+
#+ Plugin Support +
#+----------------+
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_fg black
set -g @prefix_highlight_bg brightcyan
#+---------+
#+ Options +
#+---------+
set -g status-interval 1
set -g status on
#+--------+
#+ Status +
#+--------+
#+--- Layout ---+
set -g status-justify left
#+--- Colors ---+
set -g status-bg black
set -g status-fg white
set -g status-attr none
#+-------+
#+ Panes +
#+-------+
set -g pane-border-bg black
set -g pane-border-fg black
set -g pane-active-border-bg black
set -g pane-active-border-fg brightblack
set -g display-panes-colour black
set -g display-panes-active-colour brightblack
#+------------+
#+ Clock Mode +
#+------------+
setw -g clock-mode-colour cyan
#+----------+
#+ Messages +
#+---------+
set -g message-fg cyan
set -g message-bg brightblack
set -g message-command-fg cyan
set -g message-command-bg brightblack

View File

@@ -4,7 +4,7 @@ set -g history-limit 10000
#some vi behaviour
bind-key -r h select-pane -L
bind-key -r j select-pane -D
run-shell "~/.tmux/themes/nord-tmux/nord.tmux" bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r l select-pane -R
@@ -21,3 +21,5 @@ setw -g pane-base-index 1
set -g status-bg green
set -g status-fg black
set -g status-right '%Y.%m.%d %H:%M'
run-shell "~/.tmux/themes/nord-tmux/nord.tmux"