aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--X11/alacritty/alacritty.yml5
-rw-r--r--X11/openbox/rc.xml15
-rw-r--r--alias48
-rw-r--r--mutt/muttrc.topo1
4 files changed, 47 insertions, 22 deletions
diff --git a/X11/alacritty/alacritty.yml b/X11/alacritty/alacritty.yml
index caf0681..1005095 100644
--- a/X11/alacritty/alacritty.yml
+++ b/X11/alacritty/alacritty.yml
@@ -48,9 +48,8 @@ cursor:
48live_config_reload: true 48live_config_reload: true
49 49
50key_bindings: 50key_bindings:
51 - { key: W, mods: None, action: SemanticRight, mode: Vi } 51 - { key: W, mods: None, action: SemanticRight, mode: Vi|~Search }
52 - { key: B, mods: None, action: SemanticLeft, mode: Vi } 52 - { key: B, mods: None, action: SemanticLeft, mode: Vi|~Search }
53 - { key: 5, mods: Shift, action: Last, mode: Vi }
54 - { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } 53 - { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
55 - { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } 54 - { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
56 55
diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml
index 8ffab47..7406d17 100644
--- a/X11/openbox/rc.xml
+++ b/X11/openbox/rc.xml
@@ -268,9 +268,6 @@
268 <monitor>2</monitor> 268 <monitor>2</monitor>
269 </action> 269 </action>
270 </keybind> 270 </keybind>
271 <keybind key="W-F1">
272 <action name="ToggleAlwaysOnTop"/>
273 </keybind>
274 <!-- 271 <!--
275 <keybind key="W-h"> 272 <keybind key="W-h">
276 <action name="Unmaximize"/> 273 <action name="Unmaximize"/>
@@ -547,6 +544,13 @@
547 </command> 544 </command>
548 </action> 545 </action>
549 </keybind> 546 </keybind>
547 <keybind key="W-F1">
548 <action name="Execute">
549 <command>
550 alacritty -e nvim ~/log/inbox
551 </command>
552 </action>
553 </keybind>
550 <keybind key="W-S-e"> 554 <keybind key="W-S-e">
551 <action name="Execute"> 555 <action name="Execute">
552 <command> 556 <command>
@@ -620,6 +624,11 @@
620 </keybind> 624 </keybind>
621 <keybind key="W-a"> 625 <keybind key="W-a">
622 <action name="Execute"> 626 <action name="Execute">
627 <command>alacritty -e pulsemixer</command>
628 </action>
629 </keybind>
630 <keybind key="W-S-a">
631 <action name="Execute">
623 <command>ob-music</command> 632 <command>ob-music</command>
624 <backup> 633 <backup>
625 sh -c ' 634 sh -c '
diff --git a/alias b/alias
index fa5d0f3..bad58a2 100644
--- a/alias
+++ b/alias
@@ -1,6 +1,20 @@
1# My alias for bash and zsh 1# My alias for bash and zsh
2 2
3# config 3# __CONFIG__
4# __NETWORK__
5# __VIM__
6# __SSH__
7# __IMAP__
8# __GIST__
9# __UNIX__
10# __PACMAN__
11# __CD__
12# __BLOG__
13# __GIT__
14# __GITHUB__
15# __TIG__
16
17# __CONFIG__
4alias al="$EDITOR $SETTING_DIR/alias && source $SETTING_DIR/alias" 18alias al="$EDITOR $SETTING_DIR/alias && source $SETTING_DIR/alias"
5eval "${shell}rc(){ 19eval "${shell}rc(){
6 local RCFILE=$XDG_CONFIG_HOME/${shell}/.${shell}rc 20 local RCFILE=$XDG_CONFIG_HOME/${shell}/.${shell}rc
@@ -23,10 +37,10 @@ alias cdetc='cde'
23alias ls='ls --color' 37alias ls='ls --color'
24alias grep='grep --color' 38alias grep='grep --color'
25 39
26# network 40# __NETWORK__
27alias digg='dig +noall +answer +multiline' 41alias digg='dig +noall +answer +multiline'
28 42
29# vim 43# __VIM__
30alias v='nvim' 44alias v='nvim'
31alias vim='nvim' 45alias vim='nvim'
32alias vu='vim -u NONE' 46alias vu='vim -u NONE'
@@ -44,9 +58,10 @@ alias ve="vim ~/.config/nvim/nvim.lua"
44alias vq='vim ~/buffer' 58alias vq='vim ~/buffer'
45alias cdv='cd ~/.vim/vim-init' 59alias cdv='cd ~/.vim/vim-init'
46vs() { which $1 && vim $(which $1); } 60vs() { which $1 && vim $(which $1); }
61alias vS='vim -S ~/.vim.session'
47[ "$shell" = zsh ] && compdef vs=which 62[ "$shell" = zsh ] && compdef vs=which
48 63
49# ssh 64# __SSH__
50alias cdssh='cd ~/.ssh' 65alias cdssh='cd ~/.ssh'
51alias ptt='ssh ptt' 66alias ptt='ssh ptt'
52alias sshv='ssh -t vps' 67alias sshv='ssh -t vps'
@@ -77,14 +92,14 @@ ssh.down() {
77 ssh -t vps rm -rf -i ~/public/"$1" 92 ssh -t vps rm -rf -i ~/public/"$1"
78} 93}
79 94
80# imap 95# __IMAP__
81imap.save() { 96imap.save() {
82 curl "imaps://mail.topo.tw/$1" \ 97 curl "imaps://mail.topo.tw/$1" \
83 --user pham:`pass mail/pham@mail.topo.tw` \ 98 --user pham:`pass mail/pham@mail.topo.tw` \
84 -T $2 99 -T $2
85} 100}
86imap.save_attachment() { 101imap.save_attachment() {
87#TEMPFILE=$(mktemp) 102 #TEMPFILE=$(mktemp)
88 trap 'rm $TEMPFILE' EXIT 103 trap 'rm $TEMPFILE' EXIT
89 mail -a $1 -Sexpandaddr /dev/stdout | \ 104 mail -a $1 -Sexpandaddr /dev/stdout | \
90 curl imaps://mail.topo.tw/INBOX \ 105 curl imaps://mail.topo.tw/INBOX \
@@ -103,13 +118,13 @@ imap.fetch() {
103 sed -E '0,/^ *$/d' 118 sed -E '0,/^ *$/d'
104} 119}
105 120
106# Gist 121# __GIST__
107alias g='gist' 122alias g='gist'
108alias gl='gist last' 123alias gl='gist last'
109unalias gg &>/dev/null 124unalias gg &>/dev/null
110alias gg='gist grep' 125alias gg='gist grep'
111 126
112# unix 127# __UNIX__
113alias chx='chmod +x' 128alias chx='chmod +x'
114alias chr='chmod +r' 129alias chr='chmod +r'
115alias k='kill %1' 130alias k='kill %1'
@@ -192,7 +207,7 @@ gr() {
192} 207}
193alias findn='find . -iname' 208alias findn='find . -iname'
194 209
195# pacman 210# __PACMAN__
196alias pac='sudo pacman -S' # pacman install 211alias pac='sudo pacman -S' # pacman install
197alias psy='sudo pacman -Syy' 212alias psy='sudo pacman -Syy'
198alias ys='yay -S' 213alias ys='yay -S'
@@ -218,7 +233,7 @@ psi() {
218} 233}
219pkgbuild() { git clone https://aur.archlinux.org/$1.git; } 234pkgbuild() { git clone https://aur.archlinux.org/$1.git; }
220 235
221# cd to DIRs 236# __CD__
222alias ..='cd ..' 237alias ..='cd ..'
223alias ld='cd -' # last directory 238alias ld='cd -' # last directory
224cdg() { 239cdg() {
@@ -233,7 +248,7 @@ alias cdpu='cd ~/public'
233alias cdV='cd ~/Videos' 248alias cdV='cd ~/Videos'
234alias cdM='cd ~/Music' 249alias cdM='cd ~/Music'
235 250
236# blog 251# __BLOG__
237alias cdb='cd ~/blog' 252alias cdb='cd ~/blog'
238vp() { 253vp() {
239 [[ $HOST = vultr ]] || PREFIX='ssh -qt vps' 254 [[ $HOST = vultr ]] || PREFIX='ssh -qt vps'
@@ -261,7 +276,7 @@ vp() {
261 fi 276 fi
262} 277}
263 278
264# git 279# __GIT__
265unalias gc &> /dev/null # override zsh plugin alias 280unalias gc &> /dev/null # override zsh plugin alias
266gc() { git clone $1 && cd $(basename ${1%.git}); } 281gc() { git clone $1 && cd $(basename ${1%.git}); }
267gc1() { git clone --depth=1 $1 && cd $(basename $1); } 282gc1() { git clone --depth=1 $1 && cd $(basename $1); }
@@ -272,7 +287,7 @@ alias cdgw='cdgg && cd .github/workflows'
272alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule 287alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule
273alias ch="/home/pham/helper/bin/git/check-repos.sh" 288alias ch="/home/pham/helper/bin/git/check-repos.sh"
274 289
275# github 290# __GITHUB__
276export GITHUB_API='https://api.github.com' 291export GITHUB_API='https://api.github.com'
277export GITHUB_API_TOKEN="~/.ssh/tokens/github 2>/dev/null)" 292export GITHUB_API_TOKEN="~/.ssh/tokens/github 2>/dev/null)"
278alias hub="GITHUB_TOKEN=$GITHUB_API_TOKEN hub" 293alias hub="GITHUB_TOKEN=$GITHUB_API_TOKEN hub"
@@ -297,7 +312,7 @@ github.raw() {
297 curl -O https://raw.githubusercontent.com/$1/$2/$3 312 curl -O https://raw.githubusercontent.com/$1/$2/$3
298} 313}
299 314
300# tig 315# __TIG__
301alias cdt='cd ~/git/tig' 316alias cdt='cd ~/git/tig'
302alias t='tig' 317alias t='tig'
303alias ts='tig status' 318alias ts='tig status'
@@ -389,7 +404,8 @@ alias sample.osm='curl https://api.openstreetmap.org/api/0.6/node/3428095932'
389alias sample.poly='curl -O http://download.geofabrik.de/asia/taiwan.poly' 404alias sample.poly='curl -O http://download.geofabrik.de/asia/taiwan.poly'
390alias sample.gpkg='curl -O http://www.geopackage.org/data/sample1_1.gpkg' 405alias sample.gpkg='curl -O http://www.geopackage.org/data/sample1_1.gpkg'
391alias sample.mvt='curl -O https://demotiles.maplibre.org/tiles/5/25/14.pbf' 406alias sample.mvt='curl -O https://demotiles.maplibre.org/tiles/5/25/14.pbf'
392alias sample.lorem='curl -o lorem http://metaphorpsum.com/paragraphs/4/16' 407alias sample.lorem='curl http://metaphorpsum.com/paragraphs/4/16'
408alias lorem='curl http://metaphorpsum.com/paragraphs/4/16'
393alias sample.wmts='curl -O https://gis.sinica.edu.tw/tileserver/wmts' 409alias sample.wmts='curl -O https://gis.sinica.edu.tw/tileserver/wmts'
394sample.image() { curl -Lo random.png https://picsum.photos/seed/`date +%s`/${1:-500}/${2:-500}; } 410sample.image() { curl -Lo random.png https://picsum.photos/seed/`date +%s`/${1:-500}/${2:-500}; }
395alias proto.mvt='curl -O https://raw.githubusercontent.com/mapbox/vector-tile-spec/master/2.1/vector_tile.proto' 411alias proto.mvt='curl -O https://raw.githubusercontent.com/mapbox/vector-tile-spec/master/2.1/vector_tile.proto'
@@ -473,7 +489,7 @@ mvt.decode() {
473 else 489 else
474 tmp=$1 490 tmp=$1
475 fi 491 fi
476 mvt_decode.py $tmp | tr \' \" | sed 's/True/true/g' | jq . 492 mvt_decode.py $tmp | tr \' \" | sed 's/True/true/g; s/False/false/g'
477} 493}
478bak() { 494bak() {
479 cp $1 $1.bak 495 cp $1 $1.bak
diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo
index 99c8acd..c8d153d 100644
--- a/mutt/muttrc.topo
+++ b/mutt/muttrc.topo
@@ -52,6 +52,7 @@ mailboxes -label '📭 [i]' +INBOX \
52 -label '🗑 [t]' -poll +Trash \ 52 -label '🗑 [t]' -poll +Trash \
53 +login \ 53 +login \
54 +update \ 54 +update \
55 +service \
55 +Drafts \ 56 +Drafts \
56 +test \ 57 +test \
57 +spam 58 +spam