Dernière activité 1750934470

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