You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.1 KiB

#!/bin/bash
# set status-format[0]
# "#[align=left range=left #{status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]
# #[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]
# #{W:#[range=window|#{window_index} #{window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{window-status-current-style},default},#{window-status-current-style},#{window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}
# #[nolist align=right range=right #{status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]#[align=centre]"
function left() {
line='#[align=left range=left #{status-left-style}]'
#line=$line'#[fg=colour234,bg=colour133,bold]'
#line=$line' #S ' \
#line=$line'#[fg=colour133,bg=colour235,nobold]'
#line=$line'#[fg=colour240,bg=colour235]'
#line=$line' #(whoami) '
#line=$line'#[fg=colour235,bg=default,nobold]'
line=$line'#[fg=colour133,bg=colour235,bold]'
line=$line' #S ' \
line=$line'#[fg=colour133]❯'
line=$line'#[fg=colour240]'
line=$line' #(whoami) '
line=$line'#[fg=colour235,bg=default,nobold]'
echo $line
}
function center() {
# Alignment
line='#[norange default]#[list=on align=#{status-justify}]'
# Markers
line=$line'#[list=left-marker]<#[list=right-marker]>#[list=on]'
# Start of list
line=$line'#{W:'
# Window list
line=$line'#[push-default]#{T:window-status-format}#[pop-default]'
# Window separator
line=$line'#[norange default]#{?window_end_flag,,#{window-status-separator}},'
# Current format
line=$line'#[push-default]#{T:window-status-current-format}#[pop-default]'
line=$line'#[norange list=on default]'
line=$line'#{?window_end_flag,,#{window-status-separator}}'
# End of list
line=$line'}'
echo $line
}
function right() {
line='#[nolist align=right range=right #{status-right-style}]'
line=$line'#(date +"%I:%M %p") '
line=$line'#[fg=colour238,nobold]'
line=$line'#[fg=colour254, bg=colour238]'
line=$line' #(date +"%D %a") '
line=$line'#(rainbarf --width 10 --battery --remaining --tmux --rgb)'
echo "${line}"
}
echo "$(left)$(center)$(right)"