summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot/tmux.conf147
-rw-r--r--dot/tmux.stage2.conf157
-rwxr-xr-xdot/xinitrc4
3 files changed, 165 insertions, 143 deletions
diff --git a/dot/tmux.conf b/dot/tmux.conf
index 2533760..6802fe9 100644
--- a/dot/tmux.conf
+++ b/dot/tmux.conf
@@ -1,143 +1,10 @@
1# use UTF8 1# this allows 'tmux attach' to work without an existing session; like screen -xRR
2set -g utf8 2new-session
3set-window-option -g utf8 on
4 3
5# make tmux display things in 256 colors 4# However, we don't want new-session to execute for reloads; so the rest
6#set -g default-terminal "screen-256color" 5# of the configuration will go in a separate file that will be sourced
6# here.
7 7
8unbind C-b 8bind r source-file ~/.tmux.stage2.conf \; display "Reloaded!"
9set -g prefix C-z 9source-file ~/.tmux.stage2.conf
10bind z send-prefix
11
12# shorten command delay
13set -sg escape-time 1
14
15# set window and pane index to 1 (0 by default)
16set-option -g base-index 1
17setw -g pane-base-index 1
18
19# reload ~/.tmux.conf using PREFIX r
20bind r source-file ~/.tmux.conf \; display "Reloaded!"
21
22# use PREFIX | to split window horizontally and PREFIX - to split vertically
23bind | split-window -h
24bind - split-window -v
25
26# Make the current window the first window
27bind C-z swap-window -t 1
28
29# map Vi movement keys as pane movement keys
30bind h select-pane -L
31bind j select-pane -D
32bind k select-pane -U
33bind l select-pane -R
34
35# and use C-h and C-l to cycle thru panes
36bind -r C-h select-window -t :-
37bind -r C-l select-window -t :+
38
39# resize panes using PREFIX H, J, K, L
40bind H resize-pane -L 5
41bind J resize-pane -D 5
42bind K resize-pane -U 5
43bind L resize-pane -R 5
44
45# C-i for even-vertical arrangement and C-o to zoom current pane
46#bind-key C-i select-layout even-vertical
47#bind-key C-v select-layout even-horizontal
48#bind-key C-o resize-pane -y 1000
49
50# Sync panes
51#bind C-s set-window-option synchronize-panes
52
53# explicitly disable mouse control
54#setw -g mode-mouse off
55#set -g mouse-select-pane off
56#set -g mouse-resize-pane off
57#set -g mouse-select-window off
58
59# ---------------------
60# Copy & Paste
61# ---------------------
62# provide access to the clipboard for pbpaste, pbcopy
63#set-option -g default-command "reattach-to-user-namespace -l zsh"
64#set-window-option -g automatic-rename on
65
66# use vim keybindings in copy mode
67setw -g mode-keys vi
68
69# setup 'v' to begin selection as in Vim
70#bind-key -t vi-copy v begin-selection
71#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
72
73# update default binding of 'Enter' to also use copy-pipe
74#unbind -t vi-copy Enter
75#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
76
77#bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
78#bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
79
80# Save entire tmux history to a file - file will be on machine where tmux is
81# running
82#bind-key * command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
83
84# -----------------------
85# Multistart panes
86# ----------------------
87#bind-key P run-shell 'tmux-multistart as'
88#bind-key A run-shell 'tmux-multistart alpha'
89#bind-key B run-shell 'tmux-multistart beta'
90#bind-key W run-shell 'tmux-multistart web'
91#bind-key D run-shell 'tmux-multistart dev'
92#bind-key T run-shell 'tmux-multistart txhub'
93
94#bind-key C command-prompt -p "machine(s)/group: " "run-shell 'tmux-multistart %1'"
95
96# ----------------------
97# set some pretty colors
98# ----------------------
99# set pane colors - hilight the active pane
100#set-option -g pane-border-fg colour235 #base02
101#set-option -g pane-active-border-fg colour33 #blue
102#set-option -g pane-active-border-fg colour240 #base01
103
104# colorize messages in the command line
105#set-option -g message-bg black #base02
106#set-option -g message-fg brightred #orange
107
108# ----------------------
109# Status Bar
110# -----------------------
111#set-option -g status on # turn the status bar on
112#set -g status-utf8 on # set utf-8 for the status bar
113#set -g status-interval 5 # set update frequencey (default 15 seconds)
114#set -g status-justify centre # center window list for clarity
115# set-option -g status-position top # position the status bar at top of screen
116
117# visual notification of activity in other windows
118#setw -g monitor-activity on
119#set -g visual-activity on
120
121# set color for status bar
122#set-option -g status-bg colour235 #base02
123#set-option -g status-fg yellow #yellow
124#set-option -g status-attr dim
125
126# set window list colors - red for active and cyan for inactive
127#set-window-option -g window-status-fg brightblue #base0
128#set-window-option -g window-status-bg colour236
129#set-window-option -g window-status-attr dim
130
131#set-window-option -g window-status-current-fg brightred #orange
132#set-window-option -g window-status-current-bg colour236
133#set-window-option -g window-status-current-attr bright
134
135# show host name and IP address on left side of status bar
136#set -g status-left-length 85
137#set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(dig +short myip.opendns.com @resolver1.opendns.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #(ifconfig en3 | grep 'inet ' | awk '{print \"en3 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #[fg=green]#(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk -F': ' '/ SSID/{print $2}') "
138
139# show session name, window & pane number, date and time on right side of
140# status bar
141#set -g status-right-length 60
142#set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %l:%M %p : #(date -u | awk '{print $4}') :"
143 10
diff --git a/dot/tmux.stage2.conf b/dot/tmux.stage2.conf
new file mode 100644
index 0000000..915b203
--- /dev/null
+++ b/dot/tmux.stage2.conf
@@ -0,0 +1,157 @@
1# use UTF8
2set -g utf8
3set-window-option -g utf8 on
4
5# make tmux display things in 256 colors
6#set -g default-terminal "screen-256color"
7
8unbind C-b
9set -g prefix C-z
10bind z send-prefix
11
12# redundantly bind some frequent commands so that the Control key does not have to be released
13bind-key C-n next-window
14bind-key C-p previous-window
15bind-key C-z last-window
16bind-key C-c new-window
17
18# Use vi-like keys to do selection and copying. Ctrl-A Escape starts copy mode,
19# 'v' starts text selection and 'y' copies (yanks).
20bind-key Escape copy-mode
21bind-key [ copy-mode
22bind-key C-[ copy-mode
23bind-key -t vi-copy v begin-selection
24bind-key -t vi-copy y copy-selection
25bind-key -t vi-copy Enter copy-selection
26#bind-key C-y run "tmux save-buffer - | xclip -i -selection clipboard"
27#bind-key C-p run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
28
29# TODO: get more from https://github.com/aaronbieber/dotfiles/blob/master/configs/tmux.conf
30
31# shorten command delay
32set -sg escape-time 1
33
34# set window and pane index to 1 (0 by default)
35set-option -g base-index 1
36setw -g pane-base-index 1
37
38# use PREFIX | to split window horizontally and PREFIX - to split vertically
39bind | split-window -h
40bind - split-window -v
41
42# map Vi movement keys as pane movement keys
43bind h select-pane -L
44bind j select-pane -D
45bind k select-pane -U
46bind l select-pane -R
47
48# and use C-h and C-l to cycle thru panes
49bind -r C-h select-window -t :-
50bind -r C-l select-window -t :+
51
52# resize panes using PREFIX H, J, K, L
53bind H resize-pane -L 5
54bind J resize-pane -D 5
55bind K resize-pane -U 5
56bind L resize-pane -R 5
57
58# C-i for even-vertical arrangement and C-o to zoom current pane
59#bind-key C-i select-layout even-vertical
60#bind-key C-v select-layout even-horizontal
61#bind-key C-o resize-pane -y 1000
62
63# Sync panes
64#bind C-s set-window-option synchronize-panes
65
66# explicitly disable mouse control
67#setw -g mode-mouse off
68#set -g mouse-select-pane off
69#set -g mouse-resize-pane off
70#set -g mouse-select-window off
71
72# ---------------------
73# Copy & Paste
74# ---------------------
75# provide access to the clipboard for pbpaste, pbcopy
76#set-option -g default-command "reattach-to-user-namespace -l zsh"
77#set-window-option -g automatic-rename on
78
79# use vim keybindings in copy mode
80setw -g mode-keys vi
81
82# setup 'v' to begin selection as in Vim
83#bind-key -t vi-copy v begin-selection
84#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
85
86# update default binding of 'Enter' to also use copy-pipe
87#unbind -t vi-copy Enter
88#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
89
90#bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
91#bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
92
93# Save entire tmux history to a file - file will be on machine where tmux is
94# running
95#bind-key * command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
96
97# -----------------------
98# Multistart panes
99# ----------------------
100#bind-key P run-shell 'tmux-multistart as'
101#bind-key A run-shell 'tmux-multistart alpha'
102#bind-key B run-shell 'tmux-multistart beta'
103#bind-key W run-shell 'tmux-multistart web'
104#bind-key D run-shell 'tmux-multistart dev'
105#bind-key T run-shell 'tmux-multistart txhub'
106
107#bind-key C command-prompt -p "machine(s)/group: " "run-shell 'tmux-multistart %1'"
108
109# ----------------------
110# set some pretty colors
111# ----------------------
112# set pane colors - hilight the active pane
113#set-option -g pane-border-fg colour235 #base02
114#set-option -g pane-active-border-fg colour33 #blue
115#set-option -g pane-active-border-fg colour240 #base01
116
117# colorize messages in the command line
118#set-option -g message-bg black #base02
119#set-option -g message-fg brightred #orange
120
121# ----------------------
122# Status Bar
123# -----------------------
124#set-option -g status on # turn the status bar on
125#set -g status-utf8 on # set utf-8 for the status bar
126#set -g status-interval 5 # set update frequencey (default 15 seconds)
127#set -g status-justify centre # center window list for clarity
128# set-option -g status-position top # position the status bar at top of screen
129
130# visual notification of activity in other windows
131#setw -g monitor-activity on
132#set -g visual-activity on
133
134# set color for status bar
135#set-option -g status-bg colour235 #base02
136#set-option -g status-fg yellow #yellow
137#set-option -g status-attr dim
138
139# set window list colors - red for active and cyan for inactive
140#set-window-option -g window-status-fg brightblue #base0
141#set-window-option -g window-status-bg colour236
142#set-window-option -g window-status-attr dim
143
144#set-window-option -g window-status-current-fg brightred #orange
145#set-window-option -g window-status-current-bg colour236
146#set-window-option -g window-status-current-attr bright
147
148# show host name and IP address on left side of status bar
149#set -g status-left-length 85
150#set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(dig +short myip.opendns.com @resolver1.opendns.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #(ifconfig en3 | grep 'inet ' | awk '{print \"en3 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #[fg=green]#(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk -F': ' '/ SSID/{print $2}') "
151
152# show session name, window & pane number, date and time on right side of
153# status bar
154#set -g status-right-length 60
155#set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %l:%M %p : #(date -u | awk '{print $4}') :"
156
157
diff --git a/dot/xinitrc b/dot/xinitrc
index 2117999..796fb15 100755
--- a/dot/xinitrc
+++ b/dot/xinitrc
@@ -21,9 +21,7 @@ setxkbmap -option terminate:ctrl_alt_bksp -option caps:super
21gsettings set org.gnome.libgnomekbd.keyboard options "['terminate\tterminate:ctrl_alt_bksp', 'caps\tcaps:super']" 21gsettings set org.gnome.libgnomekbd.keyboard options "['terminate\tterminate:ctrl_alt_bksp', 'caps\tcaps:super']"
22 22
23( 23(
24 cd $HOME/src/samizdat; 24 exec xterm -e tmux attach
25 screen -d -m -S samizdat;
26 exec xterm -geometry 160x64+0+0 -e screen -xRR samizdat
27) & 25) &
28# xcompmgr -c & 26# xcompmgr -c &
29if [ "$USING_GNOME" ]; then 27if [ "$USING_GNOME" ]; then