diff --git a/.tmux.conf b/.tmux.conf index 83a6022..73ac60d 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -54,15 +54,15 @@ bind L resize-pane -R 5 ## set some pretty colors ## ---------------------- ## set pane colors - hilight the active pane -set -g pane-border-style bg=colour0,fg=colour1 -set -g pane-active-border-style bg=colour8,fg=colour2 +set -g pane-border-style bg=colour0,fg=colour8 +set -g pane-active-border-style bg=colour36,fg=colour2 ## colorize messages in the command line set-option -g message-style bg=colour0,fg=colour9 #set inactive/active window styles -set -g window-style fg=colour247,bg=colour236 -set -g window-active-style fg=colour250,bg=black +set -g window-style fg=colour0,bg=colour8 +set -g window-active-style fg=colour36,bg=colour2 ## ---------------------- ## Status Bar @@ -80,7 +80,7 @@ set-option -g status-style bg=colour0,fg=colour7,bright ## set window list colors set-window-option -g window-status-style fg=colour8,bg=colour0,bright -set-window-option -g window-status-current-style fg=colour35,bg=colour0,bright +set-window-option -g window-status-current-style fg=colour36,bg=colour0,bright ## show host name and IP address on left side of status bar set -g status-left-length 70 diff --git a/README.md b/README.md index 3091a04..ddfd14e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +--- +filename: README +filecreated: +fileupdated: 2024-03-21 14:22 +filetags: [readme] +--- + # tmux-menu.sh A hack tmux menu script to manage multiple tmux sessions @@ -10,20 +17,18 @@ REQ: tmux v3+ ## Need -After I discovered tmux I searched for a way to manage multiple groups of tmux sessions under one unified script. - -Not finding anything (or maybe just not looking well enough) I decided to write my own. - -It's not pretty, but I've been using for a couple of years now and it's become an integral part of my workflow. +After I discovered tmux I searched for a way to manage multiple groups of tmux sessions under one unified script. Not +finding anything (or maybe just not looking well enough) I decided to write my own. It's not pretty, but I've been +using for a couple of years now and it's become an integral part of my workflow. My setup works this way: Imagine you have multiple SSH connections -* web-dev -* web-prod -* database-dev -* database-prod +- web-dev +- web-prod +- database-dev +- database-prod and you want to group them together in similar groups. @@ -31,7 +36,7 @@ With this script you can name collections of sessions and switch between them ea Let's see an example using the above connections: -```shell +```bash case $session in web) if [[ $tcheck == 0 ]]; then @@ -57,7 +62,7 @@ case $session in Calling the script with a pre-determined session name (ex: `./tmux-menu.sh web` or `./tmux-menu.sh database`) first checks to see if there is already a session group with that name. If not, it creates a new group with the commands you -specify and names each connection in tmux. +specify and names each connection in tmux. If the session group *does* already exist, it simply switches you to that group. @@ -71,6 +76,7 @@ Killing session groups is as easy as `tmux-session kill -t web`. ## Use I've found that I use this script on different servers with different configurations. So I copy the -`tmux-menu.template.sh` to `$HOME/tmux-menu.sh` and then alias that to `tm`. +`tmux-menu.template.sh` to `$HOME/tmux-menu.sh` and then alias that to `tm`. -I also include my `.tmux.conf` file with comments about what does what. If you choose to use it, make sure to copy it to your home directory. +I also include my `.tmux.conf` file with comments about what does what. If you choose to use it, make sure to copy it +to your home directory.