Skip to content

Commit 4aedac5

Browse files
moritzdietzmoritzdietz
authored andcommitted
Migrate nord.tmux file to ZSH shell
1 parent f7b6da0 commit 4aedac5

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

nord.tmux

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
# Copyright (c) 2016-present Sven Greb <[email protected]>
2-
# This source code is licensed under the MIT license found in the license file.
1+
#!/usr/bin/env zsh
2+
# Copyright (C) 2017-present Arctic Ice Studio <[email protected]>
3+
# Copyright (C) 2017-present Sven Greb <[email protected]>
4+
5+
# Project: Nord tmux
6+
# Repository: https://github.com/arcticicestudio/nord-tmux
7+
# License: MIT
8+
# References:
9+
# https://tmux.github.io
310

411
NORD_TMUX_COLOR_THEME_FILE=src/nord.conf
512
NORD_TMUX_VERSION=0.3.0
@@ -8,7 +15,7 @@ NORD_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE="src/nord-status-content-no-patche
815
NORD_TMUX_STATUS_CONTENT_OPTION="@nord_tmux_show_status_content"
916
NORD_TMUX_STATUS_CONTENT_DATE_FORMAT="@nord_tmux_date_format"
1017
NORD_TMUX_NO_PATCHED_FONT_OPTION="@nord_tmux_no_patched_font"
11-
_current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18+
_current_dir="${0:a:h}"
1219

1320
__cleanup() {
1421
unset -v NORD_TMUX_COLOR_THEME_FILE NORD_TMUX_VERSION
@@ -28,7 +35,7 @@ __load() {
2835
local no_patched_font=$(tmux show-option -gqv "$NORD_TMUX_NO_PATCHED_FONT_OPTION")
2936
local date_format=$(tmux show-option -gqv "$NORD_TMUX_STATUS_CONTENT_DATE_FORMAT")
3037

31-
if [ "$(tmux show-option -gqv "clock-mode-style")" == '12' ]; then
38+
if [[ "$(tmux show-option -gqv "clock-mode-style")" == '12' ]]; then
3239
tmux set-environment -g NORD_TMUX_STATUS_TIME_FORMAT "%I:%M %p"
3340
else
3441
tmux set-environment -g NORD_TMUX_STATUS_TIME_FORMAT "%H:%M"

0 commit comments

Comments
 (0)