Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the status bar content optional #8

Merged
merged 3 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Based on the <a href="https://github.com/arcticicestudio/nord">Nord</a> color pa
- [GitHub Repository Clone](#gitHub-repository-clone)
- [Activation](#activation)
- [Features](#features)
- [Configuration](#configuration)
- [Plugin Support](#plugin-support)
- [tmux-prefix-highlight](#tmux-prefix-highlight)
- [Development](#development)
Expand Down Expand Up @@ -50,9 +51,9 @@ set -g @plugin 'arcticicestudio/nord-tmux'
and press the default key binding `prefix` + <kbd>I</kbd> to fetch the plugin and source it.

#### Manual
[Download](https://github.com/arcticicestudio/nord-tmux/releases/latest) the latest version of the [`nord.conf`](https://github.com/arcticicestudio/nord-tmux/blob/develop/src/nord.conf) theme file to any directory where `~/.tmux/themes/nord-tmux/nord.conf` is the recommended path.
[Download](https://github.com/arcticicestudio/nord-tmux/releases/latest) the latest version of the [`*.conf` theme files](https://github.com/arcticicestudio/nord-tmux/tree/develop/src) to any directory where `~/.tmux/themes/nord-tmux` is the recommended path.

Source the downloaded theme by adding it to your `~/.tmux.conf`
Add the downloaded theme to your `~/.tmux.conf` by sourcing the main file `nord.conf`:
```sh
source-file "~/.tmux/themes/nord-tmux/nord.conf"
```
Expand All @@ -78,6 +79,13 @@ tmux source-file `~/.tmux.conf`

<p align="center"><strong>Fits to many terminal applications based on Nord</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-tmux/develop/src/assets/scrot-htop.png"/></p>

## Configuration
This theme has default status bar content (including the powerline-styled
background arrows). You can disable the included status bar content:
```sh
set -g @nord_tmux_show_status_content "0"
```

## Plugin Support
### [tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight)
Supports the *prefix*- and `copy-mode` status indicator.
Expand Down
8 changes: 8 additions & 0 deletions nord.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@
# https://tmux.github.io
NORD_TMUX_COLOR_THEME_FILE=src/nord.conf
NORD_TMUX_VERSION=0.2.0
NORD_TMUX_STATUS_CONTENT_FILE="src/nord-status-content.conf"
NORD_TMUX_STATUS_CONTENT_OPTION="@nord_tmux_show_status_content"
_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_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")
if [ "$status_content" != "0" ]; then
tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_FILE"
fi;
}

__load
Expand Down
27 changes: 27 additions & 0 deletions src/nord-status-content.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Nord tmux +
# project nord-tmux +
# version 0.2.0 +
# repository https://github.com/arcticicestudio/nord-tmux +
# author Arctic Ice Studio +
# email [email protected] +
# copyright Copyright (C) 2017 +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+----------------+
#+ 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 ""

#+--------+
#+ Status +
#+--------+
#+--- Bars ---+
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 ""
11 changes: 0 additions & 11 deletions src/nord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
set -g @prefix_highlight_fg black
set -g @prefix_highlight_bg brightcyan
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
set -g @prefix_highlight_output_suffix ""

#+---------+
#+ Options +
Expand All @@ -35,15 +33,6 @@ set -g status-bg black
set -g status-fg white
set -g status-attr none

#+--- Bars ---+
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 ""

#+-------+
#+ Panes +
#+-------+
Expand Down