Преглед на файлове

Merge pull request #21 from drmtmych/master

Add account name to sidebar head.
tags/v3.1
Luke Smith преди 6 години
committed by GitHub
родител
ревизия
2c05667dee
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 2 файла, в които са добавени 12 реда и са изтрити 1 реда
  1. +11
    -0
      mutt-wizard.sh
  2. +1
    -1
      muttrc

+ 11
- 0
mutt-wizard.sh Целия файл

@@ -36,9 +36,20 @@ formatShortcut() { \
echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"Go to $2.\"" >> "$muttdir"accounts/$3.muttrc
done ;}

gen_delim() { \
delim="="
for i in `seq $(( $1 - 1 ))`
do
delim="$delim-"
done
echo $delim ;}

detectMailboxes() { \
find ~/.mail/$1 -maxdepth 1 -mindepth 1 -type d | sed -e "s/.*\///g;s/^/=/g" > /tmp/$1_boxes
sidebar_width=$(sed -n -e '/^set sidebar_width/p' "$muttdir"/muttrc | awk -F'=' '{print $2}')
delim=$(gen_delim $sidebar_width)
oneline=$(cat /tmp/$1_boxes | tr "\n" " ")
oneline="=$1 $delim $oneline"
sed -i "/^mailboxes\|^set spoolfile\|^set record\|^set postponed/d" "$muttdir"accounts/$1.muttrc
echo mailboxes $oneline >> "$muttdir"accounts/$1.muttrc
sed -i "/^macro index,pager g/d" "$muttdir"accounts/$1.muttrc


+ 1
- 1
muttrc Целия файл

@@ -43,7 +43,7 @@ set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open


Зареждане…
Отказ
Запис