Updated tmux sidebar, topbar, and devour

master
Steven Saus 4 years ago
parent 2efffe1b28
commit 391fb2204e
  1. 16
      tmux_devour.sh
  2. 32
      tmux_sidebar.sh
  3. 27
      tmux_topbar.sh

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
##############################################################################
# #maybe use this as a setup for those programs and have a permanent sidebar?
# tmux_devour.sh #tmux send-keys -t "%74" "chafa " "/home/steven/downloads/images/big_keys_for_logo.jpg" "C-m"
# By Steven Saus # See the space!!!
# (c) 2020; licensed under the MIT license #replaces man command - makes help a fallback
# # use pick to deal with the output better
############################################################################## #TOD
c_tmux=$(env | grep -c TMUX) c_tmux=$(env | grep -c TMUX)
if [ $c_tmux -gt 0 ];then if [ $c_tmux -gt 0 ];then
@ -31,4 +31,4 @@
# Is it tmux? # Is it tmux?
# Does the sidebar already exist in this window? # Does the sidebar already exist in this window?
# if not, create sidebar and export variable # if not, create sidebar and export variable

@ -1,25 +1,29 @@
#!/bin/bash #!/bin/bash
##############################################################################
# #maybe use this as a setup for those programs and have a permanent sidebar?
# tmux_sidebar.sh #tmux send-keys -t "%74" "chafa " "/home/steven/downloads/images/big_keys_for_logo.jpg" "C-m"
# By Steven Saus # See the space!!!
# (c) 2020; licensed under the MIT license #replaces man command - makes help a fallback
# # use pick to deal with the output better
############################################################################## #TOD
c_tmux=$(env | grep -c TMUX) c_tmux=$(env | grep -c TMUX)
if [ $c_tmux -gt 0 ];then if [ $c_tmux -gt 0 ];then
command=$(echo "$@") command=$(echo "$@")
o_pane=$(tmux ls -F "#D")
tmux split-window -h tmux split-window -h
#"$command"
c_pane=$(tmux ls -F "#D") c_pane=$(tmux ls -F "#D")
printf '\033]2;%s\033\\' 'sidebar' # Uncomment for left hand sidebar
tmux resize-pane -t "$c_pane" -R 20 #tmux swap-pane -s "$o_pane" -t "$c_pane"
tmux select-pane -m -t "$c_pane" printf '\033]2;%s\033\\' 'topbar'
#echo "$c_pane" tmux resize-pane -t "$c_pane" -R 30
tmux send-keys -t "$c_pane" "$command && exit" C-m command2=$(echo "$command ; tmux kill-pane -t ${c_pane}")
tmux send-keys -t "$c_pane" "$command2" C-m
tmux last-pane
#tmux send-keys -t "$o_pane" C-o C-m
fi fi
# if [ $c_tmux -gt 0 ];then # if [ $c_tmux -gt 0 ];then
# tmux kill-pane -t "$c_pane" # tmux kill-pane -t "$c_pane"

@ -1,23 +1,28 @@
#!/bin/bash #!/bin/bash
##############################################################################
# #maybe use this as a setup for those programs and have a permanent sidebar?
# tmux_topbar.sh #tmux send-keys -t "%74" "chafa " "/home/steven/downloads/images/big_keys_for_logo.jpg" "C-m"
# By Steven Saus # See the space!!!
# (c) 2020; licensed under the MIT license #replaces man command - makes help a fallback
# # use pick to deal with the output better
############################################################################## #TOD
c_tmux=$(env | grep -c TMUX) c_tmux=$(env | grep -c TMUX)
if [ $c_tmux -gt 0 ];then if [ $c_tmux -gt 0 ];then
command=$(echo "$@") command=$(echo "$@")
o_pane=$(tmux ls -F "#D")
tmux split-window -v tmux split-window -v
#"$command" #"$command"
c_pane=$(tmux ls -F "#D") c_pane=$(tmux ls -F "#D")
tmux swap-pane -s "$o_pane" -t "$c_pane"
printf '\033]2;%s\033\\' 'topbar' printf '\033]2;%s\033\\' 'topbar'
tmux resize-pane -t "$c_pane" -R 20 tmux resize-pane -t "$c_pane" -U 14
tmux select-pane -m -t "$c_pane" #tmux select-pane -m -t "$c_pane"
#echo "$c_pane" command2=$(echo "$command ; tmux kill-pane -t ${c_pane}")
tmux send-keys -t "$c_pane" "$command && exit" C-m tmux send-keys -t "$c_pane" "$command2" C-m
tmux last-pane
#tmux send-keys -t "$o_pane" C-o C-m
fi fi

Loading…
Cancel
Save