From 152ecc894dd24cac6934a10f26f0fcce8445c2ea Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 30 Nov 2024 20:41:31 +0800 Subject: Update --- alias | 14 ++++++---- mutt/muttrc.topo | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- profile | 4 +-- zsh/zshrc | 2 +- 4 files changed, 90 insertions(+), 9 deletions(-) diff --git a/alias b/alias index e421156..a117258 100644 --- a/alias +++ b/alias @@ -44,17 +44,21 @@ alias etc.passwd='sudo vim /etc/passwd' alias s='sudo systemctl' alias j='sudo journalctl -xeu' alias jf='sudo journalctl -xfeu' +alias fb.conf='sudo vim /etc/fail2ban/jail.d/jail.local' +alias fb='sudo fail2ban-client' # }}} # Nginx{{{ -alias vgx='sudo vim /etc/nginx/sites-enabled/vps && sudo nginx -t && sudo systemctl reload nginx' -alias ng.conf='sudo vim /etc/nginx/nginx.conf' -alias ng.log='tail -f /var/log/nginx/access.log' +alias vgx='sudo vim /etc/nginx/sites-enabled/vps -c "autocmd BufWritePost * !nginx -t && sudo systemctl reload nginx"' +alias ng.conf='sudo vim /etc/nginx/nginx.conf -c "autocmd BufWritePost * !nginx -t && sudo systemctl reload nginx"' +alias ng.log='setterm --linewrap off; tail -n 200 -f /var/log/nginx/access.log; setterm --linewrap on' alias cdngx='cd /etc/nginx' # }}} # Web {{{ +alias cdsrv='cd /srv' alias www.git='/srv/git/create.sh' alias www='make -f ~/site/www/Makefile' +alias www.conf='vim ~/site/www/scripts/build.sh' alias cdwww='cd ~/site/www' alias cds='cd ~/site' vp() { @@ -198,7 +202,7 @@ alias gpg.bye='gpg-connect-agent reloadagent /bye' alias gpg.config="$EDITOR ~/.gnupg/gpg-agent.conf" # }}} # MAIL {{{ -alias smtp.conf='sudo vim /etc/smtpd/smtpd.conf' +alias smtp.conf='sudo vim /etc/smtpd/smtpd.conf -c "autocmd BufWritePost * !sudo smtpd -n && systemctl restart smtpd.service"' alias mail.pass='sudo vim /etc/mail/passwd' alias smtp.queue='sudo smtpctl show queue' alias smtp.show='sudo smtpctl show' @@ -563,7 +567,7 @@ alias clocg='cloc --vcs=git' trash() { mv $@ ~/.local/share/Trash; } alias ge='graph-easy --boxart' alias ffmpeg='ffmpeg -hide_banner' -alias npm='pnpm' +#alias npm='pnpm' fix() { which $1 && grep -Po 'FIXME.*' $(which $1); } alias monitor.light='ddcutil --permit-unknown-feature setvcp 10' # }}} diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo index fc0a0a6..c737cb7 100644 --- a/mutt/muttrc.topo +++ b/mutt/muttrc.topo @@ -1,5 +1,82 @@ source ~/.config/mutt/default # IMAP/SMTP settings -#set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user" +set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user" set folder = "/home/pham/Maildir" +set smtp_url = "smtp://$my_user:25" + +# Identify meself +#set from = "pham@topo.tw" +#set realname = "謝晉凡 Hsieh Chin Fan" +#set signature = "~/.config/mutt/.signature" +#set pgp_use_gpg_agent = yes +#set crypt_use_gpgme = yes +#set pgp_timeout = 300 +#set pgp_sign_as = 6DD8C14A # replace 6DD8C14A with your gpg key id +#set autocrypt = yes + +# For contacts +set display_filter = ~/.config/mutt/message_filter.sh +source ~/.config/mutt/alias.topo +source ~/.config/mutt/hooks.topo + +## Basic Mailbox +#set spoolfile = "+INBOX" +#set mbox= "+mbox" +#set move = yes +#set record = "+INBOX" +#set trash = "+Trash" +#set postponed = "+Drafts" +#set mask="!(INBOX|mbox|dev|Sent|Trash|Drafts|DeltaChat|civildef|hometeach|osm|STOCK|pay|keep|login|update|test|spam)" +# +## Sidebar +#mailboxes -label '📭 [i]' +INBOX \ +# -label '📥 [m]' +mbox \ +# -label '👀 [d]' +dev \ +# -label '💬 [D]' +DeltaChat \ +# +github \ +# +JOB \ +# +promotion \ +# "+---- Watch -----" \ +# -label CivilDEF +civildef \ +# +hometeach \ +# -label OSM +osm \ +# +STOCK \ +# -label '📢 [f]' +feedback \ +# "+-- Permanent ---" \ +# -label '💲 [p]' +pay \ +# -label '🍺 [k]' +keep \ +# -label '📤 [s]' +Sent \ +# -label '🗑 [t]' -poll +Trash \ +# +login \ +# +update \ +# +service \ +# +Drafts \ +# +test \ +# +spam +# +## Keybinding +#macro index,pager 'source ~/.config/mutt/muttrc.topo!' +#macro index,pager 'source ~/.config/mutt/muttrc.gmail!' +#macro index,pager 'source ~/.config/mutt/muttrc.b97602041!' +# +## Hooks for accounts +##folder-hook imaps://imap.gmail.com/ 'source ~/.config/mutt/muttrc.gmail' +##folder-hook ~/Maildir 'source ~/.config/mutt/muttrc.b97602041' +# +## Change mailboxes +#macro index,pager,browser gi "+INBOX" "Switch to INBOX folder" +#macro index,pager,browser gm "+mbox" "Switch to mbox folder" +#macro index,pager,browser gp "+pay" "Switch to pay folder" +#macro index,pager,browser gP "+promotion" "Switch to promotion folder" +#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 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" +#macro index,pager,browser gu "+update" "Switch to update folder" +#macro index,pager,browser gf "+feedback" "Switch to feedback folder" diff --git a/profile b/profile index 3a48e0c..fe1745b 100644 --- a/profile +++ b/profile @@ -1,5 +1,6 @@ # trap 'exit.sh' EXIT +export PATH=~/.local/bin:$PATH export SETTING_DIR=${SETTING_DIR:=$HOME/helper} export TERM=xterm-256color export XDG_CONFIG_HOME=~/.config @@ -60,7 +61,6 @@ fi # Working DIR # [[ `pwd` == $HOME ]] && test -d ~/Downloads && cd ~/Downloads -cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads -source ~/.profile 2>/dev/null +#cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads true diff --git a/zsh/zshrc b/zsh/zshrc index 3780340..2d2b005 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -159,4 +159,4 @@ case ":$PATH:" in esac # pnpm end -source $SETTING_DIR/profile +source ~/.profile -- cgit v1.2.3-70-g09d2