mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 00:05:10 +01:00
Compare commits
287 Commits
3fc4fc515e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| bbf4df0206 | |||
| 48f981edce | |||
| a39cd6de00 | |||
| 680bf0196b | |||
| 796ffd9e34 | |||
| 38751d075b | |||
| 034cbcfa90 | |||
| 4da67fcef8 | |||
| 03ccf57b6e | |||
| c2c06a46e4 | |||
| 331fc82c1a | |||
| 5ad43aa897 | |||
| 0f04e1831a | |||
| b129c79a37 | |||
| 8f0eac7701 | |||
| 938119d6ea | |||
| c394e8be26 | |||
| 75666f9add | |||
| cd550ea3fe | |||
| 7837b80d3b | |||
| 3c9b12b400 | |||
| 37e92734d7 | |||
| 436a28f702 | |||
| 739ab149c5 | |||
| c0ba50cf35 | |||
| 640ba449fb | |||
| df063d1f1a | |||
| a969661555 | |||
| 06e3fbc42b | |||
| b2046f2df3 | |||
| 0306806186 | |||
| c231bd9f81 | |||
| 07a53a3ae0 | |||
| e08247d55c | |||
| 78dd4a936d | |||
| b5d7771bc6 | |||
| 286796856a | |||
| 0d2830f9e4 | |||
| 7c0921a9cd | |||
| d72ebcdc5d | |||
| f9c2ebfcbd | |||
| 6a2ad74549 | |||
| 90037e0486 | |||
| c6b97e2595 | |||
| 17955520c2 | |||
| d0f0d70675 | |||
| d8d253d2fc | |||
| b33e2ad4e3 | |||
| 8ced3cb3a0 | |||
| 19beab2b85 | |||
| 9feb35ae1b | |||
| 37077ac84a | |||
| f2bebfaa3f | |||
| 6ce915a84b | |||
| 99be1b1d7f | |||
| c0497bf44c | |||
| b50d8f0d67 | |||
| 1755303858 | |||
| 430fee3e02 | |||
| 3836faaaf1 | |||
| 0c9cd7fabd | |||
| 29967f31ed | |||
| 967c20f78b | |||
| 933ac19064 | |||
| 091bfb91b5 | |||
| 4e0f71bfa5 | |||
| 2201161c19 | |||
| 800f614db5 | |||
| 4a0f0f1c23 | |||
| 5ff06e4ad3 | |||
| d4625dd8e2 | |||
| 9cef24836b | |||
| 58084b41ea | |||
| 01274819e9 | |||
| 3ef6363915 | |||
| 3bb1890b81 | |||
| 32e3d1bf89 | |||
| b32537ca36 | |||
| 52ed5b6558 | |||
| a1c2b3c692 | |||
| c420e20e56 | |||
| 72d55c14ce | |||
| 2e1bff51ea | |||
| e7e344b6ad | |||
| 13b5a8eac0 | |||
| b6553f2771 | |||
| bee15e099e | |||
| ec654b26a6 | |||
| 89d3acc10a | |||
| b8c811bce7 | |||
| 525f2e06be | |||
| b89f39b335 | |||
| 1d70c460e3 | |||
| 838aa1df81 | |||
| d9bbe483ba | |||
| e9957332e5 | |||
| d47442b87c | |||
| 4c56ee025c | |||
| a525440918 | |||
| 96e9320f89 | |||
| 92306f8125 | |||
| a39e8e6e9e | |||
| ad33a56d7b | |||
| 06de4bad70 | |||
| ea30a5fd0a | |||
| 43fd8e34f5 | |||
| bb3363ae79 | |||
| 8a36201565 | |||
| b4305f1131 | |||
| 4839507e05 | |||
| f8ea1fe55f | |||
| 00c670d0e1 | |||
| b0b09d49c8 | |||
| 8111aaf0ad | |||
| f8f695ac64 | |||
| 1508e83271 | |||
| a9d443755a | |||
| 1b52b1ed7f | |||
| 28cdfe7d3a | |||
| 8a147d485a | |||
| 92b7cbf3d8 | |||
| fed1dc4d8e | |||
| 3aa07b28c2 | |||
| 009557beb4 | |||
| 5e91c7d6af | |||
| c844099484 | |||
| 5d374082e9 | |||
| 44540b79a2 | |||
| 5d4d5a0bfa | |||
| ab722b28df | |||
| d601327458 | |||
| 18b9e5c8ec | |||
| eaa4bb7d05 | |||
| 8e7af76123 | |||
| 28234cd6a7 | |||
| 4f12b0ab9e | |||
| 358dd8e6d1 | |||
| a00697759c | |||
| eb33471478 | |||
| 2158c887cc | |||
| e0861ac757 | |||
|
|
4648ba6ff6 | ||
| 570bfcceb2 | |||
| c59ec2687a | |||
| b2fa6f46c6 | |||
| 26d268249c | |||
| 0243aa351b | |||
| be22ae5d26 | |||
| afdc46f09a | |||
| 071c48f38a | |||
| b5ebbe1c68 | |||
| 0084ea18ef | |||
| 5bf9bc00d8 | |||
| 23b7a4daa7 | |||
| 1a95a6dd3b | |||
| dd536a69af | |||
| cacfcb08f1 | |||
| 08f6b4e4e6 | |||
| a7adbb5b10 | |||
| 7f3e2231c7 | |||
| 3450865acb | |||
| 88f0f0a17a | |||
| d989e45356 | |||
| 3bb8761460 | |||
| 0d82d4d81f | |||
| 0b76113602 | |||
| 8dc6017b69 | |||
| 4e8c3dd959 | |||
| c06f82b8ca | |||
| f88987b88a | |||
| 9ef543c20e | |||
| 303ab65529 | |||
| 75579a8876 | |||
| e3541e9ed3 | |||
| 53b8eb72de | |||
| 09e74b2046 | |||
| 9098575694 | |||
| e2763c0df9 | |||
| 1057af7db0 | |||
| 4b99c54002 | |||
| 6c600f6483 | |||
| 28dbd2d064 | |||
| 16bd3d8597 | |||
| 81d7996635 | |||
| f5b83256c0 | |||
| cf5886795f | |||
| aac84dffbc | |||
| 8d0ddd2be1 | |||
| 6e68b27156 | |||
| e4bb09e1d8 | |||
| 77c90d11ac | |||
| 7497d196f0 | |||
| 0f27d68eee | |||
| f5395c2eb5 | |||
| 28d1836e6f | |||
| 0fcc3f8e45 | |||
| b8a69a86ec | |||
| 54c57a0a7c | |||
| 6ee26a97d3 | |||
| 53e64f6aca | |||
| 4f4b0c4461 | |||
| 7d238fa747 | |||
| 6163103b82 | |||
| 8884ae34f5 | |||
| e601ac73b3 | |||
| 8aefa13062 | |||
| a0eff44ed7 | |||
| b848174960 | |||
| 4fa9bc0531 | |||
| ef567cce7a | |||
| 5d45433739 | |||
| b527d0f0ae | |||
| aa8f86fcd7 | |||
| 002258322a | |||
| b8bf9d5585 | |||
| 264c0871d7 | |||
| 52e46ae5b7 | |||
| dbee464745 | |||
| 3eb867c228 | |||
| ff4f6c7a86 | |||
| 87fe26662e | |||
| 49354e122a | |||
| ae1daed47f | |||
| 6e760d0bca | |||
| 252d721012 | |||
| f0bd5d2785 | |||
| 7acb141c59 | |||
| cc73330c7b | |||
| a8c8ba5292 | |||
| 5bf11f3fa9 | |||
| d1ef16046a | |||
| 17e53e5237 | |||
| 90a711b105 | |||
| dd9eee9f40 | |||
| cae5ba951b | |||
| fd766ceda6 | |||
| c28f2b82d4 | |||
| 3fe31493ab | |||
| 85bee62c70 | |||
| 5daf0695dc | |||
| 051cf196b1 | |||
| bdac14c102 | |||
| 4a347a4ee1 | |||
| 534e792c0f | |||
| 607d89e694 | |||
| ece8e68d2e | |||
| 6559f7e793 | |||
| c4971c8fc8 | |||
| 731de35c3e | |||
| b5aefbe143 | |||
| 938b40ae62 | |||
| 953e46c7b0 | |||
| ecf3c208e4 | |||
| 4eaaf9822e | |||
| 442fd82ef8 | |||
| bdaf5f9422 | |||
| 7341f3cb3e | |||
| 4214d6b9d4 | |||
| 1779c56e2d | |||
| 0494ba0386 | |||
| 3d7bedccc3 | |||
| e5bb54b94c | |||
| 24ac2213e1 | |||
| 343958013e | |||
| 634f1da4c8 | |||
| e03169a63b | |||
| f56ce437aa | |||
| f99a2fb6e8 | |||
| 6381ad2a62 | |||
| f8d8ad6f27 | |||
| 466b05d2ea | |||
| e969384d4c | |||
| 2d67b55c60 | |||
| 4d7c09862f | |||
| 179be3fec1 | |||
| 4443f24c09 | |||
| 9cbe939cb9 | |||
| 4f9a7bfb7e | |||
| f0d8cc2d40 | |||
| a7eb6c3fc8 | |||
| 2b24771fb5 | |||
| b41d60f1dd | |||
| bf8a2f9a73 | |||
| 777cd6c46e | |||
| 2f0a76fa54 | |||
| f91fecc57d | |||
| 9f2ee3b8a6 |
@@ -22,6 +22,11 @@ alias lll='ls --color=always -alF | less -R'
|
||||
# append history instead of overwriting:
|
||||
shopt -s histappend
|
||||
|
||||
if command -v batcat &> /dev/null; then
|
||||
# Sometimes `bat` has the binary `batcat`, like on Debian or Ubuntu
|
||||
alias bat='batcat'
|
||||
fi
|
||||
|
||||
alias findphp='find . -name "*.php" | xargs grep --color=auto'
|
||||
alias findjs='find . -name "*.js" | xargs grep --color=auto'
|
||||
alias findcss='find . -name "*.css" | xargs grep --color=auto'
|
||||
@@ -104,11 +109,6 @@ alias pip_upgrade="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs
|
||||
# 20140908 reload tmux config
|
||||
alias tmux_reload="tmux source-file ~/.tmux.conf"
|
||||
|
||||
# project-oriented aliases
|
||||
alias dcpvag='workon dcp; cd ~/workspace/sanoma/content-library/; vagrant ssh'
|
||||
alias dcpsrc='cd ~/development/current/content-library/src/content_library/; . ~/development/env/bin/activate'
|
||||
alias dcpcelery='python manage.py celery worker -Q celery -l info'
|
||||
|
||||
# update/install Calibre ebook manager
|
||||
alias updatecalibre='sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('"'"'Download failed\n'"'"'); exec(sys.stdin.read()); main()"'
|
||||
|
||||
@@ -121,6 +121,9 @@ alias weather='ansiweather'
|
||||
|
||||
alias pypi_up='python setup.py register sdist --formats=zip upload'
|
||||
|
||||
# Use midnight commander without mouse being annoying
|
||||
alias mc='mc -d'
|
||||
|
||||
# if you're really annoyed with a runaway process
|
||||
function fuck() {
|
||||
if killall -9 "$2"; then
|
||||
|
||||
6
.bashrc
6
.bashrc
@@ -177,6 +177,7 @@ if [ -e ~/.ssh/config.d ]; then
|
||||
[ -e ~/.ssh/config ] && mv ~/.ssh/config ~/.ssh/config.bak.$(date -Is)
|
||||
# Lets preserve order, so you can have 00_generic 10_homestuff 20_work1 21_work2 and such
|
||||
find ~/.ssh/config.d/* -type f -print0 | sort -z | xargs -0 -n1 cat > ~/.ssh/config
|
||||
chmod 600 ~/.ssh/config
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -211,8 +212,13 @@ PATH=$PATH:/usr/local/bin/android-sdk-linux/platform-tools:/usr/local/bin/androi
|
||||
# nvm node.js package manager virtualenv thing
|
||||
export NVM_DIR="${HOME}/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# QT autoscaling, helpful for hidpi systems
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
|
||||
[ -f ~/.cargo/env ] && . "$HOME/.cargo/env"
|
||||
|
||||
[ -f ~/.local/bin/env ] && . "$HOME/.local/bin/env"
|
||||
|
||||
60
.config/beets/config.yaml
Normal file
60
.config/beets/config.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
directory: /stuff/beets/music
|
||||
library: /stuff/beets/musiclibrary.db
|
||||
|
||||
art_filename: cover
|
||||
asciify_paths: yes
|
||||
per_disc_numbering: yes
|
||||
threaded: yes
|
||||
|
||||
paths:
|
||||
# default: $albumartist/$year - $album/$track $artist - $title
|
||||
default: %the{$albumartist}/$year - $album%aunique{}/%if{$multidisc,$disc-}$track $artist - $title
|
||||
#singleton: Singletons/$artist - $title
|
||||
singleton: %the{$albumartist}/single - $artist - $title/$artist - $title
|
||||
comp: Compilations/$album%aunique{}/%if{$multidisc,$disc-}$track $artist - $title
|
||||
albumtype:soundtrack: Soundtracks/$album%aunique{}/%if{$multidisc,$disc-}$track $artist - $title
|
||||
|
||||
import:
|
||||
write: yes
|
||||
copy: yes
|
||||
move: no
|
||||
resume: ask
|
||||
#incremental: yes
|
||||
log: beetslog.log
|
||||
|
||||
ignore: .AppleDouble ._* *~ .DS_Store
|
||||
|
||||
plugins: [
|
||||
bandcamp, # pip install beets-bandcamp
|
||||
discogs,
|
||||
duplicates,
|
||||
embedart,
|
||||
fetchart,
|
||||
ftintitle,
|
||||
importadded,
|
||||
inline,
|
||||
the,
|
||||
]
|
||||
|
||||
discogs:
|
||||
# pip install discogs-client
|
||||
# Useful for classical music:
|
||||
index_tracks: yes
|
||||
|
||||
fetchart:
|
||||
# pip install requests
|
||||
cautious: true
|
||||
|
||||
ftintitle:
|
||||
auto: yes
|
||||
format: (feat. {0})
|
||||
|
||||
importadded:
|
||||
preserve_mtimes: yes
|
||||
preserve_write_mtimes: yes
|
||||
|
||||
item_fields:
|
||||
multidisc: 1 if disctotal > 1 else 0
|
||||
|
||||
musicbrainz:
|
||||
host: localhost:5000
|
||||
@@ -3,15 +3,11 @@ set EDITOR vim
|
||||
|
||||
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
||||
|
||||
if not functions -q fisher
|
||||
echo "Installing fisher for the first time..." >&2
|
||||
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
||||
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
|
||||
fisher
|
||||
end
|
||||
|
||||
# Virtualenv support with virtualfish
|
||||
eval (python3 -m virtualfish compat_aliases)
|
||||
#if not functions -q fisher
|
||||
# DO NOT ENABLE, it is a fork bomb :)
|
||||
# echo "Installing fisher for the first time..." >&2
|
||||
# curl -sL https://git.io/fisher | source && fisher update
|
||||
#end
|
||||
|
||||
# Theme options for bobthefish
|
||||
set -g theme_nerd_fonts yes
|
||||
@@ -31,6 +27,11 @@ set -U grcplugin_ls --color
|
||||
if test -x ~/.local/bin
|
||||
set PATH $PATH ~/.local/bin
|
||||
end
|
||||
# Local Rust apps installed through cargo
|
||||
if test -x ~/.cargo/bin
|
||||
set PATH $PATH ~/.cargo/bin
|
||||
end
|
||||
# Scripts from my dotfiles repo
|
||||
if test -x ~/.dot/dotfiles/bin
|
||||
set PATH $PATH ~/.dot/dotfiles/bin
|
||||
end
|
||||
@@ -58,6 +59,9 @@ set -gx FZF_DEFAULT_COMMAND 'rg --files --no-ignore --hidden --follow --glob "!.
|
||||
set -gx FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set -gx FZF_ALT_C_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
|
||||
# Set HOSTNAME to the hostname of the device, without trailing domain name
|
||||
set -x HOSTNAME (hostname | string split -m1 '.')[1]
|
||||
|
||||
# Aliases
|
||||
## Listing
|
||||
alias ll 'ls -alF'
|
||||
@@ -65,6 +69,9 @@ alias la 'ls -A'
|
||||
alias l 'ls -CF'
|
||||
alias lll 'ls --color=always -alF | less -R'
|
||||
|
||||
alias exa 'exa --icons --header --group-directories-first'
|
||||
alias exatree 'exa --icons --header --group-directories-first --long --tree'
|
||||
|
||||
## Git
|
||||
alias gu "git pull --all"
|
||||
alias gp "git push; git push --tags"
|
||||
@@ -76,13 +83,18 @@ alias gst "git status"
|
||||
alias ga "git add -A"
|
||||
alias gl "git log"
|
||||
alias gls "git shortlog --summary"
|
||||
alias gld "git log --follow -p -- " # Shows history with diffs for the filename provided
|
||||
alias gr "git reflog"
|
||||
alias gt 'git tag|less'
|
||||
#alias gad 'git log --pretty='"'"'%at'"'"' | while read d; do date -d "@$d"; done | awk '"'"'{print $1}'"'"' | sort | uniq -c'
|
||||
|
||||
alias ffnightly 'env MOZ_USE_XINPUT2=1 /usr/local/bin/firefoxnightly/firefox'
|
||||
|
||||
## SSH, for compatibility, as our terminfo now is non-standard 'tmux-256color-italic' in tmux
|
||||
alias ssh 'env TERM=xterm-256color ssh'
|
||||
#alias ssh 'env TERM=xterm-256color ssh'
|
||||
#function ssh
|
||||
# env TERM=screen-256color ssh $argv
|
||||
#end
|
||||
|
||||
## Grepping
|
||||
alias findfile 'find . | grep -v .svn | grep -v .hg | grep -v .git | grep'
|
||||
@@ -96,7 +108,16 @@ function grepl
|
||||
grep --color=always -ir $argv | less -R
|
||||
end
|
||||
|
||||
# Sometimes `bat` has the binary `batcat`, like on Debian or Ubuntu
|
||||
alias bat (command -v batcat || echo bat)
|
||||
|
||||
function rgl
|
||||
rg -p $argv | less -RFX
|
||||
end
|
||||
|
||||
## Various
|
||||
alias ip 'ip -c'
|
||||
|
||||
#alias tmux 'tmux -2'
|
||||
alias tmux_reload "tmux source-file ~/.tmux.conf"
|
||||
alias tmux_takeover "tmux detach -a"
|
||||
@@ -106,8 +127,8 @@ alias pip_upgrade "pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs
|
||||
|
||||
alias pyloc 'find . -name "*.py" | xargs wc -l'
|
||||
|
||||
alias pypi_up 'python setup.py sdist --formats=zip upload -r pypi'
|
||||
alias pypi_sanoma 'python setup.py sdist --formats=zip upload -r sanoma'
|
||||
alias pypi_up 'python3 -m build; python3 -m twine upload dist/*'
|
||||
alias pypitest_up 'python3 -m build; python3 -m twine upload --repository testpypi dist/*'
|
||||
|
||||
alias youtube-dl 'youtube-dl -t -f bestvideo+bestaudio/best --merge-output-format mp4'
|
||||
|
||||
@@ -121,3 +142,33 @@ function rgvim
|
||||
vim "+/"(to_lower $argv) $choice
|
||||
end
|
||||
end
|
||||
|
||||
function imready
|
||||
# Get return status and run time of last command, to be used with long-running jobs
|
||||
# e.g.: longrunning.sh; imready
|
||||
set laststatus $status
|
||||
if test $status = 0
|
||||
set result "success"
|
||||
else
|
||||
set result "failed with result $laststatus"
|
||||
end
|
||||
set duration (echo "$CMD_DURATION 1000" | awk '{printf "%.3fs", $1 / $2}')
|
||||
set resulttext "Result of command: $result (took: $duration)"
|
||||
|
||||
# Send a push message with summary
|
||||
if test -f "$HOME/workspace/projects/others/pushover.sh/pushover.sh"
|
||||
$HOME/workspace/projects/others/pushover.sh/pushover.sh -t "[$HOSTNAME] command finished" "$resulttext"
|
||||
end
|
||||
end
|
||||
|
||||
function jl
|
||||
# Pretty print the json file used as argument, and feed it in colour to less
|
||||
jq -C --indent 2 . $argv | less -R
|
||||
end
|
||||
|
||||
# Initialise starship theme
|
||||
# curl -sS https://starship.rs/install.sh|sh
|
||||
starship init fish | source
|
||||
|
||||
# https://direnv.net/
|
||||
direnv hook fish | source
|
||||
|
||||
9
.config/fish/fish_plugins
Normal file
9
.config/fish/fish_plugins
Normal file
@@ -0,0 +1,9 @@
|
||||
jorgebucaran/fisher
|
||||
edc/bass
|
||||
oh-my-fish/theme-bobthefish
|
||||
fisherman/fzf
|
||||
fisherman/getopts
|
||||
fisherman/nvm
|
||||
oh-my-fish/plugin-grc
|
||||
fisherman/shark
|
||||
fisherman/z
|
||||
@@ -1,11 +1,8 @@
|
||||
fisherman/await
|
||||
edc/bass
|
||||
oh-my-fish/theme-bobthefish
|
||||
fisherman/fzf
|
||||
fisherman/get
|
||||
fisherman/getopts
|
||||
oh-my-fish/plugin-grc
|
||||
fisherman/last_job_id
|
||||
fisherman/nvm
|
||||
fisherman/shark
|
||||
fisherman/z
|
||||
|
||||
186
.config/starship.toml
Normal file
186
.config/starship.toml
Normal file
@@ -0,0 +1,186 @@
|
||||
format = """
|
||||
[](#9A348E)\
|
||||
$jobs\
|
||||
$os\
|
||||
$username\
|
||||
[](bg:#DA627D fg:#9A348E)\
|
||||
$directory\
|
||||
[](fg:#DA627D bg:#FCA17D)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:#FCA17D bg:#86BBD8)\
|
||||
$c\
|
||||
$elixir\
|
||||
$elm\
|
||||
$golang\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$java\
|
||||
$julia\
|
||||
$nodejs\
|
||||
$nim\
|
||||
$python\
|
||||
$rust\
|
||||
$scala\
|
||||
[](fg:#86BBD8 bg:#06969A)\
|
||||
$docker_context\
|
||||
[](fg:#06969A bg:#33658A)\
|
||||
$time\
|
||||
[ ](fg:#33658A)\
|
||||
$cmd_duration\
|
||||
"""
|
||||
|
||||
# Timeout for commands executed by starship (ms)
|
||||
command_timeout = 2000
|
||||
|
||||
# Disable the blank line at the start of the prompt
|
||||
# add_newline = false
|
||||
|
||||
# Backgrounded processes
|
||||
[jobs]
|
||||
style = "bg:#9A348E"
|
||||
symbol = '✦'
|
||||
format = '[$number$symbol ]($style)'
|
||||
|
||||
# You can also replace your username with a neat symbol like or disable this
|
||||
# and use the os module below
|
||||
[username]
|
||||
# show_always = true
|
||||
show_always = false
|
||||
style_user = "bg:#9A348E"
|
||||
style_root = "bg:#9A348E"
|
||||
format = '[$user ]($style)'
|
||||
disabled = false
|
||||
|
||||
# An alternative to the username module which displays a symbol that
|
||||
# represents the current operating system
|
||||
[os]
|
||||
style = "bg:#9A348E"
|
||||
disabled = true # Disabled by default
|
||||
|
||||
[directory]
|
||||
style = "bg:#DA627D"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
# Here is how you can shorten some long paths by text replacement
|
||||
# similar to mapped_locations in Oh My Posh:
|
||||
[directory.substitutions]
|
||||
"Documents" = ""
|
||||
"Downloads" = ""
|
||||
"Music" = ""
|
||||
"Pictures" = ""
|
||||
"workspace" = ""
|
||||
# Keep in mind that the order matters. For example:
|
||||
# "Important Documents" = " "
|
||||
# will not be replaced, because "Documents" was already substituted before.
|
||||
# So either put "Important Documents" before "Documents" or use the substituted version:
|
||||
# "Important " = " "
|
||||
|
||||
[c]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = ""
|
||||
style = "bg:#06969A"
|
||||
format = '[ $symbol $context ]($style) $path'
|
||||
|
||||
[elixir]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[elm]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:#FCA17D"
|
||||
truncation_length = 30
|
||||
format = '[ $symbol $branch ]($style)'
|
||||
|
||||
[git_status]
|
||||
ahead = '⇡${count}'
|
||||
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
|
||||
behind = '⇣${count}'
|
||||
#
|
||||
style = "bg:#FCA17D"
|
||||
# style = "bg:#fb7d4b"
|
||||
# style = "bg:#fb7d4b fg:#ff0000"
|
||||
# style = "fg:#000000 bg:#FCA17D"
|
||||
# style = "fg:#ff0000 bg:#FCA17D"
|
||||
# staged = ''
|
||||
# modified = ''
|
||||
# untracked = '?'
|
||||
# format = '[$all_status$ahead_behind ]($style)'
|
||||
format = '[$all_status$ahead_behind]($style)'
|
||||
# format = '[$all_status$ahead_behind]($style)[ ](bg:#FCA17D)'
|
||||
# format = '[$all_status$ahead_behind]($style)[ ](bg:#FCA17D)'
|
||||
# format = '[](bg:#fb7d4b fg:#FCA17D)[$all_status$ahead_behind]($style)[](bg:#FCA17D fg:#fb7d4b)'
|
||||
|
||||
[golang]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[gradle]
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[java]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[julia]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[nim]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[python]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $virtualenv) ]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[scala]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol( $version) ]($style)'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 2000
|
||||
show_milliseconds = true
|
||||
#format = ' $duration ($style)'
|
||||
format = '[](fg:#333333)[$duration](bg:#333333)[](fg:#333333) ($style)'
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
# time_format = "%R" # Hour:Minute Format
|
||||
time_format = "%T" # Hour:Minute:Second Format
|
||||
style = "bg:#33658A"
|
||||
format = '[ $time ]($style)'
|
||||
25
.config/zed/settings.json
Normal file
25
.config/zed/settings.json
Normal file
@@ -0,0 +1,25 @@
|
||||
// Zed settings
|
||||
//
|
||||
// For information on how to configure Zed, see the Zed
|
||||
// documentation: https://zed.dev/docs/configuring-zed
|
||||
//
|
||||
// To see all of Zed's default settings without changing your
|
||||
// custom settings, run `zed: open default settings` from the
|
||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||
{
|
||||
"vim_mode": true,
|
||||
"icon_theme": "Material Icon Theme",
|
||||
"base_keymap": "JetBrains",
|
||||
"ui_font_size": 16,
|
||||
"buffer_font_size": 15,
|
||||
"terminal": {
|
||||
"font_family": "MonaspiceNe Nerd Font Mono",
|
||||
"font_size": 15,
|
||||
"line_height": "standard"
|
||||
},
|
||||
"theme": {
|
||||
"mode": "dark",
|
||||
"light": "One Light",
|
||||
"dark": "Zedokai Darker"
|
||||
}
|
||||
}
|
||||
25
.gitconfig
25
.gitconfig
@@ -33,11 +33,17 @@
|
||||
# list aliases
|
||||
la = "!git config -l | grep alias | cut -c 7-"
|
||||
|
||||
# git change-commits GIT_COMMITTER_NAME "old name" "new name"
|
||||
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f "
|
||||
# from https://help.github.com/articles/remove-sensitive-data
|
||||
remove-file = "!f() { git filter-branch -f --index-filter \"git rm --cached --ignore-unmatch $1\" --prune-empty --tag-name-filter cat -- --all; }; f"
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
|
||||
[core]
|
||||
editor = vim
|
||||
excludesfile = ~/.gitignore_global
|
||||
|
||||
[diff]
|
||||
wsErrorHighlight = all
|
||||
@@ -57,3 +63,22 @@
|
||||
|
||||
[url "git://bitbucket.org/"]
|
||||
insteadOf = "bitbucket:"
|
||||
[pull]
|
||||
rebase = false
|
||||
[safe]
|
||||
directory = /storage/emulated/0/Git/phren
|
||||
directory = /storage/emulated/0/Git/divaultphren
|
||||
directory = /storage/emulated/0/Git/mydocs
|
||||
directory = /data/data/com.termux/files/home/.dot/dotfiles/
|
||||
directory = /storage/emulated/0/Git/dammit.nl
|
||||
directory = /mnt/chromeos/PlayFiles/Documents/phren
|
||||
directory = /mnt/chromeos/PlayFiles/Documents/divaultphren
|
||||
directory = /mnt/chromeos/PlayFiles/Documents/mydocs
|
||||
#[http]
|
||||
# postBuffer = 1048576000
|
||||
# lowSpeedLimit = 0
|
||||
# lowSpeedTime = 999999
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,7 +1,13 @@
|
||||
# Vim
|
||||
.vim/bundle
|
||||
*.spl
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Tags file
|
||||
tags
|
||||
|
||||
# vim plugin-manager managed directories
|
||||
.vim/autoload
|
||||
.vim/bundle
|
||||
.vim/plugged
|
||||
|
||||
6
.gitignore_global
Normal file
6
.gitignore_global
Normal file
@@ -0,0 +1,6 @@
|
||||
# vim
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# virtualenv
|
||||
.venv
|
||||
2
.ideavimrc
Normal file
2
.ideavimrc
Normal file
@@ -0,0 +1,2 @@
|
||||
set ideajoin
|
||||
set clipboard+=unnamed
|
||||
25
.local/share/org.gnome.Ptyxis/palettes/diginaut.palette
Normal file
25
.local/share/org.gnome.Ptyxis/palettes/diginaut.palette
Normal file
@@ -0,0 +1,25 @@
|
||||
[Palette]
|
||||
Name=Diginaut
|
||||
Background=#000000
|
||||
Foreground=#FFFAF4
|
||||
Cursor=#FFFAF4
|
||||
Color0=#232323
|
||||
Color1=#FF000F
|
||||
Color2=#8CE10B
|
||||
Color3=#FFB900
|
||||
Color4=#008DF8
|
||||
Color5=#6D43A6
|
||||
Color6=#00D8EB
|
||||
Color7=#FFFFFF
|
||||
Color8=#444444
|
||||
Color9=#FF2740
|
||||
Color10=#ABE15B
|
||||
Color11=#FFD242
|
||||
Color12=#0092FF
|
||||
Color13=#9A5FEB
|
||||
Color14=#67FFF0
|
||||
Color15=#FFFFFF
|
||||
|
||||
# This file was generated from https://github.com/Gogh-Co/Gogh/tree/master/themes/Argonaut.yml
|
||||
# Modified by aquatix/diginaut
|
||||
|
||||
28
.tmux.conf
28
.tmux.conf
@@ -46,32 +46,30 @@ set-option -g base-index 0
|
||||
#set-window-option -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 0
|
||||
|
||||
# onedark colour scheme, material design
|
||||
onedark_black="#282c34"
|
||||
onedark_blue="#61afef"
|
||||
onedark_yellow="#e5c07b"
|
||||
onedark_red="#e06c75"
|
||||
onedark_white="#aab2bf"
|
||||
onedark_green="#98c379"
|
||||
onedark_visual_grey="#3e4452"
|
||||
onedark_comment_grey="#5c6370"
|
||||
|
||||
# color scheme (styled as vim-powerline)
|
||||
set -g status-left-length 52
|
||||
set -g status-right-length 451
|
||||
set -g status-fg white
|
||||
set -g status-bg colour234
|
||||
set -g pane-border-fg colour245
|
||||
set -g pane-active-border-fg colour39
|
||||
set -g message-fg colour16
|
||||
set -g message-bg colour221
|
||||
set -g message-attr bold
|
||||
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
|
||||
# Status line with username:
|
||||
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
|
||||
set -g pane-border-style fg=colour245
|
||||
set -g pane-active-border-style fg=colour39
|
||||
set -g message-style fg=colour16,bg=colour221,bold
|
||||
# Status line without username:
|
||||
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour234,nobold]'
|
||||
#set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
|
||||
#set -g window-status-format "#[fg=colour235,bg=colour252]#I #W#[fg=colour235,bg=colour252,bold]"
|
||||
#set -g window-status-format "#[fg=colour234,bg=colour252,nobold]#I #W#[fg=colour252,bg=colour234,nobold]"
|
||||
set -g window-status-format "#[fg=colour252,bg=colour234,nobold] #I #W "
|
||||
#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
|
||||
#set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]"
|
||||
#set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]"
|
||||
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=black,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]"
|
||||
set -g window-status-separator ""
|
||||
set -g status-right '#(hostname) #[bg=#bbbbbb]#[fg=#000000] #(cut -d " " -f -3 /proc/loadavg) #[bg=#4e4e4e]#[fg=#ffffff]#(date +" %H:%M ")'
|
||||
#
|
||||
|
||||
# Patch for OS X pbpaste and pbcopy under tmux.
|
||||
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
|
||||
|
||||
83
.vim/after/ftplugin/python.vim
Normal file
83
.vim/after/ftplugin/python.vim
Normal file
@@ -0,0 +1,83 @@
|
||||
" Taken from http://code.lardcave.net/2018/09/09/1/ Thanks!
|
||||
" Fixed for Python3's importlib
|
||||
python3 <<EOF
|
||||
import vim
|
||||
from importlib.util import find_spec
|
||||
import os
|
||||
import glob
|
||||
|
||||
def find_virtualenv(virtualenv_names):
|
||||
cwd = vim.eval('getcwd()')
|
||||
while cwd != '/':
|
||||
for virtualenv_name in virtualenv_names:
|
||||
venv_path = os.path.join(cwd, virtualenv_name)
|
||||
if os.path.exists(venv_path):
|
||||
return venv_path
|
||||
|
||||
cwd, _ignored = os.path.split(cwd)
|
||||
|
||||
return os.environ.get('VIRTUAL_ENV')
|
||||
|
||||
# If we have a virtualenv, check to see whether it contains pylint and the
|
||||
# django module. If we don't, just try to import both. We can't even use
|
||||
# ale's "ale_virtualenv_dir_names" here, because it's not set yet.
|
||||
|
||||
virtualenv_path = find_virtualenv(['virtualenv', 'venv']) #vim.eval('ale_virtualenv_dir_names')
|
||||
|
||||
# Detect the various linters and plugins
|
||||
if virtualenv_path:
|
||||
has_pylint_django = glob.glob(os.path.join(virtualenv_path, 'lib/*/site-packages/pylint_django'))
|
||||
has_pylint = glob.glob(os.path.join(virtualenv_path, 'lib/*/site-packages/pylint'))
|
||||
has_ruff = glob.glob(os.path.join(virtualenv_path, 'lib/*/site-packages/ruff'))
|
||||
has_flake8 = glob.glob(os.path.join(virtualenv_path, 'lib/*/site-packages/flake8'))
|
||||
has_bandit = glob.glob(os.path.join(virtualenv_path, 'lib/*/site-packages/bandit'))
|
||||
else:
|
||||
try:
|
||||
find_spec('pylint_django')
|
||||
has_pylint_django = True
|
||||
except ImportError:
|
||||
has_pylint_django = False
|
||||
|
||||
try:
|
||||
find_spec('pylint')
|
||||
has_pylint = True
|
||||
except ImportError:
|
||||
has_pylint = False
|
||||
|
||||
try:
|
||||
find_spec('ruff')
|
||||
has_ruff = True
|
||||
except ImportError:
|
||||
has_ruff = False
|
||||
|
||||
try:
|
||||
find_spec('flake8')
|
||||
has_flake8 = True
|
||||
except ImportError:
|
||||
has_flake8 = False
|
||||
|
||||
try:
|
||||
find_spec('bandit')
|
||||
has_bandit = True
|
||||
except ImportError:
|
||||
has_bandit = False
|
||||
|
||||
linters = []
|
||||
if has_pylint:
|
||||
linters.append('pylint')
|
||||
if has_ruff:
|
||||
linters.append('ruff')
|
||||
if has_flake8:
|
||||
linters.append('flake8')
|
||||
if has_bandit:
|
||||
linters.append('bandit')
|
||||
|
||||
vim.command("let b:ale_linters = {}".format(linters))
|
||||
|
||||
if has_pylint_django:
|
||||
# No silly 80-char line limit. Sorry pep-8. Also, Django support. Disable 'invalid name', 'missing docstring'
|
||||
vim.command("let g:ale_python_pylint_options='--max-line-length=120 --load-plugins pylint_django --disable=invalid-name,missing-docstring'")
|
||||
else:
|
||||
# No silly 80-char line limit. Sorry pep-8. Disable 'invalid name', 'missing docstring'
|
||||
vim.command("let g:ale_python_pylint_options='--max-line-length=120 --disable=invalid-name,missing-docstring'")
|
||||
EOF
|
||||
6
.vim/after/ftplugin/vue.vim
Normal file
6
.vim/after/ftplugin/vue.vim
Normal file
@@ -0,0 +1,6 @@
|
||||
" Run both javascript and vue linters for vue files.
|
||||
let b:ale_linter_aliases = ['javascript', 'vue']
|
||||
" Select the eslint and vls linters.
|
||||
let b:ale_linters = ['eslint', 'vls']
|
||||
|
||||
let b:ale_fixers = ['prettier', 'eslint']
|
||||
3
.vim/after/syntax/markdown.vim
Normal file
3
.vim/after/syntax/markdown.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
unlet b:current_syntax
|
||||
syntax include @Yaml syntax/yaml.vim
|
||||
syntax region yamlFrontmatter start=/\%^---$/ end=/^---$/ keepend contains=@Yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
" 2014-02-27 force certain files to be highlighted with Markdown syntax
|
||||
augroup filetypedetect
|
||||
autocmd BufNew,BufNewFile,BufRead *.txt,*.text,*.md,*.markdown :setfiletype markdown
|
||||
augroup END
|
||||
" 2014-02-28 this really fixes the filetype recognition
|
||||
autocmd BufWinEnter *.{md,mkd,mkdn,mark*,txt,text} silent setf markdown
|
||||
@@ -1 +1,2 @@
|
||||
au BufNewFile,BufRead *.todo set filetype=todo
|
||||
"au BufNewFile,BufRead *.todo set filetype=markdown
|
||||
|
||||
@@ -7,3 +7,16 @@ Ubuntu
|
||||
PostgreSQL
|
||||
reprovisioning
|
||||
hardcoded
|
||||
deduplicating
|
||||
cruft
|
||||
digimarks
|
||||
blogmarks
|
||||
backend
|
||||
dammIT
|
||||
isso
|
||||
diginaut
|
||||
Pratchett
|
||||
jailbreaking
|
||||
plugin
|
||||
Readeck
|
||||
enshittification
|
||||
|
||||
Binary file not shown.
@@ -120,3 +120,138 @@ automagisch
|
||||
gechild
|
||||
wijkcoördinatoren
|
||||
lasagnette
|
||||
Vlaskamp
|
||||
groepssessie
|
||||
vioolacademie
|
||||
Marthijn
|
||||
zijwieltjes
|
||||
PostgreSQL
|
||||
Porsche
|
||||
teriyaki
|
||||
Grenoble
|
||||
naafdynamo
|
||||
walibi
|
||||
tomatencrèmesoep
|
||||
notificatiebalk
|
||||
configureerbaar
|
||||
sprekersfragmenten
|
||||
zoekscherm
|
||||
bingen
|
||||
gebinged
|
||||
Breedweer
|
||||
Android
|
||||
miezerregen
|
||||
onderhoudbaarheid
|
||||
landingspagina
|
||||
gimbal
|
||||
stracciatella
|
||||
tweaken
|
||||
dammIT
|
||||
YouTube
|
||||
berenhap
|
||||
inlegzooltjes
|
||||
Chromebook
|
||||
KlikAanKlikUit
|
||||
Mandalorian
|
||||
knuffelbaar
|
||||
gewokte
|
||||
Efteling
|
||||
wokgerecht
|
||||
rundersaucijs
|
||||
Loïs
|
||||
Pfizer
|
||||
gehaktsaus
|
||||
aardappelkroketjes
|
||||
AMD
|
||||
Assetto
|
||||
Corsa
|
||||
Wii
|
||||
gymkleding
|
||||
kutweer
|
||||
whoa
|
||||
bistrokrieltjes
|
||||
dumbbells
|
||||
naproxen
|
||||
nerden
|
||||
E-depot
|
||||
Carcassonne
|
||||
groepsles
|
||||
kennismakingsdag
|
||||
Jira
|
||||
chippies
|
||||
Battlefield
|
||||
webinar
|
||||
phren
|
||||
farfalle
|
||||
streamen
|
||||
ieuw
|
||||
kattenpoep
|
||||
kerstontbijt
|
||||
ThinkPad
|
||||
spelavond
|
||||
comics
|
||||
refinement
|
||||
datacentrum
|
||||
zometeen
|
||||
hyper
|
||||
inductieplaat
|
||||
level
|
||||
Europaplein
|
||||
Blendle
|
||||
prutten
|
||||
mirai
|
||||
kernel
|
||||
VPN
|
||||
schrapend
|
||||
wastafelkraan
|
||||
cracottes
|
||||
cracotte
|
||||
Picard
|
||||
nerdcave
|
||||
Röyksopp
|
||||
Linnaeushof
|
||||
recruiter
|
||||
Decathlon
|
||||
aqua
|
||||
Cineworld
|
||||
Panta
|
||||
Rhei
|
||||
hey
|
||||
Zoë
|
||||
voilà
|
||||
Daan's
|
||||
Pinkeltje
|
||||
awesome
|
||||
webhaak
|
||||
klassendienst
|
||||
rewrite
|
||||
Plex
|
||||
automagiseren
|
||||
slaapmasker
|
||||
puntpaprika
|
||||
Roblox
|
||||
Samsung
|
||||
Galaxy
|
||||
iPad
|
||||
Matt
|
||||
powernap
|
||||
Nordschleife
|
||||
hackathons
|
||||
hackathon
|
||||
knakkende
|
||||
etensgeluiden
|
||||
gebarbecuede
|
||||
WTF
|
||||
syncthing
|
||||
Madurodam
|
||||
fietsrit
|
||||
multifactorauthenticatie
|
||||
SSO-gebruikers
|
||||
hacktop
|
||||
computerwerk
|
||||
labwerk
|
||||
PowerPoint
|
||||
Kubuntu
|
||||
Ichthus
|
||||
Castor
|
||||
JungleTrain
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,11 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
"runtime! syntax/markdown.vim
|
||||
"unlet! b:current_syntax
|
||||
|
||||
" Keywords that we want to emphasize
|
||||
"syntax keyword todoKeyword todo done important
|
||||
@@ -17,8 +22,8 @@ syntax match todoDayKeyword "Hackathon"
|
||||
syntax match todoDayKeyword "hackathon"
|
||||
syntax match todoDayKeyword "papadag"
|
||||
syntax match todoDayKeyword "vrije dag"
|
||||
syntax match todoDayKeyword "vrij"
|
||||
syntax match todoDayKeyword "Vrij"
|
||||
"syntax match todoDayKeyword "vrij"
|
||||
"syntax match todoDayKeyword "Vrij"
|
||||
syntax match todoDayKeyword "koningsdag"
|
||||
"syntax match todoDayKeyword "ill"
|
||||
syntax match todoDayKeyword "ziek"
|
||||
@@ -34,7 +39,7 @@ highlight link todoComment Comment
|
||||
" Heading (day) delimiters
|
||||
syntax region todoDay start=/\v\=\=\ / skip=/\v\\./ end=/\v\ \=\=\=\=\=\=/
|
||||
|
||||
hi link todoDay Delimiter
|
||||
highlight link todoDay Delimiter
|
||||
|
||||
|
||||
" Show -scratched out- parts of a line as darker text (Delimiter colour)
|
||||
@@ -46,16 +51,16 @@ highlight scratchThis ctermfg=Grey guifg=#666666
|
||||
" Task statuses
|
||||
syntax match todoNote "\v^\s{-}n .*$" nextgroup=todoNote
|
||||
syntax match todoNote "\v^ .*$" nextgroup=todoNote
|
||||
highlight todoNote ctermfg=Grey guifg=#666666
|
||||
highlight todoNote ctermfg=Grey guifg=#666666 cterm=italic
|
||||
|
||||
syntax match todoStatusDone "\v^\s{-}v " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusDone ctermfg=green guifg=#00ff00
|
||||
|
||||
syntax match todoStatusCancelled "\v^\s{-}x .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusCancelled ctermfg=DarkGreen guifg=#005f00
|
||||
highlight todoStatusCancelled ctermfg=DarkGreen guifg=#005f00 cterm=italic
|
||||
|
||||
syntax match todoStatusDoing "\v^\s{-}d .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusDoing ctermfg=223 guifg=#f0dfaf
|
||||
highlight todoStatusDoing ctermfg=223 guifg=#f0dfaf cterm=italic
|
||||
|
||||
syntax match todoStatusTest "\v^\s{-}t " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusTest ctermfg=darkcyan guifg=#6666ff
|
||||
@@ -65,7 +70,7 @@ highlight todoStatusTodo ctermfg=red guifg=#ff0000
|
||||
|
||||
syntax match todoStatusImportant "\v^\s{-}\> .*$" nextgroup=todoItem skipwhite
|
||||
syntax match todoStatusImportant "\v^\s{-}! .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusImportant ctermfg=167 guifg=#d75f5f
|
||||
highlight todoStatusImportant ctermfg=167 guifg=#d75f5f cterm=italic
|
||||
|
||||
syntax match todoStatusQuestion "\v^\s{-}\? " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusQuestion ctermfg=darkcyan guifg=#6666ff
|
||||
@@ -76,9 +81,27 @@ highlight todoStatusQuestion ctermfg=darkcyan guifg=#6666ff
|
||||
syntax match timeslot "\v\[.*-.*\] " nextgroup=todoItem skipwhite
|
||||
highlight timeslot ctermfg=Magenta guifg=#d700af
|
||||
|
||||
" Match items starting with a <keyword-or-date-or-something>:
|
||||
syntax match todoTitledItem /^[a-zA-Z0-9\-_]*: / nextgroup=todoItem skipwhite
|
||||
highlight todoTitledItem ctermfg=172 guifg=#d78700
|
||||
"highlight todoTitledItem ctermfg=130 guifg=#af5f00 " DarkOrange
|
||||
|
||||
" A todoItem has a subject (e.g., a word that's followed by a ':')
|
||||
syn match todoItem '[a-zA-Z0-9\-_]\+:' contained
|
||||
hi todoItem ctermfg=Blue guifg=#87d7ff
|
||||
syntax match todoItem '[a-zA-Z0-9\-_]\+:' contained
|
||||
highlight todoItem ctermfg=Blue guifg=#87d7ff
|
||||
|
||||
|
||||
syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^ \{0,3\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite
|
||||
syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained
|
||||
syn region markdownUrl matchgroup=markdownUrlDelimiter start="<" end=">" oneline keepend nextgroup=markdownUrlTitle skipwhite contained
|
||||
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+"+ keepend contained
|
||||
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained
|
||||
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained
|
||||
|
||||
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
|
||||
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained
|
||||
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
|
||||
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
|
||||
|
||||
highlight link todoStatusDone PreProc
|
||||
highlight link todoStatusDoing PreProc
|
||||
@@ -88,6 +111,18 @@ highlight link todoStatusTodo PreProc
|
||||
highlight link todoStatusImportant PreProc
|
||||
highlight link todoStatusQuestion PreProc
|
||||
|
||||
hi def link markdownLinkText htmlLink
|
||||
hi def link markdownIdDeclaration Typedef
|
||||
hi def link markdownId Type
|
||||
hi def link markdownAutomaticLink markdownUrl
|
||||
hi def link markdownUrl Float
|
||||
hi def link markdownUrlTitle String
|
||||
hi def link markdownIdDelimiter markdownLinkDelimiter
|
||||
hi def link markdownUrlDelimiter htmlTag
|
||||
hi def link markdownUrlTitleDelimiter Delimiter
|
||||
|
||||
" runtime! syntax/markdown.vim
|
||||
" unlet! b:current_syntax
|
||||
|
||||
" Syntax highlighting scheme name
|
||||
let b:current_syntax = "todo"
|
||||
|
||||
512
.vimrc
512
.vimrc
@@ -4,7 +4,7 @@
|
||||
" wholesale is generally not a good idea; getting an idea to what things
|
||||
" actually mean and are used for is really recommended.
|
||||
|
||||
set shell=/bin/bash
|
||||
set shell=bash
|
||||
|
||||
set encoding=utf-8
|
||||
|
||||
@@ -12,39 +12,61 @@ set encoding=utf-8
|
||||
let mapleader=","
|
||||
|
||||
|
||||
" == Vundle manages the plugins ================================================
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
" == vim-plug manages the plugins ==============================================
|
||||
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
|
||||
" == Basics ====================================================================
|
||||
|
||||
" Think of sensible.vim as one step above 'nocompatible' mode: a universal
|
||||
" set of defaults that (hopefully) everyone can agree on.
|
||||
Plug 'tpope/vim-sensible'
|
||||
|
||||
|
||||
" Rooter changes the working directory to the project root when you open a
|
||||
" file or directory. Useful when using fzf for example.
|
||||
Plug 'airblade/vim-rooter'
|
||||
" Do not echo the project directory
|
||||
let g:rooter_silent_chdir = 1
|
||||
|
||||
" let Vundle manage Vundle, required
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
|
||||
" == Window chrome =============================================================
|
||||
|
||||
" Display tags of the current file ordered by scope
|
||||
" You need ctags: `sudo apt-get install exuberant-ctags` or
|
||||
" `brew install ctags` for example
|
||||
Plugin 'majutsushi/tagbar'
|
||||
Plug 'majutsushi/tagbar'
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
" The unite or unite.vim plug-in can search and display information from
|
||||
" arbitrary sources like files, buffers, recently used files or registers.
|
||||
"Plugin 'Shougo/unite.vim'
|
||||
"call unite#filters#matcher_default#use(['matcher_fuzzy'])
|
||||
"nnoremap <leader>r :<C-u>Unite -start-insert file_rec<CR>
|
||||
|
||||
" Nice statusbar, alternative for powerline. Get powerline font for best
|
||||
" looking result
|
||||
Plugin 'vim-airline/vim-airline'
|
||||
Plugin 'vim-airline/vim-airline-themes'
|
||||
" Better showing of open buffers (open files)
|
||||
Plugin 'bling/vim-bufferline'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
let g:airline_theme = "hybrid"
|
||||
" Disable showing current function in airline
|
||||
let g:airline#extensions#tagbar#enabled = 0
|
||||
" Better showing of open buffers (open files), integrates with airline
|
||||
" Plug 'bling/vim-bufferline'
|
||||
" Plug 'alisnic/vim-bufferline'
|
||||
|
||||
" Version control notes in the line number bar
|
||||
Plugin 'mhinz/vim-signify'
|
||||
if has('nvim') || has('patch-8.0.902')
|
||||
Plug 'mhinz/vim-signify'
|
||||
else
|
||||
Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
|
||||
endif
|
||||
" default updatetime 4000ms is not good for async update
|
||||
set updatetime=100
|
||||
|
||||
|
||||
" Git wrapper
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
" fugitive git bindings
|
||||
" borrowed from https://www.reddit.com/r/vim/comments/21f4gm/best_workflow_when_using_fugitive/
|
||||
nnoremap <space>ga :Git add %:p<CR><CR>
|
||||
@@ -64,46 +86,33 @@ nnoremap <space>gps :Dispatch! git push<CR>
|
||||
nnoremap <space>gpl :Dispatch! git pull<CR>
|
||||
|
||||
|
||||
" Better matching of code pairs
|
||||
"Plugin 'andymass/vim-matchup'
|
||||
" Deferred highlighting improves cursor movement performance
|
||||
"let g:matchup_matchparen_deferred = 1
|
||||
|
||||
|
||||
" Think of sensible.vim as one step above 'nocompatible' mode: a universal
|
||||
" set of defaults that (hopefully) everyone can agree on.
|
||||
Plugin 'tpope/vim-sensible'
|
||||
" Nice colour scheme
|
||||
Plugin 'fenetikm/falcon'
|
||||
Plug 'kristijanhusak/vim-hybrid-material'
|
||||
|
||||
" Quick file system tree, mapped to Ctrl+n for quick toggle
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
let NERDTreeIgnore = ['\.pyc$', 'tags']
|
||||
" close vim if the only window left open is a NERDTree
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
|
||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
|
||||
|
||||
if has('patch-8.0-1364')
|
||||
" Easily change position of windows
|
||||
" Requires vim 8.0.1364 or neovim (exact version uncertain).
|
||||
"<c-w>gh: soft move left
|
||||
"<c-w>gj: soft move down
|
||||
"<c-w>gk: soft move up
|
||||
"<c-w>gl: soft move right
|
||||
Plugin 'andymass/vim-tradewinds'
|
||||
" <c-w>gh: soft move left
|
||||
" <c-w>gj: soft move down
|
||||
" <c-w>gk: soft move up
|
||||
" <c-w>gl: soft move right
|
||||
Plug 'andymass/vim-tradewinds'
|
||||
endif
|
||||
|
||||
|
||||
" Rooter changes the working directory to the project root when you open a
|
||||
" file or directory. Useful when using fzf for example.
|
||||
Plugin 'airblade/vim-rooter'
|
||||
" Do not echo the project directory
|
||||
let g:rooter_silent_chdir = 1
|
||||
|
||||
|
||||
" Full path fuzzy file, buffer, mru, tag, ... finder
|
||||
" Quickly open files, fuzzy search on name
|
||||
Plugin 'ctrlpvim/ctrlp.vim'
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
let g:ctrlp_map = '<c-p>'
|
||||
" Search in Files, Buffers and MRU files at the same time:
|
||||
let g:ctrlp_cmd = 'CtrlPMixed'
|
||||
@@ -117,7 +126,7 @@ let g:ctrlp_switch_buffer = 0
|
||||
" Run your favorite search tool from Vim, with an enhanced results list.
|
||||
" Supports Silver Searcher `ag`. Use with:
|
||||
" :Ack [options] {pattern} [{directories}]
|
||||
Plugin 'mileszs/ack.vim'
|
||||
Plug 'mileszs/ack.vim'
|
||||
" apt install silversearcher-ag
|
||||
if executable('ag')
|
||||
"let g:ackprg = 'ag --nogroup --nocolor --column'
|
||||
@@ -131,7 +140,9 @@ endif
|
||||
|
||||
" fzf integration for fast fuzzy finding, better and faster than ctrl-p
|
||||
set rtp+=~/workspace/projects/others/fzf
|
||||
Plugin 'junegunn/fzf.vim'
|
||||
set rtp+=/data/data/com.termux/files/usr/bin/fzf
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" Customize fzf colors to match your color scheme
|
||||
let g:fzf_colors =
|
||||
@@ -153,17 +164,37 @@ let g:fzf_colors =
|
||||
" window similar to :Files but will only list files that contain the term
|
||||
" searched
|
||||
" https://medium.com/@crashybang/supercharge-vim-with-fzf-and-ripgrep-d4661fc853d2
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!**.git/*" --glob "!*.swp" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
|
||||
|
||||
" Search contents of files with ripgrep
|
||||
" https://sidneyliebrand.io/blog/how-fzf-and-ripgrep-improved-my-workflow
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
\ 'rg --column --line-number --smart-case --no-heading --color=always '.shellescape(<q-args>), 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'up:60%')
|
||||
\ : fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'right:50%:hidden', '?'),
|
||||
\ <bang>0)
|
||||
|
||||
" Files command with preview window
|
||||
command! -bang -nargs=? -complete=dir FilesPreview
|
||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
|
||||
|
||||
" Mapping the above functions to more easily accessible hotkeys.
|
||||
" Simply type ; to search through buffers, leader-o to search through file
|
||||
" names, \t for tags, \c for (Git) commits and \f to search through contents
|
||||
" of files
|
||||
" names, leader-O to search through file names, showing a preview window,
|
||||
" \t for tags, \c for (Git) commits and \f to search through contents of files
|
||||
nmap ; :Buffers<CR>
|
||||
nmap <Leader>o :Files<CR>
|
||||
"nmap <Leader>O :FilesPreview<CR>
|
||||
" Git files, takes .gitignore into account
|
||||
nmap <Leader>O :GFiles<CR>
|
||||
nmap <Leader>b :Buffers<CR>
|
||||
nmap <Leader>t :Tags<CR>
|
||||
nmap <Leader>c :Commits<CR>
|
||||
nmap <Leader>f :Find<CR>
|
||||
" nmap <Leader>f :Find<CR>
|
||||
nmap <Leader>f :Rg<CR>
|
||||
nmap <Leader>l :Lines<CR>
|
||||
" nmap <Leader>g :Rg<CR>
|
||||
|
||||
nnoremap <silent> [f :lprevious<CR>
|
||||
nnoremap <silent> ]f :lnext<CR>
|
||||
@@ -171,13 +202,12 @@ nnoremap <silent> ]f :lnext<CR>
|
||||
" Web Development/Filetype icons
|
||||
" Needs a font like found at
|
||||
" https://github.com/ryanoasis/nerd-fonts
|
||||
Plugin 'ryanoasis/vim-devicons'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
" Set guifont when using gvim:
|
||||
"set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
|
||||
set guifont=Hack\ Nerd\ Font\ Mono\ 10
|
||||
|
||||
"
|
||||
" undotree.vim : Display your undo history in a graph.
|
||||
Plugin 'mbbill/undotree'
|
||||
Plug 'mbbill/undotree'
|
||||
nnoremap <Leader>u :UndotreeToggle<CR>
|
||||
let g:undotree_SetFocusWhenToggle=1 " if undotree is opened, it is likely one
|
||||
" wants to interact with it.
|
||||
@@ -187,22 +217,21 @@ let g:undotree_SetFocusWhenToggle=1 " if undotree is opened, it is likely one
|
||||
|
||||
" transparent editing of gpg encrypted files. The filename must have a .gpg,
|
||||
" .pgp or .asc suffix.
|
||||
Plugin 'jamessan/vim-gnupg'
|
||||
|
||||
" tcomment provides easy to use, file-type sensible comments for Vim. It
|
||||
" can handle embedded syntax.
|
||||
Plugin 'tomtom/tcomment_vim'
|
||||
Plug 'jamessan/vim-gnupg'
|
||||
|
||||
" Typescript syntax file and more
|
||||
Plugin 'leafgarland/typescript-vim'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||
|
||||
" handling column separated data (csv)
|
||||
Plugin 'chrisbra/csv.vim'
|
||||
Plug 'chrisbra/csv.vim'
|
||||
autocmd BufNewFile,BufRead *.csv setlocal filetype=csv
|
||||
|
||||
" .tmux.conf highlighting, help- and command integration
|
||||
Plug 'tmux-plugins/vim-tmux'
|
||||
|
||||
" Automatically insert matching close bracket where it belongs
|
||||
"Plugin 'seletskiy/vim-autosurround'
|
||||
"Plug 'seletskiy/vim-autosurround'
|
||||
"inoremap ( (<C-O>:call AutoSurround(")")<CR>
|
||||
|
||||
" Spell Check (http://vim.wikia.com/wiki/Toggle_spellcheck_with_function_keys)
|
||||
@@ -235,6 +264,22 @@ if !exists( "b:myLang" )
|
||||
endif
|
||||
endif
|
||||
|
||||
" Correct previous spelling error with Ctrl+l. jumps to the previous
|
||||
" spelling mistake [s, then picks the first suggestion 1z=, and then
|
||||
" jumps back `]a. The <c-g>u in the middle make it possible to undo
|
||||
" the spelling correction quickly.
|
||||
" https://castel.dev/post/lecture-notes-1/
|
||||
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
|
||||
" Make sure .add.spl spelling files are up-to-date with their .add
|
||||
" counterparts
|
||||
" https://vi.stackexchange.com/questions/5050/how-to-share-vim-spellchecking-additions-between-multiple-machines
|
||||
for d in glob('~/.vim/spell/*.add', 1, 1)
|
||||
if filereadable(d) && (!filereadable(d . '.spl') || getftime(d) > getftime(d . '.spl'))
|
||||
exec 'mkspell! ' . fnameescape(d)
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Word completion from dictionary (on ctrl+space)
|
||||
set complete+=kspell
|
||||
|
||||
@@ -243,81 +288,129 @@ map <F9> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<
|
||||
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
|
||||
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
||||
|
||||
" Python virtualenv support
|
||||
"Plugin 'jmcantrell/vim-virtualenv'
|
||||
" Show indentation marks, enables conceallevel 2, so for example hides quotes
|
||||
" in json files
|
||||
Plug 'Yggdroot/indentLine'
|
||||
let g:indentLine_char = '┊'
|
||||
"let g:indentLine_setConceal = 0
|
||||
"let g:indentLine_conceallevel = 1
|
||||
let g:indentLine_conceallevel = 0
|
||||
" Do not conceal LaTeX symbols
|
||||
let g:tex_conceal=""
|
||||
|
||||
" Colour-match brackets
|
||||
Plug 'luochen1990/rainbow'
|
||||
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
||||
" Do not use rainbow parentheses in these file types:
|
||||
let g:rainbow_conf = {
|
||||
\ 'separately': {
|
||||
\ 'todo': 0
|
||||
\ },
|
||||
\}
|
||||
|
||||
" Python goodness
|
||||
"Plugin 'klen/python-mode'
|
||||
" Plug 'python-mode/python-mode', {'for': 'python', 'branch': 'develop'}
|
||||
|
||||
" Python autocompletion
|
||||
" On a machine with a Python3-only vim, use system packages like:
|
||||
" python-jedi python3-jedi to keep jedi working for Python 2 and 3.
|
||||
" Also, vim-nox-py2 might be needed
|
||||
Plugin 'davidhalter/jedi-vim'
|
||||
Plug 'davidhalter/jedi-vim'
|
||||
"let g:jedi#force_py_version = 2
|
||||
|
||||
" For example in termux, ycm does not want to compile, don't load it there
|
||||
" Even though in termux, ycm now compiles, one might want to not load it there
|
||||
" with ~/.dot_no_ycm
|
||||
let skip_ycm=fnamemodify(expand("$MYVIMRC"), ":p:h") . "/.dot_no_ycm"
|
||||
if !filereadable(skip_ycm) " Only load YouCompleteMe if ~/.dot_no_ycm does not exist
|
||||
" code-completion engine
|
||||
" sudo apt-get install build-essential cmake
|
||||
" sudo apt-get install python-dev
|
||||
" cd ~/.vim/bundle/YouCompleteMe
|
||||
" ./install.py # For C-style languages: ./install.py --clang-completer
|
||||
Plugin 'Valloric/YouCompleteMe'
|
||||
" YouCompleteMe interpreter version (should be the same as what YCM was
|
||||
" compiled with):
|
||||
if filereadable('/data/data/com.termux/files/usr/bin/python3')
|
||||
" Running in Termux
|
||||
let g:ycm_server_python_interpreter = '/data/data/com.termux/files/usr/bin/python3'
|
||||
else
|
||||
let g:ycm_server_python_interpreter = '/usr/bin/python3'
|
||||
endif
|
||||
" Debug stuff
|
||||
"let g:ycm_server_keep_logfiles = 1
|
||||
"let g:ycm_server_log_level = 'debug'
|
||||
" code-completion engine
|
||||
" sudo apt-get install build-essential cmake
|
||||
" sudo apt-get install python-dev
|
||||
" cd ~/.vim/bundle/YouCompleteMe
|
||||
" ./install.py # For C-style languages: ./install.py --clang-completer
|
||||
if has('patch-9.1.0016')
|
||||
" Latest YCM needs at least this version of vim
|
||||
Plug 'ycm-core/YouCompleteMe'
|
||||
elseif has('8.2.3995')
|
||||
Plug 'ycm-core/YouCompleteMe', { 'branch':'legacy-vim-8.2' }
|
||||
elseif has('8.1.2269')
|
||||
Plug 'ycm-core/YouCompleteMe', { 'branch':'legacy-vim-8.1' }
|
||||
else
|
||||
" Version compatible with the vim in Debian 10 buster
|
||||
" Plug 'ycm-core/YouCompleteMe', { 'commit':'d98f896' }
|
||||
Plug 'ycm-core/YouCompleteMe', { 'branch':'legacy-vim' }
|
||||
endif
|
||||
" YouCompleteMe interpreter version (should be the same as what YCM was
|
||||
" compiled with):
|
||||
if filereadable('/data/data/com.termux/files/usr/bin/python3')
|
||||
" Running in Termux
|
||||
let g:ycm_server_python_interpreter = '/data/data/com.termux/files/usr/bin/python3'
|
||||
else
|
||||
let g:ycm_server_python_interpreter = '/usr/bin/python3'
|
||||
endif
|
||||
" Debug stuff
|
||||
"let g:ycm_server_keep_logfiles = 1
|
||||
"let g:ycm_server_log_level = 'debug'
|
||||
endif
|
||||
|
||||
if filereadable(skip_ycm) " Only load if YouCompleteMe is not loaded
|
||||
if has('nvim')
|
||||
Plugin 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
else
|
||||
Plugin 'Shougo/deoplete.nvim'
|
||||
Plugin 'roxma/nvim-yarp'
|
||||
Plugin 'roxma/vim-hug-neovim-rpc'
|
||||
endif
|
||||
" deoplete language plugins
|
||||
" https://github.com/Shougo/deoplete.nvim/wiki/Completion-Sources
|
||||
" python:
|
||||
Plugin 'zchee/deoplete-jedi'
|
||||
" Many, based on syntax files
|
||||
Plugin 'Shougo/neco-syntax'
|
||||
if has('nvim')
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
else
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
endif
|
||||
" deoplete language plugins
|
||||
" https://github.com/Shougo/deoplete.nvim/wiki/Completion-Sources
|
||||
" python:
|
||||
Plug 'zchee/deoplete-jedi'
|
||||
" Many, based on syntax files
|
||||
Plug 'Shougo/neco-syntax'
|
||||
" Flow autocompletion for deoplete
|
||||
Plug 'wokalski/autocomplete-flow'
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
" You will also need the following for function argument completion:
|
||||
Plug 'Shougo/neosnippet'
|
||||
Plug 'Shougo/neosnippet-snippets'
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
||||
" Enable tab complete
|
||||
function! s:check_back_space() abort "{{{
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
endfunction"}}}
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ deoplete#manual_complete()
|
||||
endif
|
||||
|
||||
|
||||
" Improved Django handling
|
||||
Plugin 'tweekmonster/django-plus.vim'
|
||||
Plug 'tweekmonster/django-plus.vim'
|
||||
|
||||
" requirements.txt highlighter
|
||||
Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'}
|
||||
|
||||
|
||||
" Code checker. For python, install flake8 or pylint, preferably in the
|
||||
" virtualenv. For Django support, install pylint-django
|
||||
Plugin 'w0rp/ale'
|
||||
Plug 'dense-analysis/ale'
|
||||
nmap <leader>= <Plug>(ale_fix)
|
||||
" Quickly open the loclist to see syntax errors
|
||||
nmap <leader>; :lopen<CR>
|
||||
let g:ale_maximum_file_size = 500000 " Don't lint large files (> 500KB), it can slow things down
|
||||
let g:ale_fixers = {}
|
||||
"let g:ale_fixers = {}
|
||||
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'], }
|
||||
" Python specific settings
|
||||
let g:ale_fixers.python = ['isort']
|
||||
" No silly 80-char line limit. Sorry pep-8. Also, Django support. Disable 'invalid name', 'missing docstring'
|
||||
if exists('b:is_django')
|
||||
let g:ale_python_pylint_options="--max-line-length=120 --load-plugins pylint_django --disable=invalid-name,missing-docstring"
|
||||
else
|
||||
let g:ale_python_pylint_options="--max-line-length=120 --disable=invalid-name,missing-docstring"
|
||||
endif
|
||||
let g:ale_fixers.python = ['isort', 'ruff', 'black']
|
||||
" JS specific settings
|
||||
let g:ale_fixers.javascript = ['eslint', 'prettier']
|
||||
|
||||
" See VIMHOME/after/ftplugin/python.vim for some linting configuration, also checking whether a
|
||||
" project uses Django
|
||||
|
||||
" Show errors or warnings in the statusline
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
" UI
|
||||
@@ -330,100 +423,152 @@ let g:ale_linters = {
|
||||
|
||||
|
||||
" Handy Markdown stuff
|
||||
"Plugin 'tpope/vim-markdown'
|
||||
Plugin 'godlygeek/tabular'
|
||||
Plugin 'plasticboy/vim-markdown'
|
||||
" Do not fold markdown files by default
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
set nofoldenable
|
||||
let g:vim_markdown_conceal = 0
|
||||
let g:vim_markdown_conceal_code_blocks = 0
|
||||
let g:vim_markdown_new_list_item_indent = 2
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
" Use filetype name as fenced code block languages for syntax highlighting
|
||||
let g:vim_markdown_fenced_languages = ['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini', 'python=python']
|
||||
" Preview markdown files with :PreviewMarkdown - needs mdr from
|
||||
" https://github.com/MichaelMure/mdr
|
||||
Plug 'skanehira/preview-markdown.vim'
|
||||
let g:preview_markdown_vertical = 1
|
||||
|
||||
if v:version >= 704
|
||||
" Pandoc, for stuff like autocompletion of citations from bibtex, other LaTeX
|
||||
" stuff. Works with vim >= 7.4
|
||||
Plugin 'vim-pandoc/vim-pandoc'
|
||||
" Navigate through and from markdown files
|
||||
Plug 'aquatix/mdnav', { 'branch': 'fixes' }
|
||||
" Only open these local files in vim, use pyfile for all others:
|
||||
let g:mdnav#Extensions = '.md, .MD, .markdown, .todo, .txt, .rst'
|
||||
" let g:mdnav#DebugMode = 'true'
|
||||
|
||||
|
||||
" wiki.vim
|
||||
Plug 'lervag/wiki.vim'
|
||||
" Config below, after plug#end()
|
||||
|
||||
" marksman LSP integration (ALE) for advanced Markdown organising
|
||||
Plug 'artempyanykh/marksman'
|
||||
|
||||
|
||||
if $USER != 'root'
|
||||
" notational velocity with fzf: quickly search and open notes
|
||||
Plug 'https://github.com/alok/notational-fzf-vim'
|
||||
let g:nv_search_paths = ['~/phren', '~/mydocs', '~/.dot/caplog', '~/divaultphren']
|
||||
let g:nv_ignore_pattern = ['*.xml', '*.svg']
|
||||
" Quickly open the search with this shortcut
|
||||
nmap <leader>n :NV <CR>
|
||||
endif
|
||||
|
||||
|
||||
" The NERD Commenter: A plugin that allows for easy commenting of code for
|
||||
" many filetypes.
|
||||
Plug 'preservim/nerdcommenter'
|
||||
" Add spaces after comment delimiters by default
|
||||
let g:NERDSpaceDelims = 1
|
||||
" Align line-wise comment delimiters flush left instead of following code
|
||||
" indentation
|
||||
let g:NERDDefaultAlign = 'left'
|
||||
" Allow commenting and inverting empty lines (useful when commenting a region)
|
||||
let g:NERDCommentEmptyLines = 1
|
||||
" Enable trimming of trailing whitespace when uncommenting
|
||||
let g:NERDTrimTrailingWhitespace = 1
|
||||
|
||||
" Highlight colours in CSS (and html) files
|
||||
Plug 'ap/vim-css-color'
|
||||
|
||||
" Highlight colours in fish shell files
|
||||
Plug 'dag/vim-fish'
|
||||
|
||||
" Highlight colours in jade/pug templates
|
||||
Plug 'digitaltoad/vim-pug'
|
||||
|
||||
" Highlight nginx
|
||||
Plug 'chr4/nginx.vim'
|
||||
|
||||
" Highlight jinja templates (e.g., .j2 files) and do proper indenting
|
||||
Plug 'Glench/Vim-Jinja2-Syntax'
|
||||
au BufNewFile,BufRead *.j2,*.jinja2 set ft=jinja
|
||||
|
||||
" Automatic generation of tags file (ctags: Exhuberant Ctags)
|
||||
Plug 'ludovicchabant/vim-gutentags'
|
||||
" know when Gutentags is generating tags (prints 'TAGS' in status-line)
|
||||
set statusline+=%{gutentags#statusline()}
|
||||
let g:gutentags_ctags_exclude = ["*.min.*", "build", ".bundle", ".git", "log", "node_modules", ".obsidian/*", "tmp", "vendor", "*.vim/bundle/*", "*.vim/plugged/*"]
|
||||
" use ripgrep to create list of files to index, which should help with
|
||||
" ignoring non-versioned files, for example with .gitignore
|
||||
let g:gutentags_file_list_command = 'rg --files'
|
||||
"let g:gutentags_trace = 1
|
||||
|
||||
|
||||
" == Writing prose =============================================================
|
||||
|
||||
" Distraction-free writing, start with <Leader>V (\V or ,V in this config)
|
||||
Plugin 'junegunn/goyo.vim'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
let g:goyo_width = 120
|
||||
|
||||
" Help focus on text by dimming other parts a bit
|
||||
Plugin 'junegunn/limelight.vim'
|
||||
Plug 'junegunn/limelight.vim'
|
||||
let g:limelight_conceal_ctermfg = 'Grey69'
|
||||
let g:limelight_conceal_ctermfg = 145
|
||||
" Color name (:help gui-colors) or RGB color
|
||||
let g:limelight_conceal_guifg = '#b0b0b0'
|
||||
|
||||
" Helps with writing prose (better line breaks, agnostic on soft line wraps vs
|
||||
" hard line breaks etc)
|
||||
Plugin 'reedes/vim-pencil'
|
||||
Plug 'reedes/vim-pencil'
|
||||
" Disable automatic formatting, as this automatically merges lines devided by
|
||||
" 1 hard enter only, which can be annoying
|
||||
let g:pencil#autoformat = 0
|
||||
|
||||
" Do not insert hard line breaks in the middle of a sentence
|
||||
let g:pencil#wrapModeDefault = 'soft' " default is 'hard'
|
||||
|
||||
" Toggle Gogo with Limelight and Pencil together with Ctrl+F11
|
||||
"map <C-F11> :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
|
||||
" Toggle Gogo with Limelight and Pencil together with ,V
|
||||
nmap <leader>V :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
|
||||
|
||||
|
||||
" The NERD Commenter: A plugin that allows for easy commenting of code for
|
||||
" many filetypes.
|
||||
Plugin 'scrooloose/nerdcommenter'
|
||||
|
||||
" Highlight colours in CSS (and html) files
|
||||
Plugin 'ap/vim-css-color'
|
||||
|
||||
" Highlight colours in fish shell files
|
||||
Plugin 'dag/vim-fish'
|
||||
|
||||
" Highlight colours in jade/pug templates
|
||||
Plugin 'digitaltoad/vim-pug'
|
||||
|
||||
" Highlight nginx
|
||||
Plugin 'chr4/nginx.vim'
|
||||
|
||||
" Highlight jinja templates (e.g., .j2 files) and do proper indenting
|
||||
Plugin 'lepture/vim-jinja'
|
||||
au BufNewFile,BufRead *.j2 set ft=jinja
|
||||
|
||||
" Highlight special comments better
|
||||
"Plugin 'jbgutierrez/vim-better-comments'
|
||||
|
||||
" CSV filetype plugin
|
||||
"Plugin 'chrisbra/csv.vim' " apparently doesn't work this way ;)
|
||||
|
||||
" Automatic generation of tags file (ctags), in a central place (~/.vimtags)
|
||||
"Plugin 'xolox/vim-misc'
|
||||
"Plugin 'xolox/vim-easytags'
|
||||
" easytags highlighting is slow
|
||||
"let g:easytags_auto_highlight = 0
|
||||
|
||||
" Automatic generation of tags file (ctags: Exhuberant Ctags)
|
||||
Plugin 'ludovicchabant/vim-gutentags'
|
||||
" know when Gutentags is generating tags (prints 'TAGS' in status-line)
|
||||
set statusline+=%{gutentags#statusline()}
|
||||
let g:gutentags_ctags_exclude = ["*.min.*", "build", ".bundle", ".git", "log", "node_modules", "tmp", "vendor", "*.vim/bundle/*"]
|
||||
"let g:gutentags_trace = 1
|
||||
" All of the plugins must be added before the following line
|
||||
call plug#end()
|
||||
|
||||
|
||||
" wiki.vim config
|
||||
let g:wiki_root = '~/phren'
|
||||
let g:wiki_filetypes = ['md']
|
||||
let g:wiki_link_extension = '.md'
|
||||
let g:wiki_link_target_type = 'md'
|
||||
" let g:wiki_mappings_use_defaults = 1
|
||||
"support for #tag style tags instead of :tag: (hashes instead of colons)
|
||||
runtime autoload/wiki/tags.vim
|
||||
let s:tag_parser = deepcopy(g:wiki#tags#default_parser)
|
||||
let s:tag_parser.re_match = '\v%(^|\s)#\zs[^# ]+'
|
||||
let s:tag_parser.re_findstart = '\v%(^|\s)#\zs[^# ]+'
|
||||
|
||||
"let g:wiki_tags_format_pattern = '\v%(^|\s)#\zs[^# ]+'
|
||||
" parse tags in lines that match "tags: keyword1, keyword2" in addition to the default parser:
|
||||
let g:wiki_tag_parsers = [
|
||||
\ s:tag_parser,
|
||||
\ {'match': {x -> x =~# '^tags: '},
|
||||
\ 'parse': {x -> split(matchstr(x, '^tags:\zs.*'), '[ ,]\+')}}
|
||||
\ ]
|
||||
" number of lines from the top to scan for tags
|
||||
let g:wiki_tag_scan_num_lines = 500
|
||||
" search through the tags in the wiki
|
||||
nmap <leader>wf :WikiFzfTags <CR>
|
||||
" find backlinks to this document
|
||||
nmap <leader>wb :WikiGraphFindBacklinks <CR>
|
||||
" find in ToC/structure of the (markdown) file
|
||||
nmap <leader>ft :WikiFzfToc <CR>
|
||||
|
||||
|
||||
" All of your Plugins must be added before the following line
|
||||
call vundle#end() " required
|
||||
filetype plugin indent on " required
|
||||
" == End of plugins ============================================================
|
||||
|
||||
|
||||
"filetype plugin on
|
||||
|
||||
" Enable line numbers, highlighting of current line and syntax highlighting by default
|
||||
" Enable line numbers, highlighting of current line by default; syntax
|
||||
" highlighting is enabled by vim-plug
|
||||
set number
|
||||
set cursorline
|
||||
syntax on
|
||||
|
||||
if has('patch-7.4-338')
|
||||
" automatically indents wrapped lines up to the previous line. You can also
|
||||
@@ -436,6 +581,29 @@ set listchars=tab:▸\ ,trail:·
|
||||
" Display whitespace
|
||||
set list
|
||||
|
||||
" Trim trailing whitespace with :TrimWhitespace
|
||||
fun! TrimWhitespace()
|
||||
let l:save = winsaveview()
|
||||
keeppatterns %s/\s\+$//e
|
||||
call winrestview(l:save)
|
||||
endfun
|
||||
command! TrimWhitespace call TrimWhitespace()
|
||||
|
||||
" Visually select text then press ~ to convert the text to UPPER CASE, then to lower case, then to Title Case.
|
||||
" Keep pressing ~ until you get the case you want.
|
||||
" https://vim.fandom.com/wiki/Switching_case_of_characters
|
||||
function! TwiddleCase(str)
|
||||
if a:str ==# toupper(a:str)
|
||||
let result = tolower(a:str)
|
||||
elseif a:str ==# tolower(a:str)
|
||||
let result = substitute(a:str,'\(\<\w\+\>\)', '\u\1', 'g')
|
||||
else
|
||||
let result = toupper(a:str)
|
||||
endif
|
||||
return result
|
||||
endfunction
|
||||
vnoremap ~ y:call setreg('', TwiddleCase(@"), getregtype(''))<CR>gv""Pgv
|
||||
|
||||
" enable words completion
|
||||
set dictionary+=/usr/share/dict/words
|
||||
" use ctrl-n ctrl-n instead of ctrl-x ctrl-k
|
||||
@@ -465,14 +633,20 @@ set hidden
|
||||
set cryptmethod=blowfish2
|
||||
|
||||
" Ensure 256 colour support if the terminal supports it
|
||||
if &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color-italic"
|
||||
colorscheme falcon
|
||||
" Ignore the background setting, as falcon's dark blue is a bit much IMHO
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
if has("gui_running") || &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color-italic"
|
||||
|
||||
set background=dark
|
||||
let g:enable_bold_font = 1
|
||||
let g:enable_italic_font = 1
|
||||
let g:hybrid_transparent_background = 1
|
||||
colorscheme hybrid_reverse
|
||||
|
||||
" create a bar for airline
|
||||
set laststatus=2
|
||||
let g:airline_powerline_fonts = 1
|
||||
|
||||
" ensure black background in gvim
|
||||
highlight Normal guibg=black
|
||||
endif
|
||||
|
||||
" This is what sets vim to use 24-bit colors. It will also work for any version of neovim
|
||||
|
||||
52
README.md
52
README.md
@@ -1,7 +1,7 @@
|
||||
dotfiles
|
||||
========
|
||||
|
||||
After having my homedirs in subversion for years, moved this collection to Git in 2014 and standardised over all my machines.
|
||||
After having my homedirs in subversion for years, moved this collection to Git [in 2014](https://github.com/aquatix/dotfiles/commit/18c02056381e7c44dd220f6cd54182ce3f040104) and standardised over all my machines (servers, desktops, laptops, phones, tablets).
|
||||
|
||||
To install:
|
||||
|
||||
@@ -13,8 +13,12 @@ cd dotfiles # this takes you to the freshly cloned ~/.dot/dotfiles
|
||||
sh install.sh # follow the instructions and install the files in the homedir
|
||||
```
|
||||
|
||||
Extra's:
|
||||
|
||||
# Dependency on `fzf` and ripgrep `rg`
|
||||
[virtualfish](https://virtualfish.readthedocs.io/en/latest/install.html) for virtualenv(wrapper) integration in `fish` shell.
|
||||
|
||||
|
||||
## Dependency on `fzf` and ripgrep `rg`
|
||||
|
||||
Both the shell configuration and vim make use of `fzf`. [fzf is a general-purpose command-line fuzzy finder](https://github.com/junegunn/fzf) and helps one 'grep' really fast through filenames. It's an alternative for the well-known `find`. Install it by cloning the repository and running the install script ([check the Installation notes too](https://github.com/junegunn/fzf#installation)).
|
||||
|
||||
@@ -23,11 +27,46 @@ Both the shell configuration and vim make use of `fzf`. [fzf is a general-purpos
|
||||
If your distribution does not provide a package, [get yours from the releases page](https://github.com/BurntSushi/ripgrep/releases) (there's a .deb for 64-bit systems).
|
||||
|
||||
|
||||
# Fix for shift+F6 in tmux (and screen probably)
|
||||
## starship prompt
|
||||
|
||||
By default, the included fish shell configuration installs and uses the bobthefish prompt, but I have been using the [starship](https://starship.rs/) prompt [since November 2023](https://github.com/aquatix/dotfiles/commit/3836faaaf1e1207ee122eb3b72aa3cab27b4f1f7) and [configuration is included](https://github.com/aquatix/dotfiles/blob/master/.config/starship.toml).
|
||||
|
||||
To use, [install starship](https://starship.rs/#quick-install) and link the configuration to activate the configured prompt:
|
||||
|
||||
```bash
|
||||
cd ~/.config
|
||||
ln -s ../.dot/dotfiles/.config/starship.toml
|
||||
```
|
||||
|
||||
|
||||
## All dependencies
|
||||
|
||||
To have the full experience, install all of these:
|
||||
|
||||
```bash
|
||||
sudo apt install git curl vim-nox fzf ripgrep exuberant-ctags fish grc tmux htop direnv
|
||||
# needed for building vim plugins:
|
||||
sudo apt install cmake build-essential
|
||||
# also, this classic:
|
||||
sudo apt install mc
|
||||
```
|
||||
|
||||
and maybe install a nice colour theme for your terminal from https://gogh-co.github.io/Gogh/ - I use argonaut with a black background myself.
|
||||
|
||||
|
||||
## vim config
|
||||
|
||||
The [.vimrc](https://github.com/aquatix/dotfiles/blob/master/.vimrc) has a lot going on. [Find out more about my tweaks](https://dammit.nl/tag/vim.html) and use `:Maps` in vim itself to see key mappings
|
||||
|
||||
vim uses both `fzf` and `rg`, and also really likes having `ctags` (Exuberant Ctags) available.
|
||||
|
||||
|
||||
## Fix for shift+F6 in tmux (and screen probably)
|
||||
|
||||
In tmux, do `infocmp > screen-256color`. Add the line `kf16=\E[17;2~,` and compile the file with tic. This will result in `~/.terminfo/s/screen-256color` with the correct keycode for shift+F6. `.tmux.conf` needs the line `setw -g xterm-keys on` for it to register correctly.
|
||||
|
||||
# ~/.git_repos config file
|
||||
|
||||
## ~/.git_repos config file
|
||||
|
||||
The `update_repos` script takes the `~/.git_repos` config file and lets you update and clone your projects automatically (or at least in a batch). In the example the first four repos are located in ~/workspace/projects/github, and the other two in workspace/projects/others and workspace/projects/private respectively; then the workspace and group are empty, so mydocs is cloned into the homedir. At the moment, only paths relative to the user's homedir are supported.
|
||||
|
||||
@@ -51,7 +90,8 @@ group=
|
||||
ssh://myserver/srv/git/mydocs.git
|
||||
```
|
||||
|
||||
# Interesting scripts
|
||||
|
||||
## Interesting scripts
|
||||
|
||||
| ./bin/ | description |
|
||||
|------------------|-----------------------------------------------------------------------------------------|
|
||||
@@ -60,7 +100,7 @@ ssh://myserver/srv/git/mydocs.git
|
||||
| clean_project | Remove compiled Python files, vim swp files |
|
||||
| clean_pyc | Remove compiled Python files |
|
||||
| fixpermissions | chmod dirs to 755, files to 644 |
|
||||
| fixpictimestamps | Change file ctime to datetime from EXIF |
|
||||
| fixpictimestamps | Change file ctime to datetime from EXIF using exiftool |
|
||||
| fontupdate | Update nerd-fonts; whole repo on server, link font files to ~/.local/share/fonts |
|
||||
| fuz | Simple note-taking 'app' based on FZF and vim |
|
||||
| git_autosave | Simple script to call from crontab or something to commit certain files in Git and push |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
|
||||
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
|
||||
|
||||
191
bin/font_update
191
bin/font_update
@@ -13,17 +13,128 @@ function install_font {
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
FONTS_CODING=$'Hack/Bold/complete/Hack Bold Nerd Font Complete Mono.ttf
|
||||
FONTS_CODING_OLD=$'Hack/Bold/complete/Hack Bold Nerd Font Complete Mono.ttf
|
||||
Hack/Regular/complete/Hack Regular Nerd Font Complete Mono.ttf
|
||||
Hack/BoldItalic/complete/Hack Bold Italic Nerd Font Complete Mono.ttf
|
||||
Hack/Italic/complete/Hack Italic Nerd Font Complete Mono.ttf'
|
||||
Hack/Italic/complete/Hack Italic Nerd Font Complete Mono.ttf
|
||||
FiraCode/Bold/complete/Fira Code Bold Nerd Font Complete Mono.ttf
|
||||
FiraCode/Regular/complete/Fira Code Regular Nerd Font Complete Mono.ttf
|
||||
SourceCodePro/Bold/complete/Sauce Code Pro Bold Nerd Font Complete Mono.ttf
|
||||
SourceCodePro/Regular/complete/Sauce Code Pro Nerd Font Complete Mono.ttf
|
||||
SourceCodePro/Light/complete/Sauce Code Pro Light Nerd Font Complete Mono.ttf
|
||||
SourceCodePro/Light-Italic/complete/Sauce Code Pro Light Italic Nerd Font Complete Mono.ttf'
|
||||
|
||||
FONTS_CODING=$'HackNerdFontMono-BoldItalic.ttf
|
||||
HackNerdFontMono-Bold.ttf
|
||||
HackNerdFontMono-Italic.ttf
|
||||
HackNerdFontMono-Regular.ttf
|
||||
FiraCodeNerdFontMono-Bold.ttf
|
||||
FiraCodeNerdFontMono-Light.ttf
|
||||
FiraCodeNerdFontMono-Medium.ttf
|
||||
FiraCodeNerdFontMono-Regular.ttf
|
||||
FiraCodeNerdFontMono-Retina.ttf
|
||||
FiraCodeNerdFontMono-SemiBold.ttf
|
||||
JetBrainsMonoNerdFontMono-BoldItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-Bold.ttf
|
||||
JetBrainsMonoNerdFontMono-ExtraBoldItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-ExtraBold.ttf
|
||||
JetBrainsMonoNerdFontMono-ExtraLightItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-ExtraLight.ttf
|
||||
JetBrainsMonoNerdFontMono-Italic.ttf
|
||||
JetBrainsMonoNerdFontMono-LightItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-Light.ttf
|
||||
JetBrainsMonoNerdFontMono-MediumItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-Medium.ttf
|
||||
JetBrainsMonoNerdFontMono-Regular.ttf
|
||||
JetBrainsMonoNerdFontMono-SemiBoldItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-SemiBold.ttf
|
||||
JetBrainsMonoNerdFontMono-ThinItalic.ttf
|
||||
JetBrainsMonoNerdFontMono-Thin.ttf
|
||||
LilexNerdFont-BoldItalic.ttf
|
||||
LilexNerdFont-Bold.ttf
|
||||
LilexNerdFont-ExtraLightItalic.ttf
|
||||
LilexNerdFont-ExtraLight.ttf
|
||||
LilexNerdFont-Italic.ttf
|
||||
LilexNerdFont-MediumItalic.ttf
|
||||
LilexNerdFont-Medium.ttf
|
||||
LilexNerdFont-Regular.ttf
|
||||
LilexNerdFont-ThinItalic.ttf
|
||||
LilexNerdFont-Thin.ttf
|
||||
MonaspiceNeNerdFontMono-BoldItalic.otf
|
||||
MonaspiceNeNerdFontMono-Bold.otf
|
||||
MonaspiceNeNerdFontMono-Italic.otf
|
||||
MonaspiceNeNerdFontMono-LightItalic.otf
|
||||
MonaspiceNeNerdFontMono-Light.otf
|
||||
MonaspiceNeNerdFontMono-Regular.otf'
|
||||
|
||||
FONTS_FUTURA=$'Futura-Std-Bold_19042.ttf
|
||||
Futura-Std-Bold-Oblique_19041.ttf
|
||||
Futura-Std-Book_19044.ttf
|
||||
Futura-Std-Book-Oblique_19043.ttf'
|
||||
|
||||
FONTS_OVERPASS=$'overpass-bold-italic.otf
|
||||
FONTS_OVERPASS=$'Overpass-BlackItalic.ttf
|
||||
Overpass-Black.ttf
|
||||
Overpass-BoldItalic.ttf
|
||||
Overpass-Bold.ttf
|
||||
Overpass-ExtraBoldItalic.ttf
|
||||
Overpass-ExtraBold.ttf
|
||||
Overpass-ExtraLightItalic.ttf
|
||||
Overpass-ExtraLight.ttf
|
||||
Overpass-Italic.ttf
|
||||
Overpass-LightItalic.ttf
|
||||
Overpass-Light.ttf
|
||||
Overpass-MediumItalic.ttf
|
||||
Overpass-Medium.ttf
|
||||
Overpass-Regular.ttf
|
||||
Overpass-SemiBoldItalic.ttf
|
||||
Overpass-SemiBold.ttf
|
||||
Overpass-ThinItalic.ttf
|
||||
Overpass-Thin.ttf'
|
||||
|
||||
FONTS_JETBRAINS=$'JetBrainsMono-BoldItalic.ttf
|
||||
JetBrainsMono-Bold.ttf
|
||||
JetBrainsMono-ExtraBoldItalic.ttf
|
||||
JetBrainsMono-ExtraBold.ttf
|
||||
JetBrainsMono-Italic.ttf
|
||||
JetBrainsMono-MediumItalic.ttf
|
||||
JetBrainsMono-Medium.ttf
|
||||
JetBrainsMono-Regular.ttf'
|
||||
|
||||
FONTS_GO=$'Go-Bold-Italic.ttf
|
||||
Go-Bold.ttf
|
||||
Go-Italic.ttf
|
||||
Go-Medium-Italic.ttf
|
||||
Go-Medium.ttf
|
||||
Go-Regular.ttf
|
||||
Go-Smallcaps-Italic.ttf
|
||||
Go-Smallcaps.ttf'
|
||||
|
||||
FONTS_RUBIK=$'Rubik-BlackItalic.ttf
|
||||
Rubik-Black.ttf
|
||||
Rubik-BoldItalic.ttf
|
||||
Rubik-Bold.ttf
|
||||
Rubik-Italic.ttf
|
||||
Rubik-LightItalic.ttf
|
||||
Rubik-Light.ttf
|
||||
Rubik-MediumItalic.ttf
|
||||
Rubik-Medium.ttf
|
||||
Rubik-Regular.ttf'
|
||||
|
||||
# https://github.com/eosrei/emojione-color-font/
|
||||
# FONTS_VARIOUS=$'EmojiOneColor-SVGinOT.ttf'
|
||||
|
||||
FONTS_DELETE=$'Sauce Code Pro Medium Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Sauce Code Pro Bold Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Sauce Code Pro Medium Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Bold Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack BoldOblique Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack RegularOblique Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Bold Nerd Font Complete Mono.ttf
|
||||
Knack Regular Nerd Font Complete Mono.ttf
|
||||
Knack Bold Italic Nerd Font Complete Mono.ttf
|
||||
Knack Italic Nerd Font Complete Mono.ttf
|
||||
overpass-bold-italic.otf
|
||||
overpass-bold.otf
|
||||
overpass-extrabold-italic.otf
|
||||
overpass-extrabold.otf
|
||||
@@ -38,51 +149,55 @@ overpass-regular.otf
|
||||
overpass-semibold-italic.otf
|
||||
overpass-semibold.otf
|
||||
overpass-thin-italic.otf
|
||||
overpass-thin.otf'
|
||||
|
||||
FONTS_GO=$'Go-Bold-Italic.ttf
|
||||
Go-Bold.ttf
|
||||
Go-Italic.ttf
|
||||
Go-Medium-Italic.ttf
|
||||
Go-Medium.ttf
|
||||
Go-Regular.ttf
|
||||
Go-Smallcaps-Italic.ttf
|
||||
Go-Smallcaps.ttf'
|
||||
|
||||
# https://github.com/eosrei/emojione-color-font/
|
||||
FONTS_VARIOUS=$'EmojiOneColor-SVGinOT.ttf'
|
||||
|
||||
FONTS_DELETE=$'Sauce Code Pro Medium Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Sauce Code Pro Bold Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Sauce Code Pro Medium Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Bold Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Plus Nerd File Types Mono Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack BoldOblique Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack RegularOblique Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons.ttf
|
||||
Knack Bold Nerd Font Complete Mono.ttf
|
||||
Knack Regular Nerd Font Complete Mono.ttf
|
||||
Knack Bold Italic Nerd Font Complete Mono.ttf
|
||||
Knack Italic Nerd Font Complete Mono.ttf'
|
||||
overpass-thin.otf
|
||||
Fira Code Bold Nerd Font Complete Mono.ttf
|
||||
Fira Code Regular Nerd Font Complete Mono.ttf
|
||||
Hack Bold Nerd Font Complete Mono.ttf
|
||||
Hack Regular Nerd Font Complete Mono.ttf
|
||||
Hack Bold Italic Nerd Font Complete Mono.ttf
|
||||
Hack Italic Nerd Font Complete Mono.ttf
|
||||
JetBrainsMono-Bold-Italic.ttf
|
||||
JetBrainsMono-ExtraBold-Italic.ttf
|
||||
JetBrainsMono-Medium-Italic.ttf'
|
||||
|
||||
if [ -e ~/.dot_is_server ]; then
|
||||
# Update from the repo
|
||||
echo "== Nerd fonts ======"
|
||||
PARENT_DIR="/stuff/system/fonts"
|
||||
SOURCE_DIR="/stuff/system/fonts/nerd-fonts/patched-fonts"
|
||||
DEST_DIR="/stuff/system/sync/fonts/active"
|
||||
#if [ -d "$PARENT_DIR" ] && [ -d "$SOURCE_DIR" ] && [ -d "$DEST_DIR" ]; then
|
||||
if [ -d "$PARENT_DIR" ] && [ -d "$DEST_DIR" ]; then
|
||||
cd "$PARENT_DIR"
|
||||
# git pull --all
|
||||
#git clone --depth=1 https://github.com/ryanoasis/nerd-fonts.git
|
||||
cd "$SOURCE_DIR"
|
||||
while read -r FONT; do
|
||||
echo "Copied font: $FONT"
|
||||
cp -a "$SOURCE_DIR/$FONT" "$DEST_DIR"
|
||||
done <<< "$FONTS_CODING"
|
||||
else
|
||||
echo "$PARENT_DIR, $SOURCE_DIR or $DEST_DIR not found, aborting"
|
||||
fi
|
||||
|
||||
# Update from the repo
|
||||
echo "== Jetbrains Mono ======"
|
||||
SOURCE_DIR="/stuff/system/fonts/JetBrainsMono/fonts/ttf"
|
||||
DEST_DIR="/stuff/system/sync/fonts/active"
|
||||
if [ -d "$SOURCE_DIR" ] && [ -d "$DEST_DIR" ]; then
|
||||
cd "$SOURCE_DIR"
|
||||
git pull --all
|
||||
while read -r FONT; do
|
||||
echo "Copied font: $FONT"
|
||||
cp -a "$SOURCE_DIR/$FONT" "$DEST_DIR"
|
||||
done <<< "$FONTS_CODING"
|
||||
done <<< "$FONTS_JETBRAINS"
|
||||
else
|
||||
echo "$SOURCE_DIR or $DEST_DIR not found, aborting"
|
||||
fi
|
||||
|
||||
# Update from the repo
|
||||
echo "== Overpass ======"
|
||||
SOURCE_DIR="/stuff/system/fonts/Overpass/desktop-fonts/overpass"
|
||||
SOURCE_DIR="/stuff/system/fonts/Overpass/fonts/ttf"
|
||||
DEST_DIR="/stuff/system/sync/fonts/active"
|
||||
if [ -d "$SOURCE_DIR" ] && [ -d "$DEST_DIR" ]; then
|
||||
cd "$SOURCE_DIR"
|
||||
@@ -123,6 +238,9 @@ else
|
||||
FONT_FILE=$(basename "${SOURCE_DIR}/${FONT}")
|
||||
install_font "$SOURCE_DIR/$FONT_FILE" "$DEST_DIR/$FONT_FILE"
|
||||
done <<< "$FONTS_CODING"
|
||||
while read -r FONT; do
|
||||
install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT"
|
||||
done <<< "$FONTS_JETBRAINS"
|
||||
while read -r FONT; do
|
||||
install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT"
|
||||
done <<< "$FONTS_FUTURA"
|
||||
@@ -134,12 +252,16 @@ else
|
||||
done <<< "$FONTS_GO"
|
||||
while read -r FONT; do
|
||||
install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT"
|
||||
done <<< "$FONTS_VARIOUS"
|
||||
done <<< "$FONTS_RUBIK"
|
||||
# while read -r FONT; do
|
||||
# install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT"
|
||||
# done <<< "$FONTS_VARIOUS"
|
||||
if [ ! -e "${HOME}/.config/fontconfig" ]; then
|
||||
mkdir -p "${HOME}/.config/fontconfig"
|
||||
fi
|
||||
if [ ! -e "${HOME}/.config/fontconfig/fonts.conf" ]; then
|
||||
ln -s "${SOURCE_DIR}/fonts.conf" "${HOME}/.config/fontconfig/"
|
||||
if [ -L "${HOME}/.config/fontconfig/fonts.conf" ]; then
|
||||
# Remove the emoji-fallback config that causes crashes in Telegram Desktop (symlink)
|
||||
rm "${HOME}/.config/fontconfig/fonts.conf"
|
||||
fi
|
||||
# Delete obsolete fonts
|
||||
while read -r FONT; do
|
||||
@@ -150,7 +272,8 @@ else
|
||||
done <<< "$FONTS_DELETE"
|
||||
# Just to be sure, clear and refresh your font cache and restart Firefox
|
||||
fc-cache -f -v
|
||||
echo 'You might want to restart your browser'
|
||||
echo
|
||||
echo '/!\ You might want to restart your browser and/or terminals'
|
||||
else
|
||||
echo "$SOURCE_DIR not found, aborting"
|
||||
fi
|
||||
|
||||
111
bin/gitmv
Executable file
111
bin/gitmv
Executable file
@@ -0,0 +1,111 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# git-mv-with-history -- move/rename file or folder, with history.
|
||||
#
|
||||
# Moving a file in git doesn't track history, so the purpose of this
|
||||
# utility is best explained from the kernel wiki:
|
||||
#
|
||||
# Git has a rename command git mv, but that is just for convenience.
|
||||
# The effect is indistinguishable from removing the file and adding another
|
||||
# with different name and the same content.
|
||||
#
|
||||
# https://git.wiki.kernel.org/index.php/GitFaq#Why_does_Git_not_.22track.22_renames.3F
|
||||
#
|
||||
# While the above sucks, git has the ability to let you rewrite history
|
||||
# of anything via `filter-branch`. This utility just wraps that functionality,
|
||||
# but also allows you to easily specify more than one rename/move at a
|
||||
# time (since the `filter-branch` can be slow on big repos).
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# git-rewrite-history [-d/--dry-run] [-v/--verbose] <srcname>=<destname> <...> <...>
|
||||
#
|
||||
# After the repsitory is re-written, eyeball it, commit and push up.
|
||||
#
|
||||
# Given this example repository structure:
|
||||
#
|
||||
# src/makefile
|
||||
# src/test.cpp
|
||||
# src/test.h
|
||||
# src/help.txt
|
||||
# README.txt
|
||||
#
|
||||
# The command:
|
||||
#
|
||||
# git-rewrite-history README.txt=README.md \ <-- rename to markdpown
|
||||
# src/help.txt=docs/ \ <-- move help.txt into docs
|
||||
# src/makefile=src/Makefile <-- capitalize makefile
|
||||
#
|
||||
# Would restructure and retain history, resulting in the new structure:
|
||||
#
|
||||
# docs/help.txt
|
||||
# src/Makefile
|
||||
# src/test.cpp
|
||||
# src/test.h
|
||||
# README.md
|
||||
#
|
||||
# @author emiller
|
||||
# @date 2013-09-29
|
||||
# @url https://gist.github.com/tupy/79ec62fee769d4049db2
|
||||
#
|
||||
|
||||
function usage() {
|
||||
echo "usage: `basename $0` [-d/--dry-run] [-v/--verbose] <srcname>=<destname> <...> <...>"
|
||||
[ -z "$1" ] || echo $1
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ ! -d .git ] && usage "error: must be ran from within the root of the repository"
|
||||
|
||||
dryrun=0
|
||||
filter=""
|
||||
verbose=""
|
||||
repo=$(basename `git rev-parse --show-toplevel`)
|
||||
|
||||
while [[ $1 =~ ^\- ]]; do
|
||||
case $1 in
|
||||
-d|--dry-run)
|
||||
dryrun=1
|
||||
;;
|
||||
|
||||
-v|--verbose)
|
||||
verbose="-v"
|
||||
;;
|
||||
|
||||
*)
|
||||
usage "invalid argument: $1"
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
for arg in $@; do
|
||||
val=`echo $arg | grep -q '=' && echo 1 || echo 0`
|
||||
src=`echo $arg | sed 's/\(.*\)=\(.*\)/\1/'`
|
||||
dst=`echo $arg | sed 's/\(.*\)=\(.*\)/\2/'`
|
||||
dir=`echo $dst | grep -q '/$' && echo $dst || dirname $dst`
|
||||
|
||||
[ "$val" -ne 1 ] && usage
|
||||
[ ! -e "$src" ] && usage "error: $src does not exist"
|
||||
|
||||
filter="$filter \n\
|
||||
if [ -e \"$src\" ]; then \n\
|
||||
echo \n\
|
||||
if [ ! -e \"$dir\" ]; then \n\
|
||||
mkdir -p ${verbose} \"$dir\" && echo \n\
|
||||
fi \n\
|
||||
mv $verbose \"$src\" \"$dst\" \n\
|
||||
fi \n\
|
||||
"
|
||||
done
|
||||
|
||||
[ -z "$filter" ] && usage
|
||||
|
||||
if [[ $dryrun -eq 1 || ! -z $verbose ]]; then
|
||||
echo
|
||||
echo "tree-filter to execute against $repo:"
|
||||
echo -e "$filter"
|
||||
fi
|
||||
|
||||
[ $dryrun -eq 0 ] && git filter-branch -f --tree-filter "`echo -e $filter`"
|
||||
48
bin/mac.sh
Executable file
48
bin/mac.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stolen from https://raw.githubusercontent.com/Cybertinus/macvendor_extractor/master/mac.sh
|
||||
|
||||
##########
|
||||
# CONFIG #
|
||||
##########
|
||||
|
||||
# Download from http://standards-oui.ieee.org/oui/oui.txt
|
||||
ouilocation="${HOME}/.dot/oui.txt"
|
||||
|
||||
#################
|
||||
# ACTUAL SCRIPT #
|
||||
#################
|
||||
|
||||
if [ ! -f "${ouilocation}" ] ; then
|
||||
echo "OUI location can not be found at ${ouilocation}. Have you updated the config?" 1>&2
|
||||
read -p "Do you want to download it now [y/N]? " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
wget https://standards-oui.ieee.org/oui/oui.txt -O "${ouilocation}"
|
||||
else
|
||||
echo "Aborted"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $(find "${ouilocation}" -mtime +30 -print) ]]; then
|
||||
echo "File ${ouilocation} is older than 30 days"
|
||||
fi
|
||||
|
||||
if [ -z "${1}" ] ; then
|
||||
echo 'No mac address specified, please do so as first argument' 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
macaddress="$(echo "${1}" | sed -e 's/[-.:]//g' | tr '[:lower:]' '[:upper:]')"
|
||||
macaddress="${macaddress:0:6}"
|
||||
echo -n "${1} = "
|
||||
|
||||
vendor="$(awk "/^${macaddress}/ {print substr(\$0,index(\$0,\$4))}" "${ouilocation}")"
|
||||
if [ -z "${vendor}" ] ; then
|
||||
echo "Not specified in ${ouilocation}"
|
||||
else
|
||||
echo "${vendor}"
|
||||
fi
|
||||
|
||||
7
bin/ocr
Normal file
7
bin/ocr
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# apt install ocrmypdf
|
||||
if [ "$1" != "" ]; then
|
||||
nice -20 ocrmypdf --redo-ocr --pdfa-image-compression lossless --output-type pdfa-2 "$1" "$1"
|
||||
else
|
||||
echo "No filename given"
|
||||
fi
|
||||
33
bin/pgadmin4
33
bin/pgadmin4
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
PGADMINVENV="pgadmin4"
|
||||
VENVDIR="$HOME/.virtualenvs/${PGADMINVENV}"
|
||||
|
||||
if [ ! -d "$VENVDIR" ] || [ ! -e "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py" ] || [ ! -e "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py" ]; then
|
||||
if [[ -z "$VIRTUAL_ENV" ]]; then
|
||||
# Only activate the virtualenv if we aren't in one already
|
||||
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
||||
mkvirtualenv "${PGADMINVENV}"
|
||||
echo "Downloading the wheel from https://www.pgadmin.org/download/pgadmin-4-python-wheel/ ..."
|
||||
pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.6/pip/pgadmin4-1.6-py2.py3-none-any.whl
|
||||
echo "SERVER_MODE = False" >> "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py"
|
||||
fi
|
||||
|
||||
# Install
|
||||
#echo
|
||||
#echo "Download the wheel from https://www.pgadmin.org/download/pgadmin-4-python-wheel/"
|
||||
#echo
|
||||
#echo "Install with:"
|
||||
#echo "workon pgadmin4"
|
||||
#echo "pip install ./pgadmin4-1.6-py2.py3-none-any.whl"
|
||||
#echo "echo "SERVER_MODE = False" >> ${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py"
|
||||
else
|
||||
if [[ -z "$VIRTUAL_ENV" ]]; then
|
||||
# Only activate the virtualenv if we aren't in one already
|
||||
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
||||
workon "${PGADMINVENV}"
|
||||
fi
|
||||
|
||||
# Start
|
||||
python "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py"
|
||||
fi
|
||||
10
bin/unzip_all
Executable file
10
bin/unzip_all
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
find . -type f -name '*.zip' -exec sh -c '
|
||||
for file do
|
||||
echo "$file"
|
||||
zipdir=$(basename "$file" .zip)
|
||||
#echo "$zipdir $file"
|
||||
unzip -d "$zipdir" "$file"
|
||||
done
|
||||
' sh {} +
|
||||
10
bin/update_discord
Executable file
10
bin/update_discord
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Use a uniquely named, temporary directory to download to
|
||||
TMPDIR=$(mktemp -d)
|
||||
|
||||
wget "https://discord.com/api/download?platform=linux&format=deb" -O "${TMPDIR}/discord.deb"
|
||||
sudo dpkg -i "${TMPDIR}/discord.deb"
|
||||
|
||||
# Clean up
|
||||
rm "${TMPDIR}/discord.deb"
|
||||
26
bin/update_proton_ge
Executable file
26
bin/update_proton_ge
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# make temp working directory
|
||||
mkdir /tmp/proton-ge-custom
|
||||
cd /tmp/proton-ge-custom
|
||||
|
||||
# download tarball
|
||||
echo "Downloading tarball of latest release..."
|
||||
curl -sLOJ $(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep .tar.gz)
|
||||
|
||||
# download checksum
|
||||
echo "Downloading checksum..."
|
||||
curl -sLOJ $(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep .sha512sum)
|
||||
|
||||
# check tarball with checksum
|
||||
echo "Checking..."
|
||||
sha512sum -c *.sha512sum
|
||||
# if result is ok, continue
|
||||
|
||||
# make steam directory if it does not exist
|
||||
mkdir -p ~/.steam/root/compatibilitytools.d
|
||||
|
||||
# extract proton tarball to steam directory
|
||||
echo "Extracting to Steam folder..."
|
||||
tar -xf GE-Proton*.tar.gz -C ~/.steam/root/compatibilitytools.d/
|
||||
echo "All done :)"
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
cd ~/mydocs/work/divault
|
||||
cd ~/divaultplan
|
||||
git pull
|
||||
cd ~/divaultphren
|
||||
git pull
|
||||
cd ~/divaultwiki
|
||||
git pull
|
||||
#vim -c ":vsp planning_2015.todo" notes_2015.md notes_2014.md
|
||||
vim -c "set nofoldenable" planning_2019.todo notes.md
|
||||
vim -c "set nofoldenable" ~/divaultplan/planning_2025.todo ~/divaultphren/index.md ~/divaultwiki/home.md
|
||||
|
||||
37
install.sh
37
install.sh
@@ -30,15 +30,14 @@ install_fish()
|
||||
mkdir -p "${HOME}/.config/fish/completions"
|
||||
curl -sL get.fisherman.sh | fish
|
||||
ln -s "${HOME}/.dot/dotfiles/.config/fish/config.fish" "${HOME}/.config/fish/"
|
||||
ln -s "${HOME}/.dot/dotfiles/.config/fish/fishfile" "${HOME}/.config/fish/"
|
||||
ln -s "${HOME}/.dot/dotfiles/.config/fish/completions/terrible_job.fish" "${HOME}/.config/fish/completions"
|
||||
ln -s "${HOME}/.dot/dotfiles/.config/fish/fish_plugins" "${HOME}/.config/fish/"
|
||||
ln -s "${HOME}/workspace/application_addons/cli/git-flow-completion/git.fish" "${HOME}/.config/fish/completions"
|
||||
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/mux.fish" "${HOME}/.config/fish/completions"
|
||||
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/tmuxinator.fish" "${HOME}/.config/fish/completions"
|
||||
echo
|
||||
echo "You might want to install Fisher:"
|
||||
echo "curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish"
|
||||
echo "And some plugins: fisher"
|
||||
echo "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher"
|
||||
echo "fisher update"
|
||||
echo
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ DATETIME=$(date +%Y%m%d_%H%M)
|
||||
cd || exit
|
||||
|
||||
# Symlink all the things
|
||||
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitmodules .hgauthors.txt .hgignore .hgrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh
|
||||
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh
|
||||
do
|
||||
make_link $DIR $TARGET
|
||||
done
|
||||
@@ -98,22 +97,9 @@ git submodule init
|
||||
echo "INFO: Update submodules"
|
||||
git submodule update
|
||||
|
||||
if [ ! -d "${HOME}/.vim/bundle/Vundle.vim" ]; then
|
||||
mkdir -p ~/.vim/bundle
|
||||
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
else
|
||||
cd ~/.vim/bundle/Vundle.vim || exit
|
||||
git pull
|
||||
cd || exit
|
||||
fi
|
||||
|
||||
echo "INFO: Vundle Install"
|
||||
vim +BundleInstall +qall
|
||||
|
||||
if [ ! -e ${HOME}/.githelpers ]; then
|
||||
ln -s ${HOME}/.vim/bundle/falcon/.githelpers ${HOME}/.githelpers
|
||||
else
|
||||
echo "${HOME}/.githelpers exists, skipping"
|
||||
if [ ! -d "${HOME}/.vim/autoload/plug.vim" ]; then
|
||||
echo "INFO: vim-plug install by running vim"
|
||||
vim
|
||||
fi
|
||||
|
||||
#if [ -e ~/.dot_has_hg ]; then
|
||||
@@ -142,6 +128,15 @@ elif [ ! -e ~/.dot/.dot_no_fish ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Do you wish to install the starship prompt?"
|
||||
select yn in "Yes" "No"; do
|
||||
case $yn in
|
||||
Yes ) make_link $DIR ".config/starship.toml"; curl -sS https://starship.rs/install.sh | sh; break;;
|
||||
No ) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -e ~/.dot_is_server ] && [ ! -e ~/.dot_no_server ]; then
|
||||
echo
|
||||
echo "Is this machine a server?"
|
||||
|
||||
Reference in New Issue
Block a user