Skip to content

Commit

Permalink
Merge pull request #36 from omeraloni/feature/additional-icons-custom…
Browse files Browse the repository at this point in the history
…ization
  • Loading branch information
fabioluciano authored Aug 6, 2024
2 parents 741f285 + 0b686ee commit 3ee65c0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,26 @@ function generate_left_side_string() {
}

function generate_inactive_window_string() {

inactive_window_icon=$(get_tmux_option "@theme_plugin_inactive_window_icon" "")
zoomed_window_icon=$(get_tmux_option "@theme_plugin_zoomed_window_icon" "")

local separator_start="#[bg=${PALLETE['dark5']},fg=${PALLETE['bg_highlight']}]${left_separator:?}#[none]"
local separator_internal="#[bg=${PALLETE['dark3']},fg=${PALLETE['dark5']}]${left_separator:?}#[none]"
local separator_end="#[bg=${PALLETE[bg_highlight]},fg=${PALLETE['dark3']}]${left_separator:?}#[none]"

echo "${separator_start}#[fg=${PALLETE[white]}]#I${separator_internal}#[fg=${PALLETE[white]}] #{?window_zoomed_flag, , }#W ${separator_end}"
echo "${separator_start}#[fg=${PALLETE[white]}]#I${separator_internal}#[fg=${PALLETE[white]}] #{?window_zoomed_flag,$zoomed_window_icon,$inactive_window_icon}#W ${separator_end}"
}

function generate_active_window_string() {

active_window_icon=$(get_tmux_option "@theme_plugin_active_window_icon" "")
zoomed_window_icon=$(get_tmux_option "@theme_plugin_zoomed_window_icon" "")
pane_synchronized_icon=$(get_tmux_option "@theme_plugin_pane_synchronized_icon" "")

separator_start="#[bg=${PALLETE['magenta']},fg=${PALLETE['bg_highlight']}]${left_separator:?}#[none]"
separator_internal="#[bg=${PALLETE['purple']},fg=${PALLETE['magenta']}]${left_separator:?}#[none]"
separator_end="#[bg=${PALLETE[bg_highlight]},fg=${PALLETE['purple']}]${left_separator:?}#[none]"

echo "${separator_start}#[fg=${PALLETE[white]}]#I${separator_internal}#[fg=${PALLETE[white]}] #{?window_zoomed_flag, , }#W #{?pane_synchronized,, }${separator_end}#[none]"
echo "${separator_start}#[fg=${PALLETE[white]}]#I${separator_internal}#[fg=${PALLETE[white]}] #{?window_zoomed_flag,$zoomed_window_icon,$active_window_icon}#W #{?pane_synchronized,$pane_synchronized_icon, }${separator_end}#[none]"
}

0 comments on commit 3ee65c0

Please sign in to comment.