From d70f1b36c06989b5bd81da4bec9f7c772c993575 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 5 Jan 2015 17:33:59 +0100 Subject: [PATCH] sup - initial commit --- config/herbstluftwm/autostart | 10 +++----- sup/config.yaml | 43 +++++++++++++++++++++++++++++++++++ sup/hooks/after-poll.rb | 6 +++++ sup/hooks/before-poll.rb | 4 ++++ sup/hooks/goto.rb | 1 + sup/sources.yaml | 34 +++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 sup/config.yaml create mode 100644 sup/hooks/after-poll.rb create mode 100644 sup/hooks/before-poll.rb create mode 100644 sup/hooks/goto.rb create mode 100644 sup/sources.yaml diff --git a/config/herbstluftwm/autostart b/config/herbstluftwm/autostart index 55a2caa..b991e04 100755 --- a/config/herbstluftwm/autostart +++ b/config/herbstluftwm/autostart @@ -23,7 +23,7 @@ Mod=Mod4 # Use the super key as the main modifier # herbstluft control hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r reload -hc keybind $Mod-Shift-c close +hc keybind $Mod-q close # application spawning hc keybind $Mod-Return spawn urxvtc @@ -33,6 +33,7 @@ hc keybind Scroll_Lock spawn dmenu_run hc keybind $Mod-b spawn urxvtc -name ranger -e ranger hc keybind $Mod-Control-c spawn urxvtc -name weechat -e weechat hc keybind $Mod-Control-n spawn urxvtc -name newsbeuter -e newsbeuter +hc keybind $Mod-Control-m spawn urxvtc -name sup -e sup hc keybind XF86AudioMute spawn sound_control.sh toggle hc keybind XF86AudioRaiseVolume spawn sound_control.sh up hc keybind XF86AudioLowerVolume spawn sound_control.sh down @@ -200,14 +201,9 @@ hc rule instance="pinentry-gtk-2" pseudotile=on hc rule instance="Mail" tag=mail hc rule title="weechat" tag=chat hc rule title="newsbeuter" tag=news +hc rule title="sup" tag=mail # }}} -# Weechat {{{ -# }}} Weechat - -# newsbeuter {{{ -# }}} newsbeuter - # }}} Application Specific # unlock, just to be sure diff --git a/sup/config.yaml b/sup/config.yaml new file mode 100644 index 0000000..1296fb8 --- /dev/null +++ b/sup/config.yaml @@ -0,0 +1,43 @@ +--- +:editor: vim +:thread_by_subject: false +:edit_signature: false +:ask_for_from: false +:ask_for_to: true +:ask_for_cc: true +:ask_for_bcc: false +:ask_for_subject: true +:account_selector: true +:confirm_no_attachments: true +:confirm_top_posting: true +:jump_to_open_message: true +:discard_snippets_from_encrypted_messages: false +:load_more_threads_when_scrolling: true +:default_attachment_save_dir: '/home/felix/Temporary/' +:sent_source: sup://sent +:archive_sent: true +:poll_interval: 300 +:wrap_width: 0 +:slip_rows: 0 +:col_jump: 2 +:stem_language: english +:sync_back_to_maildir: true +:continuous_scroll: false +:always_edit_async: false +:accounts: + :default: + :name: Felix Van der Jeugt + :email: felix.vanderjeugt@gmail.com + :alternates: + - felix.vanderjeugt@12urenloop.be + :sendmail: "/usr/bin/msmtp --account=gmail -t --read-envelope-from" + :signature: "/home/felix/.signature" + :gpgkey: '' + :ugent: + :name: Felix Van der Jeugt + :email: felix.vanderjeugt@ugent.be + :sendmail: "/usr/bin/msmtp --account=ugent -t --read-envelope-from" + :signature: "/home/felix/.signature" + :gpgkey: '' + :alternates: [] +:time_mode: 24h diff --git a/sup/hooks/after-poll.rb b/sup/hooks/after-poll.rb new file mode 100644 index 0000000..5fa40de --- /dev/null +++ b/sup/hooks/after-poll.rb @@ -0,0 +1,6 @@ + +if num_inbox > 0 + system "notify-send", \ + "#{num_inbox_total_unread} unread messages (#{num_inbox} new)", \ + from_and_subj_inbox.map {|p| "#{p[0]} - #{p[1]}"}.join("\n") +end diff --git a/sup/hooks/before-poll.rb b/sup/hooks/before-poll.rb new file mode 100644 index 0000000..16e76da --- /dev/null +++ b/sup/hooks/before-poll.rb @@ -0,0 +1,4 @@ +say "Running mbsync..." +if not system "mbsync", "-a", "-qq" + say "mbsync unsuccesful." +end diff --git a/sup/hooks/goto.rb b/sup/hooks/goto.rb new file mode 100644 index 0000000..cd58747 --- /dev/null +++ b/sup/hooks/goto.rb @@ -0,0 +1 @@ +system "xdg-open #{uri} > /dev/null" diff --git a/sup/sources.yaml b/sup/sources.yaml new file mode 100644 index 0000000..744baad --- /dev/null +++ b/sup/sources.yaml @@ -0,0 +1,34 @@ +--- +- !supmua.org,2006-10-01/Redwood/Maildir + uri: maildir:/home/felix/Mail/gmail/Inbox + usual: true + archived: false + sync_back: true + id: 1 + labels: + - GMail +- !supmua.org,2006-10-01/Redwood/Maildir + uri: maildir:/home/felix/Mail/ugent/Inbox + usual: true + archived: false + sync_back: true + id: 3 + labels: + - UGent +- !supmua.org,2006-10-01/Redwood/Maildir + uri: maildir:/home/felix/Mail/gmail/Sent + usual: true + archived: true + sync_back: true + id: 2 + labels: + - GMail +- !supmua.org,2006-10-01/Redwood/Maildir + uri: maildir:/home/felix/Mail/ugent/Sent + usual: true + archived: true + sync_back: true + id: 4 + labels: + - UGent +- !supmua.org,2006-10-01/Redwood/SentLoader {}