diff options
author | Karel Kočí <cynerd@email.cz> | 2016-08-23 22:46:36 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-08-23 23:01:22 +0200 |
commit | 936e17a9d819a6f55bec09eafd1beec523dcaa64 (patch) | |
tree | 8dc4bafcd7453879924fb89cbe06ba6d63fdb700 | |
parent | b5fdc60edacabf99dff16f04ff2c7618f2233977 (diff) | |
download | myconfigs-936e17a9d819a6f55bec09eafd1beec523dcaa64.tar.gz myconfigs-936e17a9d819a6f55bec09eafd1beec523dcaa64.tar.bz2 myconfigs-936e17a9d819a6f55bec09eafd1beec523dcaa64.zip |
Add newmail-notify and some other small tweaks
-rw-r--r-- | Xresources | 2 | ||||
-rw-r--r-- | bashrc | 2 | ||||
-rw-r--r-- | config/i3/config | 4 | ||||
-rw-r--r-- | config/i3blocks/config | 6 | ||||
-rwxr-xr-x | config/offlineimap/config | 1 | ||||
-rw-r--r-- | config/systemd/user/syncemail.service | 2 | ||||
-rw-r--r-- | gitconfig | 7 | ||||
-rwxr-xr-x | local/bin/system-backup | 1 | ||||
-rwxr-xr-x | local/sbin/newmail-notify | 22 | ||||
-rw-r--r-- | lynxrc | 1 | ||||
-rw-r--r-- | mutt/mailcap | 3 | ||||
-rw-r--r-- | mutt/muttemail | 4 | ||||
-rw-r--r-- | mutt/muttrc | 10 | ||||
-rw-r--r-- | urlview | 2 |
14 files changed, 55 insertions, 12 deletions
@@ -1,4 +1,4 @@ -Xcursor.size: 9 +Xcursor.size: 8 ! XTerm ## XTerm*metaSendsEscape: true XTerm*locale: true @@ -42,7 +42,7 @@ PS1='$( if [ `id -u` -eq "0" ]; then echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] " else - if ls .annoyme/*.pid 2>/dev/null >/dev/null; then + if ls ~/.annoyme/*.pid 2>/dev/null >/dev/null; then ANNOYME_PS="\[\e[1;31m\]!\[\e[0m\]" fi echo -n "$ANNOYME_PS\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] " diff --git a/config/i3/config b/config/i3/config index 4ea7ac5..e8211e0 100644 --- a/config/i3/config +++ b/config/i3/config @@ -30,7 +30,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec urxvt -bindsym $mod+Shift+Return exec pidgin & conkeror +bindsym $mod+Shift+Return exec conkeror & pidgin # kill focused window bindsym $mod+q kill @@ -133,7 +133,7 @@ bindsym $mod+Shift+0 move container to workspace 10 bindsym $mod+Shift+grave move container to workspace web bindsym $mod+Shift+underscore move container to workspace t -assign [class="Firefox"] web +#assign [class="Firefox"] web for_window [class="Pidgin"] move scratchpad # reload the configuration file diff --git a/config/i3blocks/config b/config/i3blocks/config index ed64ff9..75fffba 100644 --- a/config/i3blocks/config +++ b/config/i3blocks/config @@ -151,9 +151,9 @@ command=~/.config/i3blocks/scripts/battery #instance=1 interval=30 -#[email] -#command=~/.config/i3blocks/scripts/email -#interval=30 +[email] +command=~/.config/i3blocks/scripts/email +interval=30 # Date Time # diff --git a/config/offlineimap/config b/config/offlineimap/config index babde8f..acc62c0 100755 --- a/config/offlineimap/config +++ b/config/offlineimap/config @@ -20,4 +20,5 @@ remoterepository = email-remote status_backend = sqlite autorefresh = 5 quick = 5 +postsynchook = ~/.local/sbin/newmail-notify diff --git a/config/systemd/user/syncemail.service b/config/systemd/user/syncemail.service index a44f383..1940f46 100644 --- a/config/systemd/user/syncemail.service +++ b/config/systemd/user/syncemail.service @@ -7,4 +7,4 @@ KillSignal=SIGUSR2 Restart=always [Install] -WantedBy=multi-user.target +WantedBy=default.target @@ -1,6 +1,7 @@ [user] name = Karel Kočí email = cynerd@email.cz + signingkey = A6BC8B8CEB31659B [push] default = simple [core] @@ -8,4 +9,8 @@ [commit] gpgsign = true [merge] - tool = vimdiff + tool = vimdiff +[pull] + ff = only +[commit] + gpgSign = true diff --git a/local/bin/system-backup b/local/bin/system-backup index 18b85bc..06929c1 100755 --- a/local/bin/system-backup +++ b/local/bin/system-backup @@ -25,6 +25,7 @@ if [ -z "$PART" ]; then exit -1 fi MPATH=$(lsblk -lp | grep "$PART" | awk '{print$7}') +# TODO check if this is not in backupped path if [ -n "$MPATH" ]; then echo Disk already mounted to $MPATH. Continuing with that. else diff --git a/local/sbin/newmail-notify b/local/sbin/newmail-notify new file mode 100755 index 0000000..65655b4 --- /dev/null +++ b/local/sbin/newmail-notify @@ -0,0 +1,22 @@ +#!/bin/bash + +cd ~/.mail + +if [ -f notify-notified ]; then + NOTIFIED=`cat notify-notified` + rm notify-notified +fi + +for account in `ls`; do + if cd "$account"/INBOX/new; then + for m in `ls`; do + echo $m + echo $m >> ~/.mail/notify-notified + if echo "$NOTIFIED" | grep "$m" >/dev/null; then continue; fi + FROM=`grep -E "^From: " "$m" | sed 's/^From: //'` + SUBJECT=`grep -E "^Subject: " "$m" | sed 's/^Subject: //'` + notify-send "Email: $account" "$FROM: $SUBJECT" + done + fi + cd ~/.mail +done @@ -0,0 +1 @@ +character_set=UNICODE (UTF-8) diff --git a/mutt/mailcap b/mutt/mailcap index 79e7716..86f7d73 100644 --- a/mutt/mailcap +++ b/mutt/mailcap @@ -9,3 +9,6 @@ text/html; w3m -v -F -T text/html "%s"; nametemplate=%s.html; needsterminal ##auto_view will use the entry with the copiousoutput part: text/html; lynx -stdin -dump -force_html ; copiousoutput +image/*; feh %s +application/pdf; okular %s + diff --git a/mutt/muttemail b/mutt/muttemail index fd71aa1..9218af2 100644 --- a/mutt/muttemail +++ b/mutt/muttemail @@ -2,7 +2,7 @@ color status green default set folder = "~/.mail/email" set spoolfile = "+INBOX" -set record = "+sent" +set copy = no +#set record = "+sent" set postponed = "+drafts" set from = "cynerd@email.cz" -set sendmail="/usr/bin/msmtp -a email" diff --git a/mutt/muttrc b/mutt/muttrc index d20f08d..ef59a5a 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -8,6 +8,7 @@ set sort=reverse-threads set sort_aux=last-date-received set mailcap_path = "~/.mutt/mailcap" set sleep_time = 0 +set delete = yes auto_view text/html alternative_order text/enriched text/plain text/html @@ -28,6 +29,15 @@ bind index,pager \CP sidebar-prev bind index,pager \CN sidebar-next bind index,pager \CO sidebar-open +bind pager j next-line +bind pager k previous-line +bind attach,index,pager \CD next-page +bind attach,index,pager \CU previous-page +bind pager g top +bind pager G bottom +bind attach,index g first-entry +bind attach,index G last-entry + macro index <F3> ':source ~/.mutt/muttemail<enter>c~/.mail/email/INBOX<enter>' source ~/.mutt/color @@ -1 +1 @@ -COMMAND xdg-open "%s" & +COMMAND xdg-open %s & |