config: lots of tweaks
This commit is contained in:
parent
b1404b35c2
commit
cf22927adf
|
@ -51,6 +51,7 @@ Plug 'mhinz/vim-signify' " VCS info on the left
|
||||||
|
|
||||||
" Integrations
|
" Integrations
|
||||||
"Plug 'airblade/vim-gitgutter' " Git info on the left and hunk bindings
|
"Plug 'airblade/vim-gitgutter' " Git info on the left and hunk bindings
|
||||||
|
" TODO disable for giant files
|
||||||
Plug 'tpope/vim-fugitive' " Difftool usage
|
Plug 'tpope/vim-fugitive' " Difftool usage
|
||||||
Plug 'xeruf/vim-fossil'
|
Plug 'xeruf/vim-fossil'
|
||||||
Plug 'austintraver/vim-jrnl'
|
Plug 'austintraver/vim-jrnl'
|
||||||
|
|
|
@ -80,7 +80,7 @@ alias c=z
|
||||||
# Listing for quick directory switcher based on zoxide and fzf
|
# Listing for quick directory switcher based on zoxide and fzf
|
||||||
alias zoxide-list='noglob zoxide query -sl'
|
alias zoxide-list='noglob zoxide query -sl'
|
||||||
__zx_ls="ls --almost-all --color --human-readable --group-directories-first --file-type"
|
__zx_ls="ls --almost-all --color --human-readable --group-directories-first --file-type"
|
||||||
alias fzf-dir="fzf -0 -1 --tiebreak=index \
|
alias fzf-dir="fzf -0 -1 --tiebreak=chunk,end,length \
|
||||||
--preview-window=30% --preview='$__zx_ls {}' \
|
--preview-window=30% --preview='$__zx_ls {}' \
|
||||||
--height=80% --reverse --keep-right"
|
--height=80% --reverse --keep-right"
|
||||||
# fzf for zoxide - returns the selected path stripped of its score
|
# fzf for zoxide - returns the selected path stripped of its score
|
||||||
|
|
|
@ -245,7 +245,7 @@ del() {
|
||||||
|
|
||||||
u() {
|
u() {
|
||||||
# Line below handy for users of netkeeper
|
# Line below handy for users of netkeeper
|
||||||
timeout 1 curl -s https://github.com >/dev/null || echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null
|
sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null
|
||||||
if command -v pacman >/dev/null; then
|
if command -v pacman >/dev/null; then
|
||||||
if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)"
|
if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)"
|
||||||
then
|
then
|
||||||
|
@ -335,11 +335,13 @@ alias omd="(echo '#+OPTIONS: tags:nil'; xclip -o -selection clipboard) | pandoc
|
||||||
alias mdo="pandoc -f gfm-ascii_identifiers-gfm_auto_identifiers -t org-auto_identifiers --wrap preserve"
|
alias mdo="pandoc -f gfm-ascii_identifiers-gfm_auto_identifiers -t org-auto_identifiers --wrap preserve"
|
||||||
alias mdox="xclip -o -selection clipboard | mdo | xclip -filter"
|
alias mdox="xclip -o -selection clipboard | mdo | xclip -filter"
|
||||||
|
|
||||||
|
alias clr="diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less -F"
|
||||||
|
|
||||||
alias f="fossil"
|
alias f="fossil"
|
||||||
alias fs="fossil status"
|
alias fs="fossil status"
|
||||||
alias fc="fossil commit -v"
|
alias fc="fossil commit -v"
|
||||||
fdf() {
|
fdf() {
|
||||||
fossil diff "$@" | diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less -F
|
fossil diff "$@" | clr
|
||||||
}
|
}
|
||||||
|
|
||||||
alias gdiff='git diff --word-diff=color --word-diff-regex=. --no-index'
|
alias gdiff='git diff --word-diff=color --word-diff-regex=. --no-index'
|
||||||
|
|
|
@ -6,7 +6,8 @@ echo "Cloning $remote"
|
||||||
test $1 = https && shift
|
test $1 = https && shift
|
||||||
case $# in
|
case $# in
|
||||||
(1) dir=$(basename ${remote%.git});;
|
(1) dir=$(basename ${remote%.git});;
|
||||||
(3) test "$3" != "$(git config --get user.name)" &&
|
(3) # TODO recognize shared prefix
|
||||||
|
test "$3" != "$(git config --get user.name)" &&
|
||||||
prefix=$(echo "$3" | sed "s|\(.\)\b.*$|\1|") &&
|
prefix=$(echo "$3" | sed "s|\(.\)\b.*$|\1|") &&
|
||||||
case "$2" in
|
case "$2" in
|
||||||
("$prefix"*) ;;
|
("$prefix"*) ;;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Recreates the current or given branch with the state from master or another given branch.
|
# Recreates the current or given branch with the state from main or another given branch.
|
||||||
branch=${1:-$(git curbranch)}
|
branch=${1:-$(git curbranch)}
|
||||||
test "$(git curbranch)" = "$branch" && git checkout ${2:-master}
|
test "$(git curbranch)" = "$branch" && git switch ${2:-main}
|
||||||
git branch -D $branch
|
git branch -D $branch
|
||||||
git checkout -b $branch
|
git switch -c $branch
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
# Update an Easy2Boot USB Stick after adding ISOs
|
# Update an Easy2Boot USB Stick after adding ISOs
|
||||||
# Call with Linux ISOs to be copied as args
|
# Call with Linux ISOs to be copied as args
|
||||||
# Need to be around E2B mountpoint if it is not the default
|
# Need to be around E2B mountpoint if it is not the default
|
||||||
dir="$(find . "${MNT:-${XDG_RUNTIME_DIR}/mnt}" -maxdepth 3 -name _ISO -type d | grep .)"
|
if ! dir="$(find . "${MNT:-${XDG_RUNTIME_DIR}/mnt}" -maxdepth 3 -name _ISO -type d | grep .)"
|
||||||
|
then echo "Please mount your multiboot stick first!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
test $# -eq 0 || mv -vi "$@" "$dir/LINUX"
|
test $# -eq 0 || mv -vi "$@" "$dir/LINUX"
|
||||||
find "$dir" -iname "*32-*.iso" -exec mv -vi {} {}def32 \;
|
find "$dir" -iname "*32-*.iso" -exec mv -vi {} {}def32 \;
|
||||||
find "$dir" -iname "*.iso" -exec mv -vi {} {}def64 \;
|
find "$dir" -iname "*.iso" -exec mv -vi {} {}def64 \;
|
||||||
|
|
Loading…
Reference in New Issue