reinit
This commit is contained in:
commit
f7aaf232d2
25
bash/.bashrc
Normal file
25
bash/.bashrc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
|
|
||||||
|
# enable bash completion in interactive non-login shell
|
||||||
|
if [ "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colorful for bash
|
||||||
|
alias ls="ls -F --color=auto"
|
||||||
|
alias grep="grep --color=auto"
|
||||||
|
|
||||||
|
Profile_PATH=$HOME/My/profiles
|
||||||
|
if [ -f $Profile_PATH/shell/aliases.sh ]; then
|
||||||
|
. $Profile_PATH/shell/aliases.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# PATH
|
||||||
|
# ----------------------------
|
||||||
|
PATH="$PATH:$HOME/bin/"
|
||||||
|
PATH="$PATH:$HOME/go/bin/"
|
||||||
|
PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
|
||||||
|
|
||||||
|
export PATH
|
||||||
14
fish/config.fish
Normal file
14
fish/config.fish
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
end
|
||||||
|
|
||||||
|
set fish_greeting ""
|
||||||
|
|
||||||
|
set Profile_PATH $HOME/My/profiles
|
||||||
|
if test -e $Profile_PATH/shell/aliases.sh
|
||||||
|
. $Profile_PATH/shell/aliases.sh
|
||||||
|
end
|
||||||
|
|
||||||
|
# PATH
|
||||||
|
# ----------------------------
|
||||||
|
set -U fish_user_paths $HOME/bin/ $HOME/go/bin/ $HOME/.local/share/JetBrains/Toolbox/scripts
|
||||||
13
run.sh
Executable file
13
run.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/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 _
|
||||||
|
|
||||||
|
ln -sf $PWD/bash/.bashrc ~/.bashrc
|
||||||
|
ln -sf $PWD/fish/config.fish ~/.config/fish/config.fish
|
||||||
|
ln -sf $PWD/vim/.vimrc ~/.vimrc
|
||||||
|
ln -sf $PWD/tmux/.tmux.conf ~/.tmux.conf
|
||||||
|
|
||||||
|
echo "Finished"
|
||||||
44
shell/aliases.sh
Normal file
44
shell/aliases.sh
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# List file
|
||||||
|
alias l="ls -a"
|
||||||
|
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 -hT | grep -v tmpfs" # T: show filesystem type
|
||||||
|
alias du="du -h"
|
||||||
|
|
||||||
|
# Systemctl
|
||||||
|
alias sctl="systemctl"
|
||||||
|
alias ssctl="sudo systemctl"
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Containers
|
||||||
|
alias c=podman
|
||||||
|
alias ctr="c run -it --rm" # container temporarily run
|
||||||
|
alias cte="c exec -it" # container temporarily exec
|
||||||
|
#alias nginx="c exec nginx nginx"
|
||||||
|
|
||||||
|
|
||||||
|
[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] && return 0
|
||||||
|
# The following alias is for fish
|
||||||
|
|
||||||
|
# Python venv
|
||||||
|
alias actvenv=". .venv/bin/activate.fish"
|
||||||
|
|
||||||
|
# Proxy
|
||||||
|
alias unsetproxy="set -e http_proxy https_proxy all_proxy"
|
||||||
11
tmux/.tmux.conf
Normal file
11
tmux/.tmux.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
set -g mouse
|
||||||
|
set -g set-clipboard on
|
||||||
|
|
||||||
|
## Style of ststus window pane
|
||||||
|
## bg:background, fg:foreground
|
||||||
|
## ------------------------------
|
||||||
|
set -g status-style fg='#777777'
|
||||||
|
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
|
||||||
40
vim/.vimrc
Normal file
40
vim/.vimrc
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
" 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