Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions etc/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,13 +69,18 @@ set -g status-left "#[fg=white]@#h#[fg=red]:#S#[fg=white] |"
#set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M'
### status-right: IPs and Date and Time
set -g status-right-length 64
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 "#[fg=yellow]%H:%M"

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
}