Skip to content

Icon position config #30

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

Merged
merged 1 commit into from
Nov 25, 2023
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config:
fallback-icon: "?" # show when no definition is found
multi-pane-icon: "" # show when window has multiple panes (blank by default)
show-name: true # show the window name with the icon (defaults to false)
icon-position: "left" # show the icon to the "left" or "right" of the window name (defaults to left)

icons:
zsh: "" # overwrite with your own symbol (Nerd Font icon, emoji, whatever!)
Expand Down
7 changes: 6 additions & 1 deletion bin/tmux-nerd-font-window-name
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ fi

SHOW_NAME="$(get_config_value '.config.show-name')"
if [ "$SHOW_NAME" = true ]; then
ICON="$ICON $NAME"
ICON_POSITION="$(get_config_value '.config.icon-position')"
if [ "$ICON_POSITION" == "right" ]; then
ICON="$NAME $ICON"
else
ICON="$ICON $NAME"
fi
fi

echo "$ICON"