# Copyright (c) 2024 Julian Mendoza # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # Notes # - Use `$ tmux display -p '...'` to print to stdout # Rebind Prefix #unbind-key C-b #set -g prefix 'C-\' #bind-key 'C-\' send-prefix # Vi Mode set-option -g mode-keys vi # Refresh config file bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" # Zoom in on current pane bind-key C-b resize-pane -Z # Create VIM Style splitting bind s split-window -v -c "#{pane_current_path}" bind v split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # HJKL Window Nagivation bind h select-pane -L bind l select-pane -R bind j select-pane -D bind k select-pane -U # VIM Style Window Resizing bind < resize-pane -L 10 bind > resize-pane -R 10 bind - resize-pane -D 10 bind + resize-pane -U 10 bind = move-window -r # Allow swapping of windows bind-key -n C-S-Left swap-window -d -t -1 bind-key -n C-S-Right swap-window -d -t +1 # Use Alt-vim keys without prefix to switch panes bind -n M-h select-pane -L bind -n M-j select-pane -D bind -n M-k select-pane -U bind -n M-l select-pane -R # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window bind C-p previous-window bind C-n next-window # Automatically set window title set-window-option -g automatic-rename on set-option -g set-titles on # bat percentage: upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | awk '{print $2}' # auto-set terminal title to current window pane's title set-option -g set-titles on set-option -g status-style 'fg=colour15,bg=colour233' set-option -g status-left ' #S ' set-option -g status-left-style 'fg=colour248,bg=colour236' set-option -g status-right-style 'fg=colour22,bg=colour148' set-option -g status-right '#[fg=colour15,bg=colour233] #{host} #[fg=colour248,bg=colour236] #{pid} #[fg=colour22,bg=colour148] %I:%M%P ' set-option -g status-interval '1' set-window-option -g window-status-current-style 'fg=colour22,bg=colour148' set-window-option -g window-status-current-format ' #I:#W#F ' set-window-option -g window-status-format ' #I:#W#F ' set-option -g pane-border-style 'fg=colour239' set-option -g pane-active-border-style 'fg=colour208' set-option -g message-style 'fg=#ffd324,bg=#514721' # notice (yellow) set-window-option -g mode-style 'fg=#ffd324,bg=#514721' # notice (yellow) set-window-option -g window-status-bell-style 'bg=#205791,fg=#d5edf8' # info (blue) set-window-option -g window-status-activity-style 'bg=#8a1f11,fg=#fbe3e4' # error (red)