larme revised this gist . Go to revision
1 file changed, 18 insertions, 17 deletions
min-setup.sh
| @@ -16,12 +16,6 @@ alias diru='du -h -d 1' | |||
| 16 | 16 | ||
| 17 | 17 | alias ca='docker exec -it -u larme cpu-devbox bash -l' | |
| 18 | 18 | alias ga='docker exec -it -u larme gpu-devbox bash -l' | |
| 19 | - | # emacs | |
| 20 | - | alias ec='emacsclient' | |
| 21 | - | alias es='emacsclient -n' | |
| 22 | - | alias et='emacsclient -t' | |
| 23 | - | ||
| 24 | - | #export EDITOR=emacsclient | |
| 25 | 19 | EOF | |
| 26 | 20 | ) | |
| 27 | 21 | echo "$MINRC" > ~/.min.rc | |
| @@ -40,16 +34,23 @@ set-option -g default-command 'command -v reattach-to-user-namespace >/dev/null | |||
| 40 | 34 | set-option -g mouse on | |
| 41 | 35 | bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" | |
| 42 | 36 | bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" | |
| 37 | + | ||
| 38 | + | # simulate tab | |
| 39 | + | set -g base-index 1 # Start numbering windows at 1, not 0. | |
| 40 | + | set -g pane-base-index 1 # Start numbering panes at 1, not 0. | |
| 41 | + | bind -n C-M-t new-window | |
| 42 | + | bind -n C-M-s next-window | |
| 43 | + | bind -n C-M-a previous-window | |
| 44 | + | ||
| 45 | + | set -g status-style "bg=default" | |
| 46 | + | set -g window-status-current-style "bg=default,reverse" | |
| 47 | + | set -g window-status-separator '' # No spaces between windows in the status bar. | |
| 48 | + | set -g window-status-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } " | |
| 49 | + | set -g window-status-current-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } " | |
| 50 | + | ||
| 51 | + | set -g status-left '' | |
| 52 | + | set -g status-right '' | |
| 53 | + | ||
| 43 | 54 | EOF | |
| 44 | 55 | ) | |
| 45 | - | echo "$TMUXCONF" > ~/.tmux.conf | |
| 46 | - | ||
| 47 | - | MGCONF=$(cat <<EOF | |
| 48 | - | backup-to-home-directory | |
| 49 | - | global-set-key "\^j\^o" switch-to-buffer | |
| 50 | - | global-set-key "\^j\^f" find-file | |
| 51 | - | global-set-key "\^j\^r" execute-extended-command | |
| 52 | - | global-set-key "\ez" undo | |
| 53 | - | EOF | |
| 54 | - | ) | |
| 55 | - | echo "$MGCONF" > ~/.mg | |
| 56 | + | echo "$TMUXCONF" > ~/.tmux.conf | |
larme revised this gist . Go to revision
1 file changed, 6 insertions
min-setup.sh
| @@ -16,6 +16,12 @@ alias diru='du -h -d 1' | |||
| 16 | 16 | ||
| 17 | 17 | alias ca='docker exec -it -u larme cpu-devbox bash -l' | |
| 18 | 18 | alias ga='docker exec -it -u larme gpu-devbox bash -l' | |
| 19 | + | # emacs | |
| 20 | + | alias ec='emacsclient' | |
| 21 | + | alias es='emacsclient -n' | |
| 22 | + | alias et='emacsclient -t' | |
| 23 | + | ||
| 24 | + | #export EDITOR=emacsclient | |
| 19 | 25 | EOF | |
| 20 | 26 | ) | |
| 21 | 27 | echo "$MINRC" > ~/.min.rc | |
larme revised this gist . Go to revision
1 file changed, 11 insertions, 1 deletion
min-setup.sh
| @@ -36,4 +36,14 @@ bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" " | |||
| 36 | 36 | bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" | |
| 37 | 37 | EOF | |
| 38 | 38 | ) | |
| 39 | - | echo "$TMUXCONF" > ~/.tmux.conf | |
| 39 | + | echo "$TMUXCONF" > ~/.tmux.conf | |
| 40 | + | ||
| 41 | + | MGCONF=$(cat <<EOF | |
| 42 | + | backup-to-home-directory | |
| 43 | + | global-set-key "\^j\^o" switch-to-buffer | |
| 44 | + | global-set-key "\^j\^f" find-file | |
| 45 | + | global-set-key "\^j\^r" execute-extended-command | |
| 46 | + | global-set-key "\ez" undo | |
| 47 | + | EOF | |
| 48 | + | ) | |
| 49 | + | echo "$MGCONF" > ~/.mg | |
larme revised this gist . Go to revision
1 file changed, 39 insertions
min-setup.sh(file created)
| @@ -0,0 +1,39 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | ||
| 3 | + | mkdir -p ~/tmp ~/codes ~/soft ~/bentoml ~/notebooks ~/x ~/j \ | |
| 4 | + | ~/.local/bin ~/.config ~/.local/dockerspace/gpu-devbox ~/.local/dockerspace/cpu-devbox | |
| 5 | + | ||
| 6 | + | MINRC=$(cat <<EOF | |
| 7 | + | # minimal rc | |
| 8 | + | ||
| 9 | + | PATH=\$HOME/.bin.local:\$HOME/.bin:\$HOME/.local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:\$PATH | |
| 10 | + | ||
| 11 | + | export LC_ALL=en_US.UTF-8 | |
| 12 | + | export LANG=en_US.UTF-8 | |
| 13 | + | export LANGUAGE=en_US.UTF-8 | |
| 14 | + | ||
| 15 | + | alias diru='du -h -d 1' | |
| 16 | + | ||
| 17 | + | alias ca='docker exec -it -u larme cpu-devbox bash -l' | |
| 18 | + | alias ga='docker exec -it -u larme gpu-devbox bash -l' | |
| 19 | + | EOF | |
| 20 | + | ) | |
| 21 | + | echo "$MINRC" > ~/.min.rc | |
| 22 | + | echo ". ~/.min.rc" >> ~/.bashrc | |
| 23 | + | ||
| 24 | + | TMUXCONF=$(cat <<EOF | |
| 25 | + | unbind 1 | |
| 26 | + | unbind 2 | |
| 27 | + | unbind 3 | |
| 28 | + | bind 1 resize-pane -Z | |
| 29 | + | bind 2 split-window | |
| 30 | + | bind 3 split-window -h | |
| 31 | + | set -g default-terminal "screen-256color" | |
| 32 | + | set-option -g default-command 'command -v reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace -l "$SHELL" || exec "$SHELL"' | |
| 33 | + | ||
| 34 | + | set-option -g mouse on | |
| 35 | + | bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" | |
| 36 | + | bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" | |
| 37 | + | EOF | |
| 38 | + | ) | |
| 39 | + | echo "$TMUXCONF" > ~/.tmux.conf | |