Skip to content

Commit 410d5be

Browse files
authored
feat: add config to position the icon to the right or left of the window name (#30)
1 parent 34599b7 commit 410d5be

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ config:
3333
fallback-icon: "?" # show when no definition is found
3434
multi-pane-icon: "" # show when window has multiple panes (blank by default)
3535
show-name: true # show the window name with the icon (defaults to false)
36+
icon-position: "left" # show the icon to the "left" or "right" of the window name (defaults to left)
3637

3738
icons:
3839
zsh: "" # overwrite with your own symbol (Nerd Font icon, emoji, whatever!)

bin/tmux-nerd-font-window-name

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ fi
3636

3737
SHOW_NAME="$(get_config_value '.config.show-name')"
3838
if [ "$SHOW_NAME" = true ]; then
39-
ICON="$ICON $NAME"
39+
ICON_POSITION="$(get_config_value '.config.icon-position')"
40+
if [ "$ICON_POSITION" == "right" ]; then
41+
ICON="$NAME $ICON"
42+
else
43+
ICON="$ICON $NAME"
44+
fi
4045
fi
4146

4247
echo "$ICON"

0 commit comments

Comments
 (0)