diff options
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | tools/init/sync.sh | 10 |
2 files changed, 12 insertions, 5 deletions
@@ -77,10 +77,11 @@ openbox: | |||
77 | ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ | 77 | ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ |
78 | 78 | ||
79 | xkb: | 79 | xkb: |
80 | sudo cat >/etc/profile.d/xkb.sh <<EOF | 80 | #sudo cat >/etc/profile.d/xkb.sh <<EOF |
81 | #! /bin/env bash | 81 | ##! /bin/env bash |
82 | #setxkbmap -option ctrl:nocaps 2>/dev/null | ||
83 | #EOF | ||
82 | setxkbmap -option ctrl:nocaps 2>/dev/null | 84 | setxkbmap -option ctrl:nocaps 2>/dev/null |
83 | EOF | ||
84 | 85 | ||
85 | urlview: | 86 | urlview: |
86 | ln -sf `pwd`/misc/urlview ~/.urlview | 87 | ln -sf `pwd`/misc/urlview ~/.urlview |
diff --git a/tools/init/sync.sh b/tools/init/sync.sh index 15663f0..6dd57ba 100755 --- a/tools/init/sync.sh +++ b/tools/init/sync.sh | |||
@@ -1,12 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | # If git is working in other process, then don't sync again | 3 | # If git is working in other process, then don't sync again |
4 | ! pidof git && exit 0 | 4 | pidof git >/dev/null && exit 0 |
5 | 5 | ||
6 | # my repo | 6 | # my repo |
7 | sync() { | 7 | sync() { |
8 | { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null | 8 | { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null |
9 | git pull --quiet || echo in `pwd` >/dev/tty | 9 | git pull --quiet || echo Has trouble when syncing `pwd` >/dev/tty |
10 | } | 10 | } |
11 | sync $SETTING_DIR & | 11 | sync $SETTING_DIR & |
12 | sync ~/blog & | 12 | sync ~/blog & |
@@ -15,6 +15,12 @@ sync ~/.task & | |||
15 | sync ~/.password-store & | 15 | sync ~/.password-store & |
16 | sync ~/.vim_runtime & | 16 | sync ~/.vim_runtime & |
17 | 17 | ||
18 | while [ $(jobs -r | wc -l) -gt 0 ]; do | ||
19 | sleep 1; | ||
20 | done | ||
21 | |||
22 | notify-send 'Repos synced' | ||
23 | |||
18 | # others repo | 24 | # others repo |
19 | #check_upstream ~/git/tig || echo in `pwd` >/dev/tty & | 25 | #check_upstream ~/git/tig || echo in `pwd` >/dev/tty & |
20 | 26 | ||