瀏覽代碼

Make mbsync updates less frequent

master
Immanuel Onyeka 2 年之前
父節點
當前提交
a8faf11513
共有 3 個檔案被更改,包括 25 行新增3 行删除
  1. +11
    -1
      configure
  2. +12
    -2
      dwm-statusbar
  3. +2
    -0
      prompt

+ 11
- 1
configure 查看文件

@@ -56,9 +56,17 @@ rtorrent() {
cp $CONFIGS/.rtorrentrc
}

xsession() {
cp $CONFIGS/.xsession ~/
}

installs() {
ls
}

# Used to configure a new system or reset things for an existing one.
all() {
ls
vim; neomutt; mbsync; bash; rtorrent; xsession
}

case $1 in
@@ -70,5 +78,7 @@ case $1 in
neomutt) neomutt;;
bash) bash;;
mbsync) mbsync;;
xsession) xsession;;
all) all;;
*) printf "Invalid argument\n";;
esac

+ 12
- 2
dwm-statusbar 查看文件

@@ -5,8 +5,17 @@ speaker_low=🔈
speaker_medium=🔉
speaker_high=🔊
brightness_symbol=🔅

DELAY=1m
# Statusbar loop

while true; do
mbsync -a
sleep $DELAY
done &

while true; do
mail
volume=$(amixer sget Master | awk -F"[][]" 'END{ print $2 }')
volume_amount=$(printf $volume | tr -d %)
if [ $volume_amount = 0 ]; then
@@ -19,6 +28,7 @@ while true; do
volume_symbol=$speaker_high
fi

xsetroot -name "$volume_symbol$volume | $(date +"%c")"
sleep 1m # Update time every minute
xsetroot -name "📧Messages $(find ~/Mail -path '*/INBOX/new' -type f | wc -l) |
$volume_symbol$volume | $(date +"%c")"
sleep $DELAY
done

+ 2
- 0
prompt 查看文件

@@ -44,6 +44,7 @@ launch() {
Browser
Hidden browser
Email
Contacts
Page
Go page
Package info
@@ -79,6 +80,7 @@ launch() {
Browser) $browser_cmd;;
'Hidden browser') $browser_cmd --incognito;;
Email) st -t 'Email' -e sh -lc neomutt;;
Contacts) st -t 'Contacts' -e sh -lc abook;;
Images) view_images;;
'Play clipboard') mpv "$(xclip -o -selection clipboard)";;
'Play downloads') mpv "$HOME/Downloads/tmp/$(ls ~/Downloads/tmp/ |


Loading…
取消
儲存