diff --git a/tmux/.config/tmux/keymaps.conf b/tmux/.config/tmux/keymaps.conf new file mode 100644 index 0000000..0daccde --- /dev/null +++ b/tmux/.config/tmux/keymaps.conf @@ -0,0 +1,37 @@ +# set prefix key +unbind C-b +set-option -g prefix C-Space + +# general keybindings +bind r source-file ~/.config/tmux/tmux.conf \; display-message "config reloaded" + +# window navigation +bind -n M-Left previous-window +bind -n M-Right next-window +bind-key -n M-S-Left swap-window -t -1 -d +bind-key -n M-S-Right swap-window -t +1 -d +#bind-key -n M-S-Left move-window -b -s +0 -t -1 +#bind-key -n M-S-Right move-window -a -s +0 -t +1 + +# pane navigation +bind -n C-h select-pane -L +bind -n C-j select-pane -D +bind -n C-k select-pane -U +bind -n C-l select-pane -R + +bind -n M-j swap-pane -D +bind -n M-k swap-pane -U + +unbind x +bind x kill-pane -t +0 + +# keymaps for splitting +bind v split-pane -v +bind h split-pane -h +bind b break-pane +unbind t +bind t command-prompt -p "move pane to window:" "join-pane -t '%%'" + +# detach current session and close terminal +bind k run "tmux detach -P" + diff --git a/tmux/.config/tmux/zegonix.conf b/tmux/.config/tmux/themes/zegonix.conf similarity index 100% rename from tmux/.config/tmux/zegonix.conf rename to tmux/.config/tmux/themes/zegonix.conf diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 766e274..d7680f2 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -5,27 +5,6 @@ set-option -g default-command "/bin/bash" # enable rgb colors set-option -sa terminal-features ',xterm-256color:RGB' -# set prefix key -unbind C-b -set-option -g prefix C-Space - -# general keybindings -bind r source-file ~/.config/tmux/tmux.conf \; display-message "config reloaded" - -# window navigation -bind -n M-S-Left previous-window -bind -n M-S-Right next-window -bind-key -r > swap-window -t :+1 \; select-window -t +1 -bind-key -r < swap-window -t :-1 \; select-window -t -1 - -# pane navigation -bind -n M-Left select-pane -L -bind -n M-Down select-pane -D -bind -n M-Up select-pane -U -bind -n M-Right select-pane -R - -bind k run "tmux detach -P" - # enable mouse support set -g mouse on # bind -n WheelUpPane { @@ -48,5 +27,8 @@ set-option -g renumber-windows on # status bar set -g status-interval 5 +# source keymaps +source $HOME/.config/tmux/keymaps.conf + # source custom theme -source ~/dotfiles/tmux/.config/tmux/zegonix.conf +source $HOME/.config/tmux/themes/zegonix.conf