initial commit + tmux.conf

This commit is contained in:
2022-08-05 20:52:23 +03:00
commit f97c9c9a12
5 changed files with 110 additions and 0 deletions

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty

1
dotbot Submodule

Submodule dotbot added at d2f76a2593

15
install Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"

11
install.conf.yaml Normal file
View File

@@ -0,0 +1,11 @@
- defaults:
link:
relink: true
- clean: ['~']
- link:
~/.tmux.conf: tmux.conf
- shell:
- [git submodule update --init --recursive, Installing submodules]

79
tmux.conf Executable file
View File

@@ -0,0 +1,79 @@
set -g mouse on
set -g set-clipboard external
set-option -g status-position top
# remap prefix from 'C-b' to 'C-x', 0x18 hex code for iterm2
unbind C-b
set-option -g prefix C-x
bind-key C-x send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switching and creating windows using Shift-arrow without prefix
bind -n S-down new-window
bind -n S-left prev
bind -n S-right next
# resizing panes using Ctrl-Alt-arrows without prefix
bind -n C-M-Up resize-pane -U 2
bind -n C-M-Down resize-pane -D 2
bind -n C-M-Left resize-pane -L 10
bind -n C-M-Right resize-pane -R 10
bind -n C-M-k resize-pane -U 2
bind -n C-M-j resize-pane -D 2
bind -n C-M-h resize-pane -L 10
bind -n C-M-l resize-pane -R 10
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
###########################
# Colors
###########################
# color status bar
set -g status-style fg=white,bg=colour235
# color of message bar
set -g message-style fg=white,bold,bg=green
# highlight current window
setw -g window-status-style fg=cyan,bg=colour235
setw -g window-status-current-style fg=white,bold,bg=red
# set color of active pane
set -g pane-border-style fg=colour240,bg=black
set -g pane-active-border-style fg=green,bg=black
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"