File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ bind-key C-a send-prefix
40
40
bind c new-window -c " ~" -n " " \; display-message " Consider using C-t to create a new window"
41
41
bind -n C-t new-window -c " ~" -n " "
42
42
43
- # close a window with C-w
44
- bind -n C-w kill-window
43
+ # close a window with C-w (with confirm-before)
44
+ bind -n C-w confirm-before -y -p " Close window? (Y/n) " " kill-window"
45
45
46
46
# split panes using | and -; new pane defaults to current directory
47
47
bind | split-window -h -c " #{pane_current_path}"
48
48
bind - split-window -v -c " #{pane_current_path}"
49
49
50
- # reload config file
51
- bind r source-file ~ /.tmux.conf \ ; display-message " Reloaded .tmux.conf"
50
+ # reload config file (with confirm-before)
51
+ bind r confirm-before -y -p " Reload ` ~/.tmux.conf ` ? (Y/n) " " source-file ~/.tmux.conf ; display-message \ " Reloaded .tmux.conf\" "
52
52
53
53
# Enable mouse mode (tmux 2.1 and above).
54
54
set -g mouse on
@@ -106,6 +106,8 @@ set -g @plugin 'tmux-plugins/tpm'
106
106
# github.com/tmux-plugins/tmux-resurrect
107
107
# C-a + C-s - save current session
108
108
# C-a + C-r - restore saved session
109
+ # TODO consider contributing to this project by implementing optional
110
+ # `confirm-before` usage for these shortcuts.
109
111
set -g @plugin ' tmux-plugins/tmux-resurrect'
110
112
111
113
# https://github.com/seebi/tmux-colors-solarized
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ source $ZSH/oh-my-zsh.sh
29
29
#
30
30
# This configuration should apply to all synchronized machines that make use of
31
31
# https://github.com/izzygomez/dotfiles or
32
- # https://github.com/izzygomez/new-laptop- setup
32
+ # https://github.com/izzygomez/mac- setup-scripts
33
33
# ###############################################################################
34
34
35
35
if is_command_available emacs; then
50
50
echo " ~/.zshrc: git is not available, can't set settings."
51
51
fi
52
52
53
+ if is_command_available tmux; then
54
+ # Some useful & opinionated tmux aliases
55
+ alias t=' tmux'
56
+
57
+ alias tl=' tmux ls'
58
+
59
+ # Create a new tmux session with a blank window in "~"
60
+ alias tmuxnew=' tmux new -n "" -c "~" -s'
61
+ alias tn=' tmuxnew'
62
+
63
+ # Attach to a tmux session while detaching any other clients
64
+ alias tmuxattach=' tmux attach -dt'
65
+ alias ta=' tmuxattach'
66
+ else
67
+ echo " ~/.zshrc: tmux is not available, can't set settings."
68
+ fi
69
+
53
70
# Shortcut for having a browsable history, with date & time stamps
54
71
alias hl=' history -f | less'
55
72
You can’t perform that action at this time.
0 commit comments