From e940ab3a8b2c0a9109ed0e36f4afad784eef846c Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 24 Dec 2024 14:59:12 +0800 Subject: Update --- X11/openbox/rc.xml | 1 + alias | 6 +++--- bin/log/shellrc | 3 ++- mutt/default | 7 +++++-- mutt/muttrc.topo | 14 ++++++++------ 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index a27914c..528881d 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml @@ -541,6 +541,7 @@ + alacritty -o 'env.fullrc="false"' -e nvim -c 'r !xsel -ob' -c 'normal A' -c 'startinsert' -c 'nmap <C-c> :w !xsel -ib<CR>:qa!<CR>' diff --git a/alias b/alias index 70afc1c..8fc7b48 100644 --- a/alias +++ b/alias @@ -273,7 +273,7 @@ alias cdssh='cd ~/.ssh' alias ptt='ssh ptt' alias sshv='ssh -t vps' ssh.tar() { - prompt-vim "tar cf - foo | ssh vps 'cd ~/Downloads; tar xf -' \nssh vps 'tar czf - --directory=/working/path target' | tar xvzf -" + prompt-vim "FOLDER=foo TARGET=~/Downloads tar cf - $FOLDER | pv -s $(du -sb $FOLDER | cut -f1) | ssh vps \"cd $TARGET; tar xf -\" \nssh vps 'tar czf - --directory=/working/path target' | tar xvzf -" } ssh.up() { set -o pipefail @@ -307,8 +307,8 @@ alias ys='yay -S' alias pqs='pacman -Qs' alias pqi='pacman -Qi' alias ysi='yay -Si' -alias pss='pacman -Ss' -alias yss='yay -Ss' +pss(){ pacman -Ss $@ | grep $1 -C2; } +yss(){ yay -Ss $@ | grep $1 -C2; } alias pqi='pacman -Qi' alias pql='pacman -Qlq' alias pqe='pacman -Qqe' diff --git a/bin/log/shellrc b/bin/log/shellrc index 504a129..71b28f5 100644 --- a/bin/log/shellrc +++ b/bin/log/shellrc @@ -3,8 +3,9 @@ alias cdl='cd ~/log' alias chw='tig -C ~/log' ww() { entry="${1:-inbox}" - entry="${entry%.md}" + export entry="${entry%.md}" file=$(find ~/log -name "${entry}*" | head -1) + file=${file:-$HOME/log/$entry.md} $EDITOR $file } wj() { echo "$@" >>~/log/buffer.md; } diff --git a/mutt/default b/mutt/default index 9c0f7e0..d255e70 100644 --- a/mutt/default +++ b/mutt/default @@ -54,7 +54,6 @@ macro index q '?' bind index o sort-reverse bind index O sort-mailbox bind index E edit-type -bind index,pager N search-opposite bind index,pager sync-mailbox bind index y edit-label bind index x tag-entry @@ -70,7 +69,8 @@ bind index,pager,browser,attach \cf next-page bind index,pager,browser,attach \cb previous-page bind index,pager,browser,attach \cd half-down bind index,pager,browser,attach \cu half-up -bind index,pager previous-new-then-unread +bind index,pager previous-new-then-unread +bind index,pager next-new-then-unread bind index } bottom-page bind index p parent-message bind index P print-message @@ -105,6 +105,9 @@ macro pager U "\ |less\n\ :set pipe_decode=\$my_tmp_pipe_decode\n\ :unset my_tmp_pipe_decode\n" +macro index A \ + "~NN." \ + "mark all new as read" #macro pager U "less" "CHECK" # Quick jump to other mailboxes bind index,pager g noop diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo index 12e7c88..72a01f8 100644 --- a/mutt/muttrc.topo +++ b/mutt/muttrc.topo @@ -25,8 +25,8 @@ set mask="!(tmp|new|cur|dovecot.*|\\..*|maildirfolder)" # Sidebar mailboxes -label '📭 [i]' + \ -label '📥 [m]' +mbox \ - -label '👀 [d]' +dev \ - -label '💬 [D]' +DeltaChat \ + -label '👀 [D]' +dev \ + -label '💬 [d]' +DeltaChat \ +github \ +JOB \ +promotion \ @@ -40,7 +40,8 @@ mailboxes -label '📭 [i]' + \ -label '💲 [p]' +pay \ -label '🍺 [k]' +keep \ -label '📤 [s]' +Sent \ - -label '🗑 [t]' -poll +Trash \ + -label '🗑 [T]' -poll +Trash \ + +talk \ +login \ +update \ +service \ @@ -65,9 +66,10 @@ macro index,pager,browser gP "+promotion" "Switch macro index,pager,browser gh "+hometeach" "Switch to hometeach folder" macro index,pager,browser gs "+Sent" "Switch to Sent folder" macro index,pager,browser gS "+spam" "Switch to spam folder" -macro index,pager,browser gd "+dev" "Switch to DEV folder" -macro index,pager,browser gD "+DeltaChat" "Switch to DeltaChat folder" -macro index,pager,browser gt "+Trash" "Switch to Trash folder" +macro index,pager,browser gD "+dev" "Switch to DEV folder" +macro index,pager,browser gd "+DeltaChat" "Switch to DeltaChat folder" +macro index,pager,browser gt "+talk" "Switch to Trash folder" +macro index,pager,browser gT "+Trash" "Switch to Trash folder" macro index,pager,browser gl "+login" "Switch to login folder" macro index,pager,browser ga "+arch-general" "Switch to arch-general folder" macro index,pager,browser gk "+keep" "Switch to keep folder" -- cgit v1.2.3-70-g09d2