From b9a956932e349f800acbc1b7523d449ba8bb7915 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Mon, 29 Jan 2024 08:29:19 -0500 Subject: [PATCH] simplified tmux configs --- ...inux,hostname.tower => .tmux.conf##default | 5 +- .tmux.conf##os.Linux | 50 ------------------- 2 files changed, 3 insertions(+), 52 deletions(-) rename .tmux.conf##os.Linux,hostname.tower => .tmux.conf##default (92%) delete mode 100644 .tmux.conf##os.Linux diff --git a/.tmux.conf##os.Linux,hostname.tower b/.tmux.conf##default similarity index 92% rename from .tmux.conf##os.Linux,hostname.tower rename to .tmux.conf##default index 14a12bc..867a7fe 100644 --- a/.tmux.conf##os.Linux,hostname.tower +++ b/.tmux.conf##default @@ -34,6 +34,9 @@ bind h attach-session -t . -c "#{pane_current_path}" # status bar set -g status-right '%H:%m %d-%b-%y ' +if-shell '[[ $(acpi -t) ]]' { + set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y ' +} # Start windows and panes at 1, not 0 set -g base-index 1 @@ -53,5 +56,3 @@ bind-key -r -T prefix M-j resize-pane -D bind-key -r -T prefix M-h resize-pane -L bind-key -r -T prefix M-l resize-pane -R -bind -n S-Left previous-window -bind -n S-Right next-window diff --git a/.tmux.conf##os.Linux b/.tmux.conf##os.Linux deleted file mode 100644 index 434f1d2..0000000 --- a/.tmux.conf##os.Linux +++ /dev/null @@ -1,50 +0,0 @@ -# plugins -set -g @plugin 'alexghergh/nvim-tmux-navigation' - -run '~/.tmux/plugins/tpm/tpm' - -# remap prefix from 'C-b' to 'C-a' -unbind C-b -set-option -g prefix C-a -bind-key C-a send-prefix - -# Enable mouse control (clickable windows, panes, resizable panes) -set -g mouse on - -# Initialize sesions -bind W source-file ~/.tmux/work - -# reload config -bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." - -# spliting windoww -unbind % -unbind '"' -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" - -# sync panes -unbind b -bind b setw synchronize-panes - -# reset working dir for session -unbind h -bind h attach-session -t . -c "#{pane_current_path}" - -# status bar -set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y ' - -# Start windows and panes at 1, not 0 -set -g base-index 1 -set -g pane-base-index 1 -set-window-option -g pane-base-index 1 -set-option -g renumber-windows on - -# navigation -bind-key 'j' select-pane -D -bind-key 'k' select-pane -U -bind-key 'l' select-pane -R -bind-key 'h' select-pane -L - -bind -n S-Left previous-window -bind -n S-Right next-window