reinit
This commit is contained in:
commit
4a284861de
37
bash/.bashrc
Normal file
37
bash/.bashrc
Normal file
@ -0,0 +1,37 @@
|
||||
PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
|
||||
# enable bash completion in interactive shells
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
Profile_PATH=~/My/profiles
|
||||
if [ -f $Profile_PATH/shell/aliases.sh ]; then
|
||||
. $Profile_PATH/shell/aliases.sh
|
||||
fi
|
||||
|
||||
# colorful for bash
|
||||
alias ls="ls -F --color=auto"
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
# Python venv
|
||||
# ----------------------------
|
||||
alias newvenv="python -m venv .venv"
|
||||
alias actvenv=". .venv/bin/activate"
|
||||
|
||||
# Proxy
|
||||
# ----------------------------
|
||||
alias setproxy="export http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
|
||||
alias unsetproxy="unset http_proxy https_proxy all_proxy"
|
||||
|
||||
# PATH
|
||||
# ----------------------------
|
||||
PATH="$PATH:~/My/apps/"
|
||||
PATH="$PATH:~/node_modules/.bin/"
|
||||
PATH="$PATH:~/.local/share/JetBrains/Toolbox/scripts"
|
||||
|
||||
export PATH
|
||||
28
fish/config.fish
Normal file
28
fish/config.fish
Normal file
@ -0,0 +1,28 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
set fish_greeting ""
|
||||
|
||||
set Profile_PATH ~/My/profiles
|
||||
if test -e $Profile_PATH/shell/aliases.sh
|
||||
. $Profile_PATH/shell/aliases.sh
|
||||
end
|
||||
|
||||
# Python venv
|
||||
# ----------------------------
|
||||
alias newvenv="python -m venv .venv"
|
||||
alias actvenv=". .venv/bin/activate.fish"
|
||||
|
||||
# Proxy
|
||||
# ----------------------------
|
||||
alias setproxy="export http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
|
||||
alias unsetproxy="set -e http_proxy https_proxy all_proxy"
|
||||
|
||||
# PATH
|
||||
# ----------------------------
|
||||
set PATH $PATH ~/My/apps/
|
||||
set PATH $PATH ~/node_modules/.bin/
|
||||
set PATH $PATH ~/.local/share/JetBrains/Toolbox/scripts
|
||||
|
||||
export PATH
|
||||
14
run.sh
Executable file
14
run.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Warning: This will force overwrite your .bashrc and so on.
|
||||
If you want to exit, please press Ctrl+C to exit.
|
||||
Press the Enter to continue."
|
||||
read _
|
||||
|
||||
export Profile_PATH=$PWD
|
||||
ln -sf $Profile_PATH/bash/.bashrc ~/.bashrc
|
||||
ln -sf $Profile_PATH/fish/config.fish ~/.config/fish/config.fish
|
||||
ln -sf $Profile_PATH/vim/.vimrc ~/.vimrc
|
||||
ln -sf $Profile_PATH/tmux/.tmux.conf ~/.tmux.conf
|
||||
|
||||
echo "Finished"
|
||||
26
shell/aliases.sh
Normal file
26
shell/aliases.sh
Normal file
@ -0,0 +1,26 @@
|
||||
# list file
|
||||
alias la="ls -a"
|
||||
alias ll="ls -lh"
|
||||
alias lla="ls -alh"
|
||||
|
||||
# Directory and File
|
||||
alias mkdir="mkdir -pv"
|
||||
alias rm="rm -rv"
|
||||
alias mv="mv -v"
|
||||
alias cp="cp -rv"
|
||||
|
||||
# Human Readable
|
||||
alias free="free -h"
|
||||
alias df="df -h"
|
||||
alias du="du -h"
|
||||
|
||||
# Systemctl
|
||||
alias sctl="systemctl"
|
||||
alias ssctl="sudo systemctl"
|
||||
|
||||
# Containers
|
||||
#alias docker=podman
|
||||
#alias debian="docker exec -it debian bash"
|
||||
#alias fedora="docker exec -it fedora bash"
|
||||
#alias archlinux="docker exec -it archlinux bash"
|
||||
#alias nginx="docker exec nginx nginx"
|
||||
12
tmux/.tmux.conf
Normal file
12
tmux/.tmux.conf
Normal file
@ -0,0 +1,12 @@
|
||||
set -g prefix M-z
|
||||
unbind C-b
|
||||
set -g mouse
|
||||
set -g set-clipboard on
|
||||
|
||||
## Style (bg:background, fg:foreground)
|
||||
## ststus window pane
|
||||
set -g status-style fg='#ffffff'
|
||||
set -g window-status-style bg=cyan
|
||||
set -g window-status-current-style bg=green
|
||||
# set -g pane-border-style fg=black
|
||||
# set -g pane-active-border-style fg=red
|
||||
41
vim/.vimrc
Normal file
41
vim/.vimrc
Normal file
@ -0,0 +1,41 @@
|
||||
" You can use `:set all` to show all option.
|
||||
" If you have questions about some option, you can use `:help <option>`.
|
||||
|
||||
set nocompatible
|
||||
syntax on " Turn on syntax highlighting.
|
||||
set wildmenu " show complete menu in Command-line.
|
||||
set path+=**
|
||||
|
||||
" show line numbers: number(nu) relativenumber(rnu)
|
||||
set nu rnu
|
||||
" indent: autoindent(ai) smartindent(si) cindent(cin)
|
||||
set si
|
||||
" search: incsearch(is) hlsearch(hls) ignorecase(ic) smartcase(scs)
|
||||
set is hls ic scs
|
||||
|
||||
" the fucking Tab:
|
||||
" shiftwidth(sw) The size of input when press << or >>
|
||||
" tabstop(ts) The true size and show size of Tab
|
||||
" softtabstop(sts) The size of input when press Tab key
|
||||
" smarttab(sta)
|
||||
set sw=4 ts=4
|
||||
set list listchars=tab:--> " show Tabs
|
||||
|
||||
" auto complete bracket
|
||||
inoremap ' ''<ESC>i
|
||||
inoremap " ""<ESC>i
|
||||
inoremap ( ()<ESC>i
|
||||
inoremap [ []<ESC>i
|
||||
inoremap < <><ESC>i
|
||||
inoremap { {<cr><tab><cr>}<ESC>i
|
||||
|
||||
|
||||
" 'Q' in normal mode enters Ex mode. You almost never want this.
|
||||
nmap Q <Nop>
|
||||
|
||||
" The backspace key has slightly unintuitive behavior by default. For example,
|
||||
" by default, you can't backspace before the insertion point set with 'i'.
|
||||
" This configuration makes backspace behave more reasonably, in that you can
|
||||
" backspace over anything.
|
||||
set backspace=indent,eol,start
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user