Skip to content

Commit

Permalink
fix(window_status): fix window space between text, window status, rig…
Browse files Browse the repository at this point in the history
…ht separator (#168)
  • Loading branch information
89iuv committed Mar 18, 2024
1 parent d0371ba commit 6e40906
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions catppuccin.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,31 @@ setw() {

build_window_icon() {
local window_status_icon_enable=$(get_tmux_option "@catppuccin_window_status_icon_enable" "yes")
local custom_icon_window_last=$(get_tmux_option "@catppuccin_icon_window_last" "󰖰 ")
local custom_icon_window_current=$(get_tmux_option "@catppuccin_icon_window_current" "󰖯 ")
local custom_icon_window_zoom=$(get_tmux_option "@catppuccin_icon_window_zoom" "󰁌 ")
local custom_icon_window_mark=$(get_tmux_option "@catppuccin_icon_window_mark" "󰃀 ")
local custom_icon_window_silent=$(get_tmux_option "@catppuccin_icon_window_silent" "󰂛 ")
local custom_icon_window_activity=$(get_tmux_option "@catppuccin_icon_window_activity" "󱅫 ")
local custom_icon_window_bell=$(get_tmux_option "@catppuccin_icon_window_bell" "󰂞 ")
local custom_icon_window_last=$(get_tmux_option "@catppuccin_icon_window_last" "󰖰")
local custom_icon_window_current=$(get_tmux_option "@catppuccin_icon_window_current" "󰖯")
local custom_icon_window_zoom=$(get_tmux_option "@catppuccin_icon_window_zoom" "󰁌")
local custom_icon_window_mark=$(get_tmux_option "@catppuccin_icon_window_mark" "󰃀")
local custom_icon_window_silent=$(get_tmux_option "@catppuccin_icon_window_silent" "󰂛")
local custom_icon_window_activity=$(get_tmux_option "@catppuccin_icon_window_activity" "󱅫")
local custom_icon_window_bell=$(get_tmux_option "@catppuccin_icon_window_bell" "󰂞")

if [ "$window_status_icon_enable" = "yes" ]
then
# #!~[*-]MZ
local show_window_status="#{?window_activity_flag,${custom_icon_window_activity},}#{?window_bell_flag,${custom_icon_window_bell},}#{?window_silence_flag,${custom_icon_window_silent},}#{?window_active,${custom_icon_window_current},}#{?window_last_flag,${custom_icon_window_last},}#{?window_marked_flag,${custom_icon_window_mark},}#{?window_zoomed_flag,${custom_icon_window_zoom},}"
local show_window_status=""
show_window_status+="#{?window_activity_flag, ${custom_icon_window_activity},}"
show_window_status+="#{?window_bell_flag, ${custom_icon_window_bell},}"
show_window_status+="#{?window_silence_flag, ${custom_icon_window_silent},}"
show_window_status+="#{?window_active, ${custom_icon_window_current},}"
show_window_status+="#{?window_last_flag, ${custom_icon_window_last},}"
show_window_status+="#{?window_marked_flag, ${custom_icon_window_mark},}"
show_window_status+="#{?window_zoomed_flag, ${custom_icon_window_zoom},}"

fi

if [ "$window_status_icon_enable" = "no" ]
then
local show_window_status="#F"
local show_window_status=" #F"
fi

echo "$show_window_status"
Expand Down Expand Up @@ -132,7 +140,7 @@ build_window_format() {
if [ "$window_status_enable" = "yes" ]
then
local icon="$( build_window_icon )"
text="$text $icon"
text="$text$icon"
fi

if [ "$fill" = "none" ]
Expand Down

0 comments on commit 6e40906

Please sign in to comment.