Browse Source

full custom status line, and... two of them

master
Efertone 8 months ago
parent
commit
332163daa8
Signed by: efertone GPG Key ID: 07AB750DDFD9EE50
  1. 6
      right
  2. 22
      right-second
  3. 65
      status-first
  4. 25
      status-second
  5. 15
      tmux.conf

6
right

@ -5,12 +5,6 @@ line=$line'#(date +"%I:%M %p") '
line=$line'#[fg=colour238,nobold]'
line=$line'#[fg=colour254, bg=colour238]'
line=$line' #(date +"%D %a") '
if ps aux | grep -i '[z]oom' 2>&1 > /dev/null; then
line=$line' #[fg=colour124]#[fg=colour15, bg=colour124, nobold] Zoom is running '
else
# line=$line' #[fg=colour39]#[fg=colour16, bg=colour39, nobold] #(spoty --tmux --first-artist --total-max-length=30) '
line=$line' #[fg=colour39]#[fg=colour16, bg=colour39, nobold] #(eferland spoty show --tmux --first-artist --max-length-total=30) '
fi
line=$line'#(rainbarf --width 10 --battery --remaining --tmux --rgb)'
echo "${line}"

22
right-second

@ -0,0 +1,22 @@
#!/bin/bash
function left() {
line=''
line=$line"#{pane_current_path}"
echo $line
}
function right() {
line='#[nolist align=right range=right #{status-right-style}]'
if ps aux | grep -i '[z]oom' 2>&1 > /dev/null; then
line=$line' #[fg=colour124]#[fg=colour15, bg=colour124, nobold] Zoom is running '
else
line=$line' #[fg=colour39]#[fg=colour16, bg=colour39, nobold] #(eferland spoty show --tmux --first-artist --max-length-total=30) '
fi
echo "${line}"
}
echo "$(left)$(right)"

65
status-first

@ -0,0 +1,65 @@
#!/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=colour232,bg=colour97,bold]'
line=$line' #S ' \
line=$line'#[fg=colour97,bg=colour240,nobold]'
line=$line'#[fg=colour233,bg=colour240]'
line=$line' #(whoami) '
line=$line'#[fg=colour240,bg=colour235]'
line=$line'#[fg=colour240,bg=colour235]'
line=$line' #I:#P '
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)"

25
status-second

@ -0,0 +1,25 @@
#!/bin/bash
function left() {
line=''
line=$line'#[fg=colour254, bg=colour238]'
line=$line' #{pane_current_path} '
line=$line'#[fg=colour238,bg=default,nobold]'
echo $line
}
function right() {
line='#[nolist align=right range=right #{status-right-style}]'
if ps aux | grep -i '[z]oom' 2>&1 > /dev/null; then
line=$line' #[fg=colour124]#[fg=colour15, bg=colour124, nobold] Zoom is running '
else
line=$line' #[fg=colour39]#[fg=colour16, bg=colour39, nobold] #(eferland spoty show --tmux --first-artist --max-length-total=30) '
fi
echo "${line}"
}
echo "$(left)$(right)"

15
tmux.conf

@ -61,15 +61,20 @@ run -b '~/.tmux/plugins/tpm/tpm'
#set -g pane-active-border-style fg=colour38,bg=default
#set -g window-status-current-style fg=colour38,bg=default
set -g status 2
#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]"
set -g status-format[0] "#(~/.tmux/status-first)"
set -g status-format[1] "#(~/.tmux/status-second)"
# Status length
set -g status-left-length 50
set -g status-right-length 80
#set -g status-left-length 50
#set -g status-right-length 80
# Left side
set -g status-left "#(~/.tmux/left)"
#set -g status-left "#(~/.tmux/left)"
# Right side
set -g status-right '#(~/.tmux/right)'
#set -g status-right '#(~/.tmux/right)'
# Tabs
set -g window-status-current-format "#[fg=yellow, bg=black] #[fg=black]#[bg=yellow] #I #[fg=colour254, bg=colour237] #W #[fg=brightblack]#F "
@ -79,7 +84,7 @@ set -g window-status-bell-style fg=colour39,bg=black
set -g window-status-activity-style fg=colour39,bg=black
set -g monitor-activity off
set-option -g default-shell /usr/local/bin/zsh
set-option -g default-shell "${SHELL}"
bind-key § set-option status
bind-key '#' set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"

Loading…
Cancel
Save