aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--X11/openbox/rc.xml2
-rw-r--r--alias2
-rw-r--r--mutt/muttrc.topo6
-rw-r--r--profile13
-rw-r--r--vim/vimrc2
-rw-r--r--zsh/zshrc25
6 files changed, 27 insertions, 23 deletions
diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml
index 0d044fe..ffc6c67 100644
--- a/X11/openbox/rc.xml
+++ b/X11/openbox/rc.xml
@@ -651,7 +651,7 @@
651 sh -c ' 651 sh -c '
652 xdotool search --name "@Mutt" windowactivate || \ 652 xdotool search --name "@Mutt" windowactivate || \
653 alacritty --title @Mutt \ 653 alacritty --title @Mutt \
654 --working-directory=/home/pham/Downloads \ 654 --working-directory ~/Downloads \
655 -e mutt 655 -e mutt
656 ' 656 '
657 </command> 657 </command>
diff --git a/alias b/alias
index 66efcc2..7e87c88 100644
--- a/alias
+++ b/alias
@@ -414,7 +414,7 @@ cdg() {
414alias cdgg='cd $(git rev-parse --show-toplevel)' 414alias cdgg='cd $(git rev-parse --show-toplevel)'
415alias cdgw='cdgg && cd .github/workflows' 415alias cdgw='cdgg && cd .github/workflows'
416alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule 416alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule
417alias ch="/home/pham/helper/bin/git/check-repos.sh" 417ch() { list=~/helper/bin/git/check-repos.sh; test -f $list && $list; }
418alias git.check="/home/pham/helper/bin/git/check-repos.sh" 418alias git.check="/home/pham/helper/bin/git/check-repos.sh"
419alias cgit{.,''}rc='sudo vim /etc/cgitrc' 419alias cgit{.,''}rc='sudo vim /etc/cgitrc'
420 420
diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo
index cdc31a8..f3e81bf 100644
--- a/mutt/muttrc.topo
+++ b/mutt/muttrc.topo
@@ -1,4 +1,10 @@
1# Identify meself 1# Identify meself
2set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user"
3set folder = "imaps://$my_user:993"
4set imap_pass = `pass mail/$my_user`
5set smtp_url = "smtp://$my_user:587"
6set smtp_pass = `pass mail/$my_user`
7
2set from = "pham@topo.tw" 8set from = "pham@topo.tw"
3set realname = "謝晉凡 Hsieh Chin Fan" 9set realname = "謝晉凡 Hsieh Chin Fan"
4set signature = "~/.config/mutt/.signature" 10set signature = "~/.config/mutt/.signature"
diff --git a/profile b/profile
index 3af0b9c..03b8f9b 100644
--- a/profile
+++ b/profile
@@ -16,6 +16,19 @@ export VISUAL=$EDITOR
16export TIG_EDITOR=$EDITOR 16export TIG_EDITOR=$EDITOR
17export GIT_EDITOR=$EDITOR 17export GIT_EDITOR=$EDITOR
18 18
19# IM for GUI
20export LANG="zh-CN.UTF-8"
21export LC_ALL="en_US.UTF-8"
22# fcitx
23export GTK_IM_MODULE="fcitx"
24export QT_IM_MODULE="fcitx"
25export XMODIFIERS="@im=fcitx"
26export INPUT_METHOD="fcitx"
27export XIM="fcitx"
28export XIM_PROGRAM="fcitx"
29export SDL_IM_MODULE="fcitx"
30export GLFW_IM_MODULE="ibus"
31
19# Get current shell 32# Get current shell
20shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]') 33shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]')
21export shell=${shell##*/} 34export shell=${shell##*/}
diff --git a/vim/vimrc b/vim/vimrc
index 7e283d4..5628184 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -7,7 +7,7 @@ endif
7 7
8" Get current dir 8" Get current dir
9" let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') 9" let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')
10let s:home = '/home/pham/helper/vim' 10let s:home = '~/helper/vim'
11 11
12" Add current dir into runtimepath 12" Add current dir into runtimepath
13execute 'set runtimepath+='.s:home 13execute 'set runtimepath+='.s:home
diff --git a/zsh/zshrc b/zsh/zshrc
index 17c6018..7380d8e 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -36,18 +36,6 @@ _comp_options+=(globdots) # With hidden files
36zstyle ':completion:*' menu select 36zstyle ':completion:*' menu select
37zstyle ':completion::complete:*' gain-privileges 1 37zstyle ':completion::complete:*' gain-privileges 1
38 38
39function _already_sync_after_wakeup() {
40 WAKEUP="$HOME/.wakeup"
41 [ ! -e "$WAKEUP" ] && return 0
42
43 latest=$(date -d @`stat -c %X "$WAKEUP"` +%s)
44 # If sync time is older than wakeup time (timestamp in file), then return false
45 if [ $latest -gt "$(cat $WAKEUP)" ]; then
46 return 0
47 else
48 return 1
49 fi
50}
51 39
52autoload -Uz add-zsh-hook 40autoload -Uz add-zsh-hook
53autoload -Uz parameter 41autoload -Uz parameter
@@ -64,13 +52,6 @@ function precmd() {
64 fi 52 fi
65 PROMPT="%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b${jobstring} " 53 PROMPT="%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b${jobstring} "
66 54
67 # RIGHT PROMPT
68 # Show context and git status of tracking repos at right
69 UNSYNC_REPOS=$(NUM=$($SETTING_DIR/bin/git/check-repos.sh -n); (( $NUM != 0 )) && echo $NUM)
70 NEED_SYNC=$(_already_sync_after_wakeup || echo S)
71 RPROMPT="%B%K{blue}%F{yellow}${CONTEXT:+ $CONTEXT }%f%k%K{red}%F{black}${UNSYNC_REPOS}${NEED_SYNC}%f%k%b"
72
73
74 [ -n "$PRE_POPULATE" ] && print -z "$PRE_POPULATE" 55 [ -n "$PRE_POPULATE" ] && print -z "$PRE_POPULATE"
75} 56}
76 57
@@ -147,4 +128,8 @@ case ":$PATH:" in
147esac 128esac
148# pnpm end 129# pnpm end
149 130
150source ~/.profile 131source ~/.profile 2>/dev/null
132
133# Makefile
134zstyle ':completion:*:make:*:targets' call-command true
135zstyle ':completion:*:*:make:*' tag-order 'targets' 2>/dev/null