Skip to content

Commit

Permalink
fix: reindent and replace node icon
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmedeski committed Jun 28, 2023
1 parent 5d1cdd1 commit 60d4feb
Showing 1 changed file with 55 additions and 55 deletions.
110 changes: 55 additions & 55 deletions bin/tmux-nerd-font-window-name
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,70 @@ NAME=$1
SHOW_NAME="$(tmux show -gqv '@tmux-nerd-font-window-name-show-name')"

function get_shell_icon() {
local default_shell_icon=""
local shell_icon
shell_icon="$(tmux show -gqv '@tmux-nerd-font-window-name-shell-icon')"
if [ "$shell_icon" != "" ]; then
echo "$shell_icon"
else
echo "$default_shell_icon"
fi
local default_shell_icon=""
local shell_icon
shell_icon="$(tmux show -gqv '@tmux-nerd-font-window-name-shell-icon')"
if [ "$shell_icon" != "" ]; then
echo "$shell_icon"
else
echo "$default_shell_icon"
fi
}

SHELL_ICON=$(get_shell_icon)

get_icon() {
case $NAME in
tmux)
echo ""
;;
htop | top)
echo ""
;;
fish | zsh | bash | tcsh)
echo "$SHELL_ICON"
;;
vi | vim | nvim | lvim)
echo ""
;;
lazygit | git | tig)
echo ""
;;
node)
echo "󰎙"
;;
ruby)
echo ""
;;
go)
echo ""
;;
lf | lfcd)
echo ""
;;
beam | beam.smp) # Erlang runtime
echo ""
;;
rustc | rustup)
echo ""
;;
Python)
echo ""
;;
*)
if [ "$SHOW_NAME" = true ]; then
echo ""
else
echo "$NAME"
fi
;;
esac
case $NAME in
tmux)
echo ""
;;
htop | top)
echo ""
;;
fish | zsh | bash | tcsh)
echo "$SHELL_ICON"
;;
vi | vim | nvim | lvim)
echo ""
;;
lazygit | git | tig)
echo ""
;;
node)
echo ""
;;
ruby)
echo ""
;;
go)
echo ""
;;
lf | lfcd)
echo ""
;;
beam | beam.smp) # Erlang runtime
echo ""
;;
rustc | rustup)
echo ""
;;
Python)
echo ""
;;
*)
if [ "$SHOW_NAME" = true ]; then
echo ""
else
echo "$NAME"
fi
;;
esac
}

ICON=$(get_icon)

if [ "$SHOW_NAME" = true ]; then
echo "$ICON" "$NAME"
echo "$ICON" "$NAME"
else
echo "$ICON"
echo "$ICON"
fi

0 comments on commit 60d4feb

Please sign in to comment.