From 35de64fb26a682cf99262e56534e26d0d9054b84 Mon Sep 17 00:00:00 2001 From: Jackson Law <178053+jlaw@users.noreply.github.com> Date: Thu, 9 Apr 2020 14:15:44 -0700 Subject: chore: Use $XDG_CONFIG_HOME for tmux (#549) --- .config/aliasrc | 1 + .config/tmux/tmux.conf | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ .tmux.conf | 57 -------------------------------------------------- 3 files changed, 58 insertions(+), 57 deletions(-) create mode 100644 .config/tmux/tmux.conf delete mode 100644 .tmux.conf diff --git a/.config/aliasrc b/.config/aliasrc index 64d45af..90de3d9 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -41,3 +41,4 @@ alias \ magit="nvim -c MagitOnly" \ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" \ weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \ + tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..6d85cc7 --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,57 @@ +set -g prefix C-a +setw -g mode-keys vi +setw -g mode-style bg=black +set-option -g default-terminal "xterm-256color" +set-option -g pane-active-border-style fg=green +set-window-option -g xterm-keys on # for vim +set-window-option -g mode-keys vi # vi key +set-window-option -g monitor-activity on +set-window-option -g window-status-current-style fg=white +setw -g window-status-current-style reverse +setw -g automatic-rename +set -g mouse on +set -g history-limit 30000 +set -g terminal-overrides 'xterm*:smcup@:rmcup@' +set-option -g status-justify right +set-option -g status-bg black # colour213 # pink +set-option -g status-fg cyan +set-option -g status-interval 5 +set-option -g status-left-length 30 +set-option -g status-left '#[fg=magenta]» #[fg=blue,bold]#T#[default]' +set-option -g status-right '#[fg=red,bold][[ #(git branch) branch ]] #[fg=cyan]»» #[fg=blue,bold]###S #[fg=magenta]%R %m-%d#(acpi | cut -d ',' -f 2)#[default]' +set-option -g visual-activity on +set-option -g set-titles on +set-option -g set-titles-string '#H:#S.#I.#P #W #T' +unbind j +unbind C-b # unbind default leader key +unbind '"' # unbind horizontal split +unbind % # unbind vertical split +bind-key r source-file ~/.tmux.conf +bind-key c split-window -v # split pane horizontally +bind-key v split-window -h # split pane vertically +bind-key Space list-panes +bind-key Enter break-pane +bind-key Space command-prompt "joinp -t:%%" # %% = prompt for window.pane [-V|H] # vert|hor split +bind-key -n C-up prev +bind-key -n C-left prev +bind-key -n C-right next +bind-key -n C-down next +set-window-option -g window-status-current-style bg=red +bind C-c new-window +bind C-j previous-window +bind C-k next-window +#bind-key C-a last-window # C-a C-a for last active window +bind A command-prompt "rename-window %%" +setw -g aggressive-resize on +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R +bind-key -r C-h resize-pane -L +bind-key -r C-j resize-pane -D +bind-key -r C-k resize-pane -U +bind-key -r C-l resize-pane -R +bind o select-layout "active-only" +bind M-- select-layout "even-vertical" +bind M-| select-layout "even-horizontal" +bind M-r rotate-window diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index 6d85cc7..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,57 +0,0 @@ -set -g prefix C-a -setw -g mode-keys vi -setw -g mode-style bg=black -set-option -g default-terminal "xterm-256color" -set-option -g pane-active-border-style fg=green -set-window-option -g xterm-keys on # for vim -set-window-option -g mode-keys vi # vi key -set-window-option -g monitor-activity on -set-window-option -g window-status-current-style fg=white -setw -g window-status-current-style reverse -setw -g automatic-rename -set -g mouse on -set -g history-limit 30000 -set -g terminal-overrides 'xterm*:smcup@:rmcup@' -set-option -g status-justify right -set-option -g status-bg black # colour213 # pink -set-option -g status-fg cyan -set-option -g status-interval 5 -set-option -g status-left-length 30 -set-option -g status-left '#[fg=magenta]» #[fg=blue,bold]#T#[default]' -set-option -g status-right '#[fg=red,bold][[ #(git branch) branch ]] #[fg=cyan]»» #[fg=blue,bold]###S #[fg=magenta]%R %m-%d#(acpi | cut -d ',' -f 2)#[default]' -set-option -g visual-activity on -set-option -g set-titles on -set-option -g set-titles-string '#H:#S.#I.#P #W #T' -unbind j -unbind C-b # unbind default leader key -unbind '"' # unbind horizontal split -unbind % # unbind vertical split -bind-key r source-file ~/.tmux.conf -bind-key c split-window -v # split pane horizontally -bind-key v split-window -h # split pane vertically -bind-key Space list-panes -bind-key Enter break-pane -bind-key Space command-prompt "joinp -t:%%" # %% = prompt for window.pane [-V|H] # vert|hor split -bind-key -n C-up prev -bind-key -n C-left prev -bind-key -n C-right next -bind-key -n C-down next -set-window-option -g window-status-current-style bg=red -bind C-c new-window -bind C-j previous-window -bind C-k next-window -#bind-key C-a last-window # C-a C-a for last active window -bind A command-prompt "rename-window %%" -setw -g aggressive-resize on -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R -bind-key -r C-h resize-pane -L -bind-key -r C-j resize-pane -D -bind-key -r C-k resize-pane -U -bind-key -r C-l resize-pane -R -bind o select-layout "active-only" -bind M-- select-layout "even-vertical" -bind M-| select-layout "even-horizontal" -bind M-r rotate-window -- cgit v1.3.1