From d2643396e65ab3c1058a993090570890ce0173b4 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 28 Jun 2024 22:40:11 +0300 Subject: [PATCH] config: various tweaks --- .config/bash/aliases.bash | 7 +++++-- .config/mimeapps.list##user.janek | 1 + .config/nvim/init/firenvim.vim | 2 +- .config/shell/functions | 3 ++- .config/topgrade.d/topgrade.toml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.config/bash/aliases.bash b/.config/bash/aliases.bash index 76f4ec2..46c9bc1 100644 --- a/.config/bash/aliases.bash +++ b/.config/bash/aliases.bash @@ -2,9 +2,12 @@ test -n "$PS1" || return 0 which pfetch >/dev/null 2>&1 && pfetch +alias myip='curl -4 ifconfig.me && printf "\n" && curl -6 ifconfig.me' + ds() { - df -B1M -x tmpfs -x devtmpfs -x squashfs | - awk -v a="\033[31m" -v b="\033[33m" -v c="\033[35m" -v n="\033[0m" 'NR==1 {printf "%-20s %6s %7s %9s %s\n",$1,$5,$3,$4,$6} NR>1 {u=strtonum($5); printf (u > 98) ? a : (u > 96) ? b : (u > 90) ? c : ""; printf "%-20s %6s %6.1fG %8.1fG %s\n",$1,$5,$3/1024,$4/1024,$6; printf n}' + df -B1M -x tmpfs -x devtmpfs -x squashfs -x overlay | + grep -v '\b/[^/ ]*/[^/]*/[^/]*$' | + awk -v a="\033[31m" -v b="\033[33m" -v c="\033[35m" -v n="\033[0m" 'NR==1 {printf "%-20s %6s %7s %9s %s\n",$1,$5,$3,$4,$6} NR>1 {u=$5; printf (u > 98) ? a : (u > 96) ? b : (u > 90) ? c : ""; printf "%-20s %6s %6.1fG %8.1fG %s\n",$1,$5,$3/1024,$4/1024,$6; printf n}'; } ds diff --git a/.config/mimeapps.list##user.janek b/.config/mimeapps.list##user.janek index ea70747..3aae7f7 100644 --- a/.config/mimeapps.list##user.janek +++ b/.config/mimeapps.list##user.janek @@ -46,3 +46,4 @@ text/calendar=emacsclient.desktop; video/x-m4v=vlc.desktop text/vcard=emacs.desktop text/plain=emacs.desktop +image/webp=com.interversehq.qView.desktop diff --git a/.config/nvim/init/firenvim.vim b/.config/nvim/init/firenvim.vim index f67466b..1bfb3da 100644 --- a/.config/nvim/init/firenvim.vim +++ b/.config/nvim/init/firenvim.vim @@ -8,7 +8,7 @@ let g:firenvim_config = { \ 'cmdline': 'firenvim', \ 'priority': 0, \ 'selector': 'textarea:not([readonly]):not([class="handsontableInput"]):not([wrap="off"]):not([rows="1"]):not([title="Replace"]):not([title="Search"]):not([name="message"]), - \ div[role="textbox"]:not([aria-label="Search"]):not([class="ProseMirror"]), div[class="CodeMirror"]', + \ div[role="textbox"]:not([aria-label="Search"]):not([class="cm-content"]):not([class="ProseMirror"]), div[class="CodeMirror"]', \ 'takeover': 'always', \ }, \ '.*com.*': { diff --git a/.config/shell/functions b/.config/shell/functions index 24e9203..45184c6 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -254,7 +254,7 @@ alias lar='last | tac' alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G' alias hedgedoc="tmux kill-session -t hedgedoc; builtin cd '$d4/dev/_forks/hedgedoc' && tmux new-session -s hedgedoc -d 'yarn run dev' \; split-window -h 'nodemon --watch app.js --watch lib --watch locales --watch config.json app.js' \; ls" -alias myip='curl ifconfig.me && println && curl icanhazip.com' +alias myip='curl -4 ifconfig.me && printf "\n" && curl -6 ifconfig.me' # && println && curl icanhazip.com' alias ips='ip -br address && ip route' alias rm='rm -I' @@ -309,6 +309,7 @@ u() { } # Networking +alias rdns='drill -x' dns() { local dig="drill -Q" which drill >/dev/null || dig="dig +short" diff --git a/.config/topgrade.d/topgrade.toml b/.config/topgrade.d/topgrade.toml index 614be0a..8dcb701 100644 --- a/.config/topgrade.d/topgrade.toml +++ b/.config/topgrade.d/topgrade.toml @@ -58,7 +58,7 @@ repos = [ [linux] # Arguments to pass yay when updating packages -yay_arguments = "--diffmenu=false --overwrite /usr/lib/node_modules/node-gyp/**,/usr/lib/node_modules/npm/**,/usr/lib/** --ignore linux,zoom,qt*,zulip*,webcord*,brave*,*openjfx,android-studio*,clion*,intellij-idea-*,webstorm*,stretchly-xeruf-git" +yay_arguments = "--diffmenu=false --overwrite /usr/lib/node_modules/node-gyp/**,/usr/lib/node_modules/npm/**,/usr/lib/** --ignore linux,zoom,qt*,zulip*,webcord*,brave*,*openjfx,android-studio*,clion*,intellij-idea-*,webstorm*,texlive-full" #trizen_arguments = "--devel" #enable_tlmgr = true #emerge_sync_flags = "-q"