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

Configuration to disable patched font usage in status content #11

Merged
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
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Based on the <a href="https://github.com/arcticicestudio/nord">Nord</a> color pa
- [Activation](#activation)
- [Features](#features)
- [Configuration](#configuration)
- [Disable status content](#disable-status-content)
- [No patched fonts](#no-patched-fonts)
- [Plugin Support](#plugin-support)
- [tmux-prefix-highlight](#tmux-prefix-highlight)
- [Development](#development)
Expand Down Expand Up @@ -80,12 +82,28 @@ 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:

### Disable status content

By default, this theme provides status bar content (including the powerline-styled
background arrows).

The status content can be disabled by setting the `@nord_tmux_show_status_content` to `0`:

```sh
set -g @nord_tmux_show_status_content "0"
```

#### No patched fonts

The default status content makes use of patched fonts which can be disabled by setting the `@nord_tmux_no_patched_font` variable to `1`:

```sh
set -g @nord_tmux_no_patched_font "1"
```

![](https://raw.githubusercontent.com/arcticicestudio/nord-tmux/develop/src/assets/scrot-config-status-content-no-patched-font.png)

## Plugin Support
### [tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight)
Supports the *prefix*- and `copy-mode` status indicator.
Expand Down
15 changes: 12 additions & 3 deletions nord.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
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_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_OPTION
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
}
Expand All @@ -30,9 +33,15 @@ __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
tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_FILE"
fi;
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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/nord-status-content-no-patched-font.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Status Content - No Patched Font +
# project nord-tmux +
# 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_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 ""
5 changes: 3 additions & 2 deletions src/nord-status-content.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Nord tmux +
# title Status Content +
# project nord-tmux +
# version 0.2.0 +
# repository https://github.com/arcticicestudio/nord-tmux +
# author Arctic Ice Studio +
# email [email protected] +
Expand All @@ -13,11 +12,13 @@
#+--- 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"

Expand Down
1 change: 0 additions & 1 deletion src/nord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_fg black
set -g @prefix_highlight_bg brightcyan
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"

#+---------+
#+ Options +
Expand Down