Skip to content

Instantly share code, notes, and snippets.

@comdotlinux
Last active October 10, 2022 00:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save comdotlinux/fb0050c65128fe5f7543194c8ec874aa to your computer and use it in GitHub Desktop.
tmux config file
# for ubuntu
#source /usr/share/powerline/bindings/tmux/powerline.conf
#for fedora
source "/usr/share/tmux/powerline.conf"
## Common, I hope
source /usr/share/byobu/keybindings/tmux-screen-keys.conf
set-option -g default-terminal "screen-256color"
set -g status-left-length 150
set -g status-right-length 180
# Use Shift-arrow keys without prefix key to switch panes
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R
bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
# Use
bind -n M-Left resize-pane -L
bind -n M-Right resize-pane -R
bind -n M-Up resize-pane -U
bind -n M-Down resize-pane -D
# Use Ctrl-arrow keys without prefix key to switch panes
bind -n C-Left select-window -p
bind -n C-Right select-window -n
bind -n C-Up last-window
bind -n C-Down next-window
# No delay for escape key press
set -sg escape-time 0
set -sg history-limit 50000
set -sg base-index 1
# Set the name of the pane usingthe command run at the tops
set -g pane-border-status top
set -g pane-border-format "#P: #T #{pane_current_command}"
# Split Pane Vertically by using Ctrl+a |
bind | split-window -h -c "#{pane_current_path}"
# Split Pane Horizontally by using Ctrl+a -
bind - split-window -v -c "#{pane_current_path}"
# I use zsh, you can remove / comment this line if you use a different one
set-option -g default-shell "/usr/bin/zsh"
# This name is then referenced all over later but can be changed, it's nothing special
new-session -A -s local-session
rename-window -t local-session:1 general
send-keys -R -t local-session:general "screenfetch" Enter
send-keys -R -t local-session:general "duf" Enter
new-window -ak -n bpytop
send-keys -R -t local-session:bpytop "bpytop" Enter
new-window -ak -n lazydocker
send-keys -R -t local-session:lazydocker "lazydocker" Enter
new-window -ak -n local
send-keys -R -t local-session:local "cd /home/luke/repos/tmuxdemo" Enter
send-keys -R -t local-session:local "./gradlew build jibDockerBuild"
select-window -t local-session:lazydocker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment