config: adjustments
This commit is contained in:
parent
f3392d61dd
commit
537bcf9d84
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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', },
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -3,6 +3,7 @@ section() { printf "\n[1m[4m$1[0m\n"; }
|
|||
highlight() { printf "[1m[3m$1[0m\n"; }
|
||||
|
||||
## System
|
||||
### TODO move to sysyadm
|
||||
section "System"
|
||||
|
||||
highlight "Enable REISUB and increase watch limit for Intellij & co"
|
||||
|
|
|
@ -34,8 +34,8 @@ plugins=(
|
|||
#git
|
||||
gitfast
|
||||
#git-auto-fetch
|
||||
fast-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
fast-syntax-highlighting
|
||||
zsh-vim-mode
|
||||
history-substring-search
|
||||
)
|
||||
|
|
|
@ -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: ${@:$#}"
|
||||
|
|
Loading…
Reference in New Issue