aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/.gitconfig6
-rw-r--r--files/.psqlrc23
-rw-r--r--files/.vimrc17
-rw-r--r--files/.zsh/rc/S50_aliases16
-rw-r--r--files/.zsh/rc/S50_functions5
m---------files/bin0
-rw-r--r--install.conf.yaml2
7 files changed, 63 insertions, 6 deletions
diff --git a/files/.gitconfig b/files/.gitconfig
index b85bb0e..4f2cd25 100644
--- a/files/.gitconfig
+++ b/files/.gitconfig
@@ -12,8 +12,9 @@
[grep]
lineNumber = true
[merge]
- tool = vimdiff
+ conflictstyle = diff3
stat = true
+ tool = vimdiff
[core]
pager = less -+$LESS -FRX
excludesfile = ~/.gitignore
@@ -37,6 +38,7 @@
f = !sh -c 'git branch | grep -F "feature/$1" | xargs -r -n 1 git co' -
st = status
stashlist = stash list --date=short
+ stash-all = stash save --include-untracked
sha = rev-parse --short
addnw = !sh -c 'git diff --unified=0 --ignore-all-space --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
branch-name = "!git rev-parse --abbrev-ref HEAD"
@@ -47,6 +49,8 @@
update-submodules = submodule update --init --recursive
upgrade-submodules = submodule update --init --remote
wc = whatchanged -p --abbrev-commit --pretty=medium
+ undo = reset --soft HEAD~
+ whoami = config user.email
[advice]
statusHints = false
detachedHead = false
diff --git a/files/.psqlrc b/files/.psqlrc
new file mode 100644
index 0000000..8d3e0ad
--- /dev/null
+++ b/files/.psqlrc
@@ -0,0 +1,23 @@
+-- Official docs: http://www.postgresql.org/docs/current/static/app-psql.html
+-- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience
+
+\set QUIET 1
+
+\pset null '[NULL]'
+\pset border 2
+
+\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
+\set PROMPT2 '[more] %R > '
+
+-- Show how long each query takes to execute
+\timing
+
+-- Use best available output format
+\x auto
+-- Maintain a separate history for each database.
+\set HISTFILE ~/.psql_history- :DBNAME
+\set HISTCONTROL ignoreboth
+
+\unset QUIET
+
+-- vim: ft=sql :
diff --git a/files/.vimrc b/files/.vimrc
index c612223..23a6c11 100644
--- a/files/.vimrc
+++ b/files/.vimrc
@@ -39,7 +39,7 @@ Plugin 'https://github.com/mattn/emmet-vim.git'
" Code snippets
Plugin 'https://github.com/msanders/snipmate.vim'
" Silversearch plugin
-Plugin 'https://github.com/rking/ag.vim'
+Plugin 'mileszs/ack.vim'
" Support dot command for plugins
Plugin 'https://github.com/tpope/vim-repeat.git'
Plugin 'https://github.com/tpope/vim-surround.git'
@@ -66,7 +66,7 @@ Plugin 'lervag/vimtex'
Plugin 'sheerun/vim-polyglot'
Plugin 'terryma/vim-expand-region'
" Maintains a history of previous yanks, changes and deletes
-Plugin 'vim-scripts/YankRing.vim'
+"Plugin 'vim-scripts/YankRing.vim'
" File types
@@ -620,9 +620,22 @@ let g:polyglot_disabled = ['latex']
" }}}
" YankRing {{{
+let g:yankring_replace_n_pkey = '<C-k>'
+let g:yankring_replace_n_nkey = '<C-j>'
let g:yankring_history_dir = "$HOME/tmp/vim/"
" }}}
+" Ack {{{
+
+if executable('ag')
+ let g:ackprg = 'ag --vimgrep'
+ cnoreabbrev ag Ack
+ cnoreabbrev aG Ack
+ cnoreabbrev Ag Ack
+ cnoreabbrev AG Ack
+endif
+
+" }}}
" }}}
" Load custom local config {{{
diff --git a/files/.zsh/rc/S50_aliases b/files/.zsh/rc/S50_aliases
index 9dbf7ac..a258477 100644
--- a/files/.zsh/rc/S50_aliases
+++ b/files/.zsh/rc/S50_aliases
@@ -14,8 +14,18 @@ alias -s pdf=evince
alias -s exe=wine
+alias da='\du -sch'
+if [ -x "$(command -v ncdu)" ]; then
+ alias du='ncdu -rr -x --exclude .git'
+else
+ alias du='du -h'
+fi
+
+if [ -x "$(command -v prettyping)" ]; then
+ alias ping='prettyping --nolegend'
+fi
+
alias df='df -h'
-alias du='du -h'
alias free='free -tm'
alias whois='whois -H'
alias grep='grep --color=auto'
@@ -105,7 +115,7 @@ alias -g XC='|xclip -selection clipboard'
# Docker and docker-compose
#
alias dbash='docker exec -it `docker ps -ql` bash'
-alias dps='docker ps'
+alias dps='docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}\t{{.Ports}}"'
alias drun='docker run -it --rm'
alias dlog='docker logs --tail 100 --follow'
alias dc='docker-compose'
@@ -114,7 +124,7 @@ alias dc-logs='dc logs --tail 100 --follow'
function dc-stats() {
dc $@ ps -q | xargs --no-run-if-empty docker stats
}
-
+alias dockertop='docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock moncho/dry'
alias portcheck='nc -z -v -w 5'
alias jq='jq --color-output'
diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions
index 28e585a..8667d8d 100644
--- a/files/.zsh/rc/S50_functions
+++ b/files/.zsh/rc/S50_functions
@@ -50,4 +50,9 @@ datediff() {
echo $(( (d1 - d2) / 86300 )) days
}
+transfer() {
+ curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename "$1") | tee /dev/null;
+ echo
+}
+
# vim: ft=zsh :
diff --git a/files/bin b/files/bin
-Subproject 4c184450ff8e849eb494aec24d5d51e6faa86be
+Subproject d5c22685624a4c4e4ac039a5c23782245f95385
diff --git a/install.conf.yaml b/install.conf.yaml
index 5aaf15b..97fd3ea 100644
--- a/install.conf.yaml
+++ b/install.conf.yaml
@@ -12,6 +12,7 @@
~/.aria2: files/.aria2
~/.mpv: files/.mpv
~/.lessfilter.sh: files/.lessfilter.sh
+ ~/.psqlrc: files/.psqlrc
# Git
~/.gitconfig: files/.gitconfig
~/.gitignore: files/.gitignore
@@ -27,6 +28,7 @@
~/.zshrc: files/.zshrc
~/.zshenv: files/.zshenv
~/bin: files/bin
+ # Configs
~/.config/devilspie2: files/.config/devilspie2
~/.config/youtube-dl: files/.config/youtube-dl
~/.config/xfce4/terminal: files/.config/xfce4/terminal