aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2018-11-04 22:56:53 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2018-11-04 22:56:53 +0100
commitc5e40bfd2f24b26fb0ac8f6a60c3b3a810cc8f9b (patch)
tree1bff0726bf2645fd125153fe12a195043bc0d01b
parentd2e0a1f0fec8ad03a083b20ad010fd13d781d1e8 (diff)
downloaddotfiles-c5e40bfd2f24b26fb0ac8f6a60c3b3a810cc8f9b.tar.xz
astroid: Add configs
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--astroid/config140
-rwxr-xr-xastroid/hooks/toggle-email-learn-spam11
-rwxr-xr-xastroid/hooks/toggle-thread-learn-spam11
-rw-r--r--astroid/keybindings2
4 files changed, 164 insertions, 0 deletions
diff --git a/astroid/config b/astroid/config
new file mode 100644
index 0000000..f8b455a
--- /dev/null
+++ b/astroid/config
@@ -0,0 +1,140 @@
+{
+ "astroid": {
+ "config": {
+ "version": "11"
+ },
+ "notmuch_config": "\/home\/kyrias\/.config/notmuch-config",
+ "debug": {
+ "dryrun_sending": "false"
+ },
+ "hints": {
+ "level": "0"
+ },
+ "log": {
+ "syslog": "false",
+ "stdout": "true",
+ "level": "debug"
+ }
+ },
+ "accounts": {
+ "theos": {
+ "name": "Johannes Löthberg",
+ "email": "johannes@kyriasis.com",
+ "gpgkey": "0x50FB9B273A9D0BB5",
+ "always_gpg_sign": "true",
+ "sendmail": "msmtp --account=theos -t",
+ "default": "true",
+ "save_sent_to": "~/mail/sent/cur",
+ "save_drafts_to": "~/mail/drafts",
+ "signature_file": "~/.config/mail-sig",
+ "signature_default_on": "true"
+ },
+ "archlinux": {
+ "name": "Johannes Löthberg",
+ "email": "demize@archlinux.org",
+ "gpgkey": "0x50FB9B273A9D0BB5",
+ "always_gpg_sign": "true",
+ "sendmail": "msmtp --account=archlinux -t",
+ "save_sent_to": "~/mail/archlinux/Sent/cur",
+ "save_drafts_to": "~/mail/archlinux/Drafts",
+ "signature_file": "~/.config/mail-sig",
+ "signature_default_on": "true"
+ }
+ },
+ "startup": {
+ "queries": {
+ "inbox": "tag:inbox"
+ }
+ },
+ "terminal": {
+ "height": "10",
+ "font_description": "default"
+ },
+ "thread_index": {
+ "page_jump_rows": "6",
+ "sort_order": "newest",
+ "cell": {
+ "font_description": "default",
+ "line_spacing": "2",
+ "date_length": "10",
+ "message_count_length": "4",
+ "authors_length": "20",
+ "subject_color": "#807d74",
+ "subject_color_selected": "#000000",
+ "background_color_selected": "",
+ "background_color_marked": "#fff584",
+ "background_color_marked_selected": "#bcb559",
+ "tags_length": "80",
+ "tags_upper_color": "#e5e5e5",
+ "tags_lower_color": "#333333",
+ "tags_alpha": "0.5",
+ "hidden_tags": "attachment,flagged,unread"
+ }
+ },
+ "general": {
+ "time": {
+ "clock_format": "24h",
+ "same_year": "%b %-e",
+ "diff_year": "%x"
+ }
+ },
+ "editor": {
+ "cmd": "termite -e \"nvim -c 'set ft=mail' '%1'\"",
+ "external_editor": "true",
+ "charset": "utf-8",
+ "save_draft_on_force_quit": "true",
+ "attachment_words": "attach",
+ "attachment_directory": "~"
+ },
+ "mail": {
+ "reply": {
+ "quote_line": "Excerpts from %1's message of %2:",
+ "mailinglist_reply_to_sender": "true"
+ },
+ "forward": {
+ "quote_line": "Forwarding %1's message of %2:",
+ "disposition": "inline"
+ },
+ "sent_tags": "sent",
+ "message_id_fqdn": "",
+ "message_id_user": "",
+ "user_agent": "default",
+ "send_delay": "2",
+ "close_on_success": "false",
+ "format_flowed": "false"
+ },
+ "poll": {
+ "interval": "60",
+ "always_full_refresh": "false"
+ },
+ "attachment": {
+ "external_open_cmd": "xdg-open"
+ },
+ "thread_view": {
+ "open_html_part_external": "false",
+ "preferred_type": "plain",
+ "preferred_html_only": "false",
+ "allow_remote_when_encrypted": "false",
+ "open_external_link": "xdg-open",
+ "default_save_directory": "~",
+ "indent_messages": "false",
+ "gravatar": {
+ "enable": "false"
+ },
+ "mark_unread_delay": "0.5",
+ "expand_flagged": "true"
+ },
+ "crypto": {
+ "gpg": {
+ "path": "gpg2",
+ "always_trust": "false",
+ "enabled": "true"
+ }
+ },
+ "saved_searches": {
+ "show_on_startup": "false",
+ "save_history": "true",
+ "history_lines_to_show": "15",
+ "history_lines": "1000"
+ }
+}
diff --git a/astroid/hooks/toggle-email-learn-spam b/astroid/hooks/toggle-email-learn-spam
new file mode 100755
index 0000000..ae8d9d9
--- /dev/null
+++ b/astroid/hooks/toggle-email-learn-spam
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+#
+# $1 Message ID to toggle tag on
+
+if [[ "$(notmuch search id:$1 and tag:learn-spam)" ]]; then
+ printf "unsetting tag learn-spam from message %s\n" "$1"
+ notmuch tag -learn-spam +inbox id:"$1"
+else
+ printf "setting tag learn-spam from message %s\n" "$1"
+ notmuch tag +learn-spam -inbox id:"$1"
+fi
diff --git a/astroid/hooks/toggle-thread-learn-spam b/astroid/hooks/toggle-thread-learn-spam
new file mode 100755
index 0000000..d40708a
--- /dev/null
+++ b/astroid/hooks/toggle-thread-learn-spam
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+#
+# $1 Thread ID to toggle tag on
+
+if [[ "$(notmuch search thread:$1 and tag:learn-spam)" ]]; then
+ printf "unsetting tag learn-spam from thread %s\n" "$1"
+ notmuch tag -learn-spam +inbox thread:"$1"
+else
+ printf "setting tag learn-spam%s from thread %s\n" "$1"
+ notmuch tag +learn-spam -inbox thread:"$1"
+fi
diff --git a/astroid/keybindings b/astroid/keybindings
new file mode 100644
index 0000000..d2a9ad5
--- /dev/null
+++ b/astroid/keybindings
@@ -0,0 +1,2 @@
+thread_index.run(hooks::toggle-thread-learn-spam %1, hooks::toggle-thread-learn-spam %1)=S
+thread_view.run(hooks::toggle-email-learn-spam %2, hooks::toggle-email-learn-spam %2)=S