diff --git a/.config/doom/config.el b/.config/doom/config.el index 841c9a2..fe775d8 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -371,6 +371,7 @@ Version 2019-11-04 2021-02-16" (map! :map dired-mode-map :n "RET" 'dired-find-file-dwim :localleader + "s" 'dired-do-symlink :desc "Open dir in image-dired" "i" (lambda () (interactive) (image-dired buffer-file-name)) :desc "Compress/Extract" "c" 'dired-do-compress diff --git a/.config/doom/snippets/org-mode/reading-list-book b/.config/doom/snippets/org-mode/reading-list-book index 7132a76..171d173 100644 --- a/.config/doom/snippets/org-mode/reading-list-book +++ b/.config/doom/snippets/org-mode/reading-list-book @@ -3,7 +3,7 @@ # key: B # expand-env: ((yas-wrap-around-region 'nil)) # -- -INTEREST $1 +$1 :PROPERTIES: :Author: ${2:+} :LibErlangen: https://stadtbibliothek-recherche.erlangen.de/Mediensuche/Einfache-Suche?search=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)}&top=y&facets=v_____Sachb%C3%BCcher%7CJugendsachbuch%7CJugendroman%7CBuch+Romane%7CSachb%C3%BCcher+Weih.%2fOst&facetsc=_____15&pagesize=20 diff --git a/.config/espanso/default.yml b/.config/espanso/default.yml index 5e2b750..4e71ac3 100644 --- a/.config/espanso/default.yml +++ b/.config/espanso/default.yml @@ -122,3 +122,11 @@ matches: type: shell params: cmd: "pass information/signature" + + - trigger: ":iban" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "pass information/banking/dkb | head -1" diff --git a/.config/git/config b/.config/git/config index 05de0e6..16c8fe2 100644 --- a/.config/git/config +++ b/.config/git/config @@ -97,7 +97,9 @@ sd = switch -d sm = !git switch $(git main) + find = log --patch --all --full-history ref = reflog show --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' + rev = rev-parse --short head = rev-parse --short HEAD root = rev-parse --show-toplevel diff --git a/.config/nvim/init/pluginConfig.vim b/.config/nvim/init/pluginConfig.vim index bfa6d17..a2fa1a1 100644 --- a/.config/nvim/init/pluginConfig.vim +++ b/.config/nvim/init/pluginConfig.vim @@ -39,8 +39,9 @@ let g:firenvim_config = { \ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'never', }, \ '.*wikipedia\.org.*': { 'priority': 9, 'takeover': 'never', }, \ - \ '.*notion\.so.*': { 'priority': 9, 'takeover': 'never', }, \ '.*docs\.google\.com.*': { 'priority': 9, 'takeover': 'never', }, + \ '.*contacts\.google\.com.*': { 'priority': 9, 'takeover': 'never', }, + \ '.*notion\.so.*': { 'priority': 9, 'takeover': 'never', }, \ '.*cloud\.atomtoast\.xyz.*': { 'priority': 9, 'takeover': 'never', }, \ 'https://bigbluebutton.*': { 'priority': 9, 'takeover': 'never', }, \ 'https://dhall-lang.org.*': { 'priority': 9, 'takeover': 'never', }, diff --git a/.config/shell/functions b/.config/shell/functions index 8c2e1c7..b3ef19f 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -50,7 +50,7 @@ rd() { wh() { res=$(which "$@") if expr "$res" : "${@:$#}: aliased to" >/dev/null - then echo "$res" | bat --style=plain --language=sh && wh $(expr "$res" : "${@:$#}: aliased to ${@:$#} " >/dev/null && echo "-p") $(echo "$res" | cut -d' ' -f4) + then echo "$res" | bat --style=plain --language=sh && wh $(expr "$res" : "${@:$#}: aliased to ${@:$#} " >/dev/null && echo "-p") $(echo "$res" | cut -d' ' -f$(expr 5 '&' "$res" : ".*\(sudo\|noglob\)" '|' 4)) # use command which for other shells else test -r "$res" && b --style=header "$res" || echo "$res" | bat --style=plain --language=sh fi @@ -78,7 +78,7 @@ alias dedup='awk '"'"'!a[$0]++'"'" listconf() { { cat "$conf_cache"; test -f "$conf_extra" && cat "$conf_extra"; fd --hidden --type file --size -1m --max-depth 1 . ~; - fd --hidden --type file --size -1m --max-depth 3 . --full-path "$XDG_CONFIG_HOME" /etc } | dedup + sudo fd --hidden --type file --size -1m --max-depth 3 . --full-path "$XDG_CONFIG_HOME" /etc } | dedup } edconf() { @@ -88,12 +88,12 @@ edconf() { conf_extra="$XDG_CONFIG_HOME/edconf-extra" mkdir -p "$conf_cache_dir" touch "$conf_cache" - sel=$(listconf | fzf -1 -0 --tiebreak=end,length --preview 'bat --color=always --style=numbers --line-range :200 {}' --query="$1" --history "$conf_cache_dir/searches") + sel=$(listconf | fzf -1 -0 --tiebreak=end,length --preview '$(test -r "{}" || echo "sudo") bat --color=always --style=numbers --line-range :200 {}' --query="$1" --history "$conf_cache_dir/searches") # | xargs file | grep text | cut -d':' -f1 # this filters out non-text files, but it's ridiculously slow test "$sel" && ((echo "$sel" | cat - "$conf_cache" | head -30 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache") & edit "$sel") } -alias hist='print -z $(history | tac | fzf --tiebreak=index | tr -s " " | cut -d" " -f5-)' +alias hist='print -z $(history | tac | fzf --tiebreak=index --bind="'"del:execute(echo \"'/;{4..}$/d'\" && sed '/;{4..}$/d' -i.bak $HISTFILE)"'" | sed "s|^ \+||" | cut -d" " -f5-)' CONFIG_SHELL_FUNCTIONS="${BASH_SOURCE[0]:-${(%):-%x}}" alias rs="reset && exec zsh" @@ -164,8 +164,9 @@ xo() { done } alias sqli='rlwrap sqlite3 -column -header -cmd .tables' -loc() { noglob locate --ignore-case --basename --existing "$@" | grep --color=always "$@" | less -F } -alias uloc='noglob sudo updatedb && loc' +loci() { locate --ignore-case --basename --existing "$@" | command grep --extended-regexp --ignore-case --color=always $(echo "$|$@" | sed 's/ /|/g') | less -F } +alias loc='noglob loci' +alias uloc='noglob sudo updatedb && loci' alias syslog='less +F /var/log/syslog' alias println='printf "\n"' alias graphics='lspci -vnn | grep VGA --color=never && xrandr --listproviders' diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index 2c1f35d..f1e3ba5 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -3,6 +3,7 @@ section() { printf "\n$1\n"; } highlight() { printf "$1\n"; } ## System +### TODO move to sysyadm section "System" highlight "Enable REISUB and increase watch limit for Intellij & co" @@ -12,7 +13,7 @@ sudo sysctl --system highlight "Default sudoers configuration" echo "Defaults editor=/usr/bin/nvim" | sudo tee /etc/sudoers.d/editor -echo -e "Defaults timestamp_timeout=120\nDefaults passwd_timeout=30" | sudo tee /etc/sudoers.d/timeout +echo -e "Defaults timestamp_timeout=120\nDefaults passwd_timeout=30" | sudo tee /etc/sudoers.d/timeout highlight "password-free reboot" echo "$USER ALL = NOPASSWD: /sbin/halt, /sbin/reboot, /usr/sbin/reboot, /sbin/poweroff, /usr/sbin/shutdown" | sudo tee /etc/sudoers.d/shutdown diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index cf6def8..1df2f6e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -34,8 +34,8 @@ plugins=( #git gitfast #git-auto-fetch - fast-syntax-highlighting zsh-autosuggestions + fast-syntax-highlighting zsh-vim-mode history-substring-search ) diff --git a/.local/bin/scripts/arg-test b/.local/bin/scripts/arg-test index 2dab8b3..4fe2ddc 100755 --- a/.local/bin/scripts/arg-test +++ b/.local/bin/scripts/arg-test @@ -1,5 +1,4 @@ #!/bin/sh -echo "Args: $@" -echo "Number of args: $#" +echo "$# Args: $@" echo "${@:-default}" | sed 's/\(\w\+\)/\1+sed/g' echo "Last arg: ${@:$#}" diff --git a/.pinforc b/.pinforc index 13f97ba..ca680de 100644 --- a/.pinforc +++ b/.pinforc @@ -37,7 +37,7 @@ KEY_TWOUP_1=KEY_IC KEY_TWOUP_2=0 KEY_END_1=KEY_END KEY_END_2='e' -KEY_PGDN_1=KEY_NPAGE +KEY_PGDN_1=KEY_CTRL('d') KEY_PGDN_2='d' KEY_PGDN_AUTO_1=0 KEY_PGDN_AUTO_2=' '