├── .aria2 └── aria2.conf ├── .gitignore ├── .tmux.conf ├── .vimrc ├── .zshrc ├── README.md ├── install ├── setup └── zshrc /.aria2/aria2.conf: -------------------------------------------------------------------------------- 1 | max-connection-per-server=10 2 | split=16 3 | enable-http-pipelining=true 4 | min-split-size=1M 5 | continue=true 6 | console-log-level=warn 7 | download-result=full 8 | file-allocation=none 9 | save-session-interval=30 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | zsh/oh-my-zsh-master -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | ########## Styles ########## 2 | 3 | # Messaging 4 | set -g message-style fg=black,bg=yellow,fg=black,bg=yellow 5 | set -g message-command-style fg=blue,bg=black,fg=blue,bg=black 6 | 7 | # The panes 8 | set -g pane-border-style fg=black,bg=colour235,fg=colour238,fg=black,bg=colour235,fg=colour238 9 | set -g pane-active-border-style fg=brightred,bg=colour236,fg=colour51,fg=brightred,bg=colour236,fg=colour51 10 | 11 | # The statusbar 12 | set -g status-position bottom 13 | set -g status-style bg=colour234,fg=colour2,bold 14 | set -g status-left '#[fg=yellow]::#[fg=magenta]#H' 15 | set -g status-right '%d/%m %H:%M:%S ' 16 | set -g status-right-length 50 17 | set -g status-left-length 200 18 | set -g status-justify centre 19 | setw -g status-interval 1 20 | 21 | # The Window Tabs 22 | setw -g window-status-current-style fg=red,bold 23 | setw -g window-status-current-format ' #I:#W#[fg=colour244]#F' 24 | setw -g window-status-style fg=cyan,none 25 | setw -g window-status-format ' #I:#W#F' 26 | setw -g window-status-separator ' ' 27 | setw -g window-status-bell-style bold,fg=colour255,bg=colour1 28 | 29 | # Pane number display 30 | set-option -g display-panes-active-colour colour33 31 | set-option -g display-panes-colour colour166 32 | 33 | # Clock 34 | set-window-option -g clock-mode-colour green 35 | 36 | ########## Behavior ########## 37 | 38 | # Start numbering at 1 39 | set -g base-index 1 40 | 41 | # Renumber Windows 42 | set -g renumber-windows on 43 | 44 | # Allows for faster key repetition 45 | set -s escape-time 0 46 | 47 | # Rather than constraining window size to the maximum size of any client 48 | # connected to the *session*, constrain window size to the maximum size of any 49 | # client connected to *that window*. Much more reasonable. 50 | setw -g aggressive-resize on 51 | 52 | # Activity monitoring 53 | setw -g monitor-activity on 54 | set -g visual-activity on 55 | 56 | # Auto window rename 57 | set-window-option -g automatic-rename 58 | 59 | ########## Shortcuts ########## 60 | 61 | # C-b is not acceptable -- Vim uses it 62 | set-option -g prefix C-a 63 | bind-key C-a last-window 64 | 65 | # splitting panes 66 | bind | split-window -h 67 | bind - split-window -v 68 | 69 | # Quick pane selection 70 | bind -r C-h select-window -t :- 71 | bind -r C-l select-window -t :+ 72 | 73 | # hjkl pane traversal 74 | bind h select-pane -L 75 | bind j select-pane -D 76 | bind k select-pane -U 77 | bind l select-pane -R 78 | 79 | # reload config 80 | bind r source-file ~/.tmux.conf \; display-message "Config reloaded!" 81 | 82 | # Allows us to use C-a a to send commands to a TMUX session inside 83 | # another TMUX session 84 | bind-key a send-prefix 85 | 86 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " set the theme 2 | colorscheme desert 3 | 4 | " Make Vim more useful 5 | set nocompatible 6 | 7 | " Use the OS clipboard by default (on versions compiled with `+clipboard`) 8 | set clipboard=unnamed 9 | 10 | " Enhance command-line completion 11 | set wildmenu 12 | 13 | " Allow cursor keys in insert mode 14 | set esckeys 15 | 16 | " Allow backspace in insert mode 17 | set backspace=indent,eol,start 18 | 19 | " Optimize for fast terminal connections 20 | set ttyfast 21 | 22 | " Add the g flag to search/replace by default 23 | set gdefault 24 | 25 | " Use UTF-8 without BOM 26 | set encoding=utf-8 nobomb 27 | 28 | " Change mapleader 29 | let mapleader="," 30 | 31 | " Don't add empty newlines at the end of files 32 | set binary 33 | set noeol 34 | 35 | " Respect modeline in files 36 | set modeline 37 | set modelines=4 38 | 39 | " Line numbers 40 | set nu 41 | 42 | " Enable syntax highlighting 43 | syntax on 44 | 45 | " Make tabs as wide as 4 spaces 46 | set tabstop=4 47 | 48 | " When indenting with '>', use 4 spaces width 49 | set shiftwidth=4 50 | 51 | " On pressing tab, insert 4 spaces 52 | set expandtab 53 | 54 | " Copy the indentation from the previous line, when starting a new line. 55 | set autoindent 56 | 57 | " Automatically inserts one extra level of indentation in some cases, and works for C-like files. 58 | set smartindent 59 | 60 | " Highlight searches 61 | set hlsearch 62 | 63 | " Ignore case of searches 64 | set ignorecase 65 | 66 | " If a pattern contains an uppercase letter, it is case sensitive, otherwise, it is not. 67 | set smartcase 68 | 69 | " Highlight dynamically as pattern is typed 70 | set incsearch 71 | 72 | " Always show status line 73 | set laststatus=2 74 | 75 | " Disable error bells 76 | set noerrorbells 77 | 78 | " Don't reset cursor to start of line when moving around. 79 | set nostartofline 80 | 81 | " Show the cursor position 82 | set ruler 83 | 84 | " Don't show the intro message when starting Vim 85 | set shortmess=atI 86 | 87 | " Show the current mode 88 | set showmode 89 | 90 | " Show the filename in the window titlebar 91 | set title 92 | 93 | " Show the (partial) command as it is being typed 94 | set showcmd 95 | 96 | " Start scrolling three lines before the horizontal window border 97 | set scrolloff=3 98 | 99 | " Strip trailing whitespace (,ss) 100 | function! StripWhitespace() 101 | let save_cursor = getpos(".") 102 | let old_query = getreg('/') 103 | :%s/\s\+$//e 104 | call setpos('.', save_cursor) 105 | call setreg('/', old_query) 106 | endfunction 107 | 108 | noremap ss :call StripWhitespace() 109 | 110 | " Save a file as root 111 | cmap W! w !sudo tee % > /dev/null:e! 112 | 113 | " Remove dos \r 114 | nnoremap dm :%s/\r//g 115 | 116 | " Reload vim config 117 | cnoreabbrev reload :so % 118 | 119 | " Shell 120 | set shell=zsh -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | ZSHRC=$HOME/.dotfiles/zshrc; [ -f $ZSHRC ] && source $ZSHRC 2 | 3 | source $ZSH/oh-my-zsh.sh 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | curl -sL git.io/dot_files | sh 3 | ``` 4 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script LOCALLY installs dotfiles 4 | 5 | # Link config files 6 | DIR=`dirname "$(readlink -f "$0")"` 7 | for f in .zshrc .vimrc .tmux.conf .aria2; do 8 | ln -vfs $DIR/$f $HOME 9 | done 10 | 11 | # Install or update oh-my-zsh 12 | if [ -d $HOME/.oh-my-zsh ]; then 13 | pushd $HOME/.oh-my-zsh 14 | ./tools/upgrade.sh 15 | popd 16 | else 17 | KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 18 | fi 19 | 20 | -------------------------------------------------------------------------------- /setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script downloads or updates dotfiles and then do local install 4 | 5 | TARGET=$HOME/.dotfiles 6 | 7 | if [ -d $TARGET ]; then 8 | cd $TARGET 9 | git pull 10 | else 11 | git clone https://github.com/pi0/dotfiles $TARGET 12 | fi 13 | 14 | $TARGET/install 15 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | ZSH=$HOME/.oh-my-zsh 2 | ZSH_THEME="pygmalion" 3 | ZSH_DISABLE_COMPFIX="true" 4 | #DISABLE_AUTO_UPDATE="true" 5 | COMPLETION_WAITING_DOTS="true" 6 | DISABLE_UNTRACKED_FILES_DIRTY="true" 7 | 8 | # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ 9 | plugins=(git tmux sudo extract docker brew colorize command-not-found cp encode64 gh git-auto-fetch rsync) 10 | 11 | # Workaround for https://github.com/ohmyzsh/ohmyzsh/issues/12328 12 | zstyle ':omz:alpha:lib:git' async-prompt no 13 | 14 | # Environment 15 | export EDITOR=vi 16 | export LC_ALL=en_US.UTF-8 17 | export LC_CTYPE=en_US.UTF-8 18 | 19 | # Aliases 20 | alias s2="sudo -E $SHELL" 21 | alias apti="sudo apt install -y" 22 | alias aptu="sudo apt update" 23 | alias aptdu="sudo apt dist-upgrade" 24 | alias grep=grep --color=auto 25 | alias ducks='du -ckhs * | sort -rn | head' 26 | alias setclip='xclip -selection c' 27 | alias getclip='xclip -selection clipboard -o' 28 | alias dl="aria2c" 29 | alias g="git" 30 | alias dcc="docker-compose" 31 | alias p="pnpm" 32 | alias b="bun" 33 | alias sudo='sudo ' # Enable aliases to be sudo’ed 34 | --------------------------------------------------------------------------------