aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias14
-rw-r--r--mutt/muttrc.topo79
-rw-r--r--profile4
-rw-r--r--zsh/zshrc2
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'
44alias s='sudo systemctl' 44alias s='sudo systemctl'
45alias j='sudo journalctl -xeu' 45alias j='sudo journalctl -xeu'
46alias jf='sudo journalctl -xfeu' 46alias jf='sudo journalctl -xfeu'
47alias fb.conf='sudo vim /etc/fail2ban/jail.d/jail.local'
48alias fb='sudo fail2ban-client'
47 49
48# }}} 50# }}}
49# Nginx{{{ 51# Nginx{{{
50alias vgx='sudo vim /etc/nginx/sites-enabled/vps && sudo nginx -t && sudo systemctl reload nginx' 52alias vgx='sudo vim /etc/nginx/sites-enabled/vps -c "autocmd BufWritePost * !nginx -t && sudo systemctl reload nginx"'
51alias ng.conf='sudo vim /etc/nginx/nginx.conf' 53alias ng.conf='sudo vim /etc/nginx/nginx.conf -c "autocmd BufWritePost * !nginx -t && sudo systemctl reload nginx"'
52alias ng.log='tail -f /var/log/nginx/access.log' 54alias ng.log='setterm --linewrap off; tail -n 200 -f /var/log/nginx/access.log; setterm --linewrap on'
53alias cdngx='cd /etc/nginx' 55alias cdngx='cd /etc/nginx'
54# }}} 56# }}}
55# Web {{{ 57# Web {{{
58alias cdsrv='cd /srv'
56alias www.git='/srv/git/create.sh' 59alias www.git='/srv/git/create.sh'
57alias www='make -f ~/site/www/Makefile' 60alias www='make -f ~/site/www/Makefile'
61alias www.conf='vim ~/site/www/scripts/build.sh'
58alias cdwww='cd ~/site/www' 62alias cdwww='cd ~/site/www'
59alias cds='cd ~/site' 63alias cds='cd ~/site'
60vp() { 64vp() {
@@ -198,7 +202,7 @@ alias gpg.bye='gpg-connect-agent reloadagent /bye'
198alias gpg.config="$EDITOR ~/.gnupg/gpg-agent.conf" 202alias gpg.config="$EDITOR ~/.gnupg/gpg-agent.conf"
199# }}} 203# }}}
200# MAIL {{{ 204# MAIL {{{
201alias smtp.conf='sudo vim /etc/smtpd/smtpd.conf' 205alias smtp.conf='sudo vim /etc/smtpd/smtpd.conf -c "autocmd BufWritePost * !sudo smtpd -n && systemctl restart smtpd.service"'
202alias mail.pass='sudo vim /etc/mail/passwd' 206alias mail.pass='sudo vim /etc/mail/passwd'
203alias smtp.queue='sudo smtpctl show queue' 207alias smtp.queue='sudo smtpctl show queue'
204alias smtp.show='sudo smtpctl show' 208alias smtp.show='sudo smtpctl show'
@@ -563,7 +567,7 @@ alias clocg='cloc --vcs=git'
563trash() { mv $@ ~/.local/share/Trash; } 567trash() { mv $@ ~/.local/share/Trash; }
564alias ge='graph-easy --boxart' 568alias ge='graph-easy --boxart'
565alias ffmpeg='ffmpeg -hide_banner' 569alias ffmpeg='ffmpeg -hide_banner'
566alias npm='pnpm' 570#alias npm='pnpm'
567fix() { which $1 && grep -Po 'FIXME.*' $(which $1); } 571fix() { which $1 && grep -Po 'FIXME.*' $(which $1); }
568alias monitor.light='ddcutil --permit-unknown-feature setvcp 10' 572alias monitor.light='ddcutil --permit-unknown-feature setvcp 10'
569# }}} 573# }}}
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 @@
1source ~/.config/mutt/default 1source ~/.config/mutt/default
2 2
3# IMAP/SMTP settings 3# IMAP/SMTP settings
4#set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user" 4set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user"
5set folder = "/home/pham/Maildir" 5set folder = "/home/pham/Maildir"
6set smtp_url = "smtp://$my_user:25"
7
8# Identify meself
9#set from = "pham@topo.tw"
10#set realname = "謝晉凡 Hsieh Chin Fan"
11#set signature = "~/.config/mutt/.signature"
12#set pgp_use_gpg_agent = yes
13#set crypt_use_gpgme = yes
14#set pgp_timeout = 300
15#set pgp_sign_as = 6DD8C14A # replace 6DD8C14A with your gpg key id
16#set autocrypt = yes
17
18# For contacts
19set display_filter = ~/.config/mutt/message_filter.sh
20source ~/.config/mutt/alias.topo
21source ~/.config/mutt/hooks.topo
22
23## Basic Mailbox
24#set spoolfile = "+INBOX"
25#set mbox= "+mbox"
26#set move = yes
27#set record = "+INBOX"
28#set trash = "+Trash"
29#set postponed = "+Drafts"
30#set mask="!(INBOX|mbox|dev|Sent|Trash|Drafts|DeltaChat|civildef|hometeach|osm|STOCK|pay|keep|login|update|test|spam)"
31#
32## Sidebar
33#mailboxes -label '📭 [i]' +INBOX \
34# -label '📥 [m]' +mbox \
35# -label '👀 [d]' +dev \
36# -label '💬 [D]' +DeltaChat \
37# +github \
38# +JOB \
39# +promotion \
40# "+---- Watch -----" \
41# -label CivilDEF +civildef \
42# +hometeach \
43# -label OSM +osm \
44# +STOCK \
45# -label '📢 [f]' +feedback \
46# "+-- Permanent ---" \
47# -label '💲 [p]' +pay \
48# -label '🍺 [k]' +keep \
49# -label '📤 [s]' +Sent \
50# -label '🗑 [t]' -poll +Trash \
51# +login \
52# +update \
53# +service \
54# +Drafts \
55# +test \
56# +spam
57#
58## Keybinding
59#macro index,pager <f4> '<sync-mailbox><enter-command>source ~/.config/mutt/muttrc.topo<enter><change-folder>!<enter>'
60#macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/mutt/muttrc.gmail<enter><change-folder>!<enter>'
61#macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/mutt/muttrc.b97602041<enter><change-folder>!<enter>'
62#
63## Hooks for accounts
64##folder-hook imaps://imap.gmail.com/ 'source ~/.config/mutt/muttrc.gmail'
65##folder-hook ~/Maildir 'source ~/.config/mutt/muttrc.b97602041'
66#
67## Change mailboxes
68#macro index,pager,browser gi "<change-folder>+INBOX<Return>" "Switch to INBOX folder"
69#macro index,pager,browser gm "<change-folder>+mbox<Return>" "Switch to mbox folder"
70#macro index,pager,browser gp "<change-folder>+pay<Return>" "Switch to pay folder"
71#macro index,pager,browser gP "<change-folder>+promotion<Return>" "Switch to promotion folder"
72#macro index,pager,browser gh "<change-folder>+hometeach<Return>" "Switch to hometeach folder"
73#macro index,pager,browser gs "<change-folder>+Sent<Return>" "Switch to Sent folder"
74#macro index,pager,browser gS "<change-folder>+spam<Return>" "Switch to spam folder"
75#macro index,pager,browser gd "<change-folder>+dev<Return>" "Switch to DEV folder"
76#macro index,pager,browser gD "<change-folder>+DeltaChat<Return>" "Switch to DeltaChat folder"
77#macro index,pager,browser gt "<change-folder>+Trash<Return>" "Switch to Trash folder"
78#macro index,pager,browser gl "<change-folder>+login<Return>" "Switch to login folder"
79#macro index,pager,browser ga "<change-folder>+arch-general<Return>" "Switch to arch-general folder"
80#macro index,pager,browser gk "<change-folder>+keep<Return>" "Switch to keep folder"
81#macro index,pager,browser gu "<change-folder>+update<Return>" "Switch to update folder"
82#macro index,pager,browser gf "<change-folder>+feedback<Return>" "Switch to feedback folder"
diff --git a/profile b/profile
index 3a48e0c..fe1745b 100644
--- a/profile
+++ b/profile
@@ -1,5 +1,6 @@
1# trap 'exit.sh' EXIT 1# trap 'exit.sh' EXIT
2 2
3export PATH=~/.local/bin:$PATH
3export SETTING_DIR=${SETTING_DIR:=$HOME/helper} 4export SETTING_DIR=${SETTING_DIR:=$HOME/helper}
4export TERM=xterm-256color 5export TERM=xterm-256color
5export XDG_CONFIG_HOME=~/.config 6export XDG_CONFIG_HOME=~/.config
@@ -60,7 +61,6 @@ fi
60 61
61# Working DIR 62# Working DIR
62# [[ `pwd` == $HOME ]] && test -d ~/Downloads && cd ~/Downloads 63# [[ `pwd` == $HOME ]] && test -d ~/Downloads && cd ~/Downloads
63cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads 64#cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads
64source ~/.profile 2>/dev/null
65 65
66true 66true
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
159esac 159esac
160# pnpm end 160# pnpm end
161 161
162source $SETTING_DIR/profile 162source ~/.profile