Added option to toggle between smiley and session name

as the left icons also restructured the linux battery command to make it
work on acpi as well as /sys/class/power_supply/BAT0 (and BAT1)
This commit is contained in:
Uttarayan Mondal 2020-05-21 21:02:20 +05:30
parent 52022a22a3
commit 92d00a228a
2 changed files with 42 additions and 6 deletions

View file

@ -21,6 +21,7 @@ main()
show_weather=$(get_tmux_option "@dracula-show-weather" true)
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
show_powerline=$(get_tmux_option "@dracula-show-powerline" false)
show_left_icon=$(get_tmux_option "@dracula-show-left-icon" smiley)
# Dracula Color Pallette
white='#f8f8f2'
@ -35,6 +36,15 @@ main()
pink='#ff79c6'
yellow='#f1fa8c'
case $show_left_icon in
smiley)
left_icon="☺";;
session)
left_icon="#W";;
*)
left_icon=$show_left_icon;;
esac
if $show_powerline; then
right_sep=''
left_sep=''
@ -66,7 +76,7 @@ main()
if $show_powerline; then
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} #[fg=${green},bg=${gray}]#{?client_prefix,#[fg=${yellow}],}${left_sep} "
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${gray}]#{?client_prefix,#[fg=${yellow}],}${left_sep}"
tmux set-option -g status-right ""
powerbg=${gray}
@ -89,7 +99,7 @@ main()
# window tabs
tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${white},bg=${dark_purple}] #I #W #[fg=${dark_purple},bg=${gray}]${left_sep}"
else
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} "
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon}"
tmux set-option -g status-right ""