aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-03-01 02:19:49 -0500
committertdro <tdro@users.noreply.github.com>2021-03-01 03:10:47 -0500
commitec47b6f270f391ea0232e2d7f94596eaccc668fe (patch)
treedcaeb3afb0d63810c77145fadb03e72de3b6c5f1
parentf893d09ab81649e85c5936eaf7f060777cc4789d (diff)
downloaddotfiles-ec47b6f270f391ea0232e2d7f94596eaccc668fe.tar.gz
dotfiles-ec47b6f270f391ea0232e2d7f94596eaccc668fe.tar.bz2
dotfiles-ec47b6f270f391ea0232e2d7f94596eaccc668fe.zip
.config: Add tmux
-rw-r--r--.config/nixpkgs/config.nix1
-rw-r--r--.config/tmux/tmux.conf53
-rw-r--r--.config/xbindkeysrc6
3 files changed, 59 insertions, 1 deletions
diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix
index 3c2204c..d509b00 100644
--- a/.config/nixpkgs/config.nix
+++ b/.config/nixpkgs/config.nix
@@ -82,6 +82,7 @@ in
sshfs
surfraw
tcl
+ tmux
trash-cli
units
vale
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
new file mode 100644
index 0000000..a9440d9
--- /dev/null
+++ b/.config/tmux/tmux.conf
@@ -0,0 +1,53 @@
+# set default shell
+set -g default-command "${SHELL}"
+
+# set prefix to ctrl+a
+set -g prefix C-a
+bind C-a send-prefix
+unbind C-b
+
+# settings
+set -g mouse on
+set -g status off
+set -g base-index 1
+set -g mode-keys vi
+set -sg escape-time 1
+set -g visual-activity on
+set -g history-limit 10000
+setw -g monitor-activity on
+setw -g pane-base-index 1
+
+# border colours
+set -g pane-border-style fg=colour0
+set -g pane-active-border-style fg=colour0
+
+# y and p as in vim
+bind Escape copy-mode
+unbind p
+bind p paste-buffer
+bind-key -T copy-mode-vi 'v' send -X begin-selection
+bind-key -T copy-mode-vi 'y' send -X copy-selection
+bind-key -T copy-mode-vi 'Space' send -X halfpage-down
+bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up
+
+# easy-to-remember split pane commands
+bind | split-window -h
+bind - split-window -v
+unbind '"'
+unbind %
+
+# moving between panes with vim movement keys
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+# moving between windows with vim movement keys
+bind -r C-h select-window -t :-
+bind -r C-l select-window -t :+
+
+# resize panes with vim movement keys
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r L resize-pane -R 5
diff --git a/.config/xbindkeysrc b/.config/xbindkeysrc
index f9e81c1..21573be 100644
--- a/.config/xbindkeysrc
+++ b/.config/xbindkeysrc
@@ -96,4 +96,8 @@
# Terminal Tabbed
"urxvt -pe tabbed"
- Alt+Mod4 + Return
+ Alt + Mod4 + Return
+
+# Terminal Multiplexer
+"urxvt -e tmux attach"
+ Control + Mod4 + Return