Skip to content

Instantly share code, notes, and snippets.

@2O4

2O4/.tmux-zen-mode.conf

Last active Sep 16, 2020
Embed
What would you like to do?
Tmux zen mode wich reproduce VSCode's zen mode (Ctrl+k z)
# [...] inside .tmux.conf
bind z source-file ~/.config/tmux/zen.tmux # Or the script destination
bind C-z source-file ~/.config/tmux/exit-zen.tmux # Or the script destination
# [...]
# exit zen mode
# ! don't forget to have your main window active !
kill-pane -a -t 2
# Create 2 empty pane on the side of the main one
# ! you need to have only one pane when activating zen mode !
# reproduce VSCode zen mode
#new-window -n "zen" # if you want it created in a new window
# 25% side bars: 75 - 33
# 20% side bars: 80 - 25
splitw -h -p 80 -c '~' '' # create the right empty pane
splitw -h -p 25 -c '~' '' # create the left empty pane
swap-pane -s 1 -t 2 # swap because pane are created on the right side
selectp -t 2 # refocus on the main pane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment