diff --git a/etc/tmux.conf b/etc/tmux.conf index de1b2e03..3227430e 100644 --- a/etc/tmux.conf +++ b/etc/tmux.conf @@ -27,11 +27,17 @@ bind-key j join-pane -s ! bind-key J join-pane ### Move current window to session named "bg" (and create session if it does not exist) -bind-key B if-shell "! tmux has-session -t bg" "new-session -d -s bg" \; move-window -t bg +bind-key B if-shell '! tmux has-session -t bg' { + new-session -d -s bg + move-window -t bg +} -### Reload Config -if-shell "! (env | grep -q TMUX=/tmp/tmate)" \ - "bind-key R source-file ~/.tmux.conf \\; source-file -q ~/.tmux.conf.local \\; display-message '~/.tmux.conf[.local] reloaded'" +### Reload User Configs +if-shell '! (env | grep -q TMUX=/tmp/tmate)' { + bind-key R source-file ~/.tmux.conf + source-file -q ~/.tmux.conf.local + display-message "~/.tmux.conf[.local] reloaded" +} ###rebind keys bind-key h next-layout @@ -62,7 +68,11 @@ set -g status-left "#[fg=white]@#h#[fg=red]:#S#[fg=white] |" #set -g status-right-length 16 #set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M' ### status-right: IPs and Date and Time -if-shell "command -v hostname && hostname --help | grep -q -- -I" { set -g status-right "#[fg=green](net: #(hostname -I | sed -e 's/ [^ ]*:.*$//;s/ / | /g;s/ | $//')) #[fg=yellow]%Y-%m-%d %H:%M" } { set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M' } +if-shell 'command -v hostname && hostname --help | grep -q -- -I' { + set -g status-right "#[fg=green](net: #(hostname -I | sed -e 's/ [^ ]*:.*$//;s/ / | /g;s/ | $//')) #[fg=yellow]%Y-%m-%d %H:%M" +} { + set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M' +} ### status-right: Time #set -g status-right-length 6 #set -g status-right "#[fg=yellow]%H:%M" @@ -71,5 +81,6 @@ set-window-option -g window-status-style fg=blue,bg=black set-window-option -g window-status-current-style bold ### source user-specific local configuration file -if-shell "! (env | grep -q TMUX=/tmp/tmate)" \ - "source-file -q ~/.tmux.conf.local" +if-shell '! (env | grep -q TMUX=/tmp/tmate)' { + source-file -q ~/.tmux.conf.local +}