From a6fc18a1a41088258b4acd0217c892ab911e2bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 25 Oct 2020 19:26:25 +0100 Subject: Symlink mails and remaining home dotfiles --- .inputrc | 1 - .mbsyncrc | 140 ------------------------------------------------ .notmuch-config | 102 ----------------------------------- config/rofi/config.rasi | 7 +++ dot-guile | 3 ++ dot-inputrc | 1 + install.scm | 25 +++++---- mail/dot-mbsyncrc | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ mail/dot-notmuch-config | 102 +++++++++++++++++++++++++++++++++++ rofi/config.rasi | 7 --- 10 files changed, 269 insertions(+), 259 deletions(-) delete mode 100644 .inputrc delete mode 100644 .mbsyncrc delete mode 100644 .notmuch-config create mode 100644 config/rofi/config.rasi create mode 100644 dot-guile create mode 100644 dot-inputrc create mode 100644 mail/dot-mbsyncrc create mode 100644 mail/dot-notmuch-config delete mode 100644 rofi/config.rasi diff --git a/.inputrc b/.inputrc deleted file mode 100644 index 5a53eaf..0000000 --- a/.inputrc +++ /dev/null @@ -1 +0,0 @@ -set show-all-if-ambiguous on diff --git a/.mbsyncrc b/.mbsyncrc deleted file mode 100644 index 3e3e7d6..0000000 --- a/.mbsyncrc +++ /dev/null @@ -1,140 +0,0 @@ -############################################################################### -# GMAIL - -IMAPAccount gmail -# Address to connect to -Host imap.gmail.com -User najera.oscar@gmail.com -PassCmd "pass show google/googlemail.com/najera.oscar" -AuthMechs LOGIN -# Use SSL -SSLType IMAPS -# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section. -CertificateFile /etc/ssl/certs/ca-certificates.crt -#CertificateFile ~/.cert/imap.gmail.com.pem -#CertificateFile ~/.cert/Equifax_Secure_CA.pem - -IMAPStore gmail-remote -Account gmail - -MaildirStore gmail-local -# The trailing "/" is important -Path ~/.mail/gmail/ -Inbox ~/.mail/gmail/Inbox -SubFolders Legacy - -Channel gmail -Master :gmail-remote: -Slave :gmail-local: -# Exclude everything under the internal [Gmail] folder, except the interesting folders -Patterns * ![Gmail]* "[Gmail]/Sent Mail" -# Or include everything -#Patterns * -# Automatically create missing mailboxes, both locally and on the server -Create Both -# Save the synchronization state files in the relevant directory -SyncState * -Expunge Both - -############################################################################### -# Personal -IMAPAccount hi_pers -Host git.oscarnajera.com -User hi@oscarnajera.com -PassCmd "pass show Correos/mail.oscarnajera.com" -AuthMechs LOGIN -SSLType IMAPS - -IMAPStore hi_pers-remote -Account hi_pers - -MaildirStore hi_pers-local -Path ~/.mail/hi_pers/ -Inbox ~/.mail/hi_pers/Inbox -SubFolders Verbatim - -Channel hi_pers -Master :hi_pers-remote: -Slave :hi_pers-local: -Patterns * -Create Both -SyncState * -Expunge Both - -############################################################################### -# AMZbooks -IMAPAccount kindle -Host git.oscarnajera.com -User kindle@oscarnajera.com -PassCmd "pass show Correos/kindle@oscarnajera.com" -AuthMechs LOGIN -SSLType IMAPS - -IMAPStore kindle-remote -Account kindle - -MaildirStore kindle-local -Path ~/.mail/kindle/ -Inbox ~/.mail/kindle/Inbox -SubFolders Verbatim - -Channel kindle -Master :kindle-remote: -Slave :kindle-local: -Patterns * -Create Both -SyncState * -Expunge Both - -############################################################################### -# Startup -IMAPAccount delightfuldying -Host git.oscarnajera.com -User oscar.najera@delightfuldying.com -PassCmd "pass show WebSites/delightfuldying.com/mailbox/julie" -AuthMechs LOGIN -SSLType IMAPS - -IMAPStore dd-remote -Account delightfuldying - -MaildirStore dd-local -Path ~/.mail/dd/ -Inbox ~/.mail/dd/Inbox -SubFolders Verbatim - -Channel delightfuldying -Master :dd-remote: -Slave :dd-local: -Patterns * -Create Both -SyncState * -Expunge Both - -############################################################################### -# Startup -IMAPAccount fallforward -Host git.oscarnajera.com -User sarah@fallforward.space -PassCmd "pass show WebSites/fallforward.space/mailbox/sarah" -AuthMechs LOGIN -SSLType IMAPS - -IMAPStore ff-remote -Account fallforward - -MaildirStore ff-local -Path ~/.mail/ff/ -Inbox ~/.mail/ff/Inbox -SubFolders Verbatim - -Channel fallforward -Master :ff-remote: -Slave :ff-local: -Patterns * -Create Both -SyncState * -Expunge Both -# Local Variables: -# mode: conf-unix -# End: diff --git a/.notmuch-config b/.notmuch-config deleted file mode 100644 index e74011c..0000000 --- a/.notmuch-config +++ /dev/null @@ -1,102 +0,0 @@ -# -*- mode: conf-unix -*- -# .notmuch-config - Configuration file for the notmuch mail system -# -# For more information about notmuch, see https://notmuchmail.org - -# Database configuration -# -# The only value supported here is 'path' which should be the top-level -# directory where your mail currently exists and to where mail will be -# delivered in the future. Files should be individual email messages. -# Notmuch will store its database within a sub-directory of the path -# configured here named ".notmuch". -# -[database] -path=.mail - -# User configuration -# -# Here is where you can let notmuch know how you would like to be -# addressed. Valid settings are -# -# name Your full name. -# primary_email Your primary email address. -# other_email A list (separated by ';') of other email addresses -# at which you receive email. -# -# Notmuch will use the various email addresses configured here when -# formatting replies. It will avoid including your own addresses in the -# recipient list of replies, and will set the From address based on the -# address to which the original email was addressed. -# -[user] -name=Oscar Najera -primary_email=hi@oscarnajera.com -other_email=hello@oscarnajera.com;najera.oscar@gmail.com;oscar.najera-ocampo@u-psud.fr;on@mathias-kettner.de - -# Configuration for "notmuch new" -# -# The following options are supported here: -# -# tags A list (separated by ';') of the tags that will be -# added to all messages incorporated by "notmuch new". -# -# ignore A list (separated by ';') of file and directory names -# that will not be searched for messages by "notmuch new". -# -# NOTE: *Every* file/directory that goes by one of those -# names will be ignored, independent of its depth/location -# in the mail store. -# -[new] -#tags=unread;inbox; -tags=new; -ignore=.uidvalidity;.mbsyncstate;.directory - -# Search configuration -# -# The following option is supported here: -# -# exclude_tags -# A ;-separated list of tags that will be excluded from -# search results by default. Using an excluded tag in a -# query will override that exclusion. -# -[search] -exclude_tags=deleted;spam; - -# Maildir compatibility configuration -# -# The following option is supported here: -# -# synchronize_flags Valid values are true and false. -# -# If true, then the following maildir flags (in message filenames) -# will be synchronized with the corresponding notmuch tags: -# -# Flag Tag -# ---- ------- -# D draft -# F flagged -# P passed -# R replied -# S unread (added when 'S' flag is not present) -# -# The "notmuch new" command will notice flag changes in filenames -# and update tags, while the "notmuch tag" and "notmuch restore" -# commands will notice tag changes and update flags in filenames -# -[maildir] -synchronize_flags=true - -# Cryptography related configuration -# -# The following *deprecated* option is currently supported: -# -# gpg_path -# binary name or full path to invoke gpg. -# NOTE: In a future build, this option will be ignored. -# Setting $PATH is a better approach. -# -[crypto] -gpg_path=gpg diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi new file mode 100644 index 0000000..6f5608e --- /dev/null +++ b/config/rofi/config.rasi @@ -0,0 +1,7 @@ +configuration { + modi: "window,run,combi"; + show-icons: true; + terminal: "termite"; + combi-modi: "window,run"; +} +@import "/usr/share/rofi/themes/fancy.rasi" diff --git a/dot-guile b/dot-guile new file mode 100644 index 0000000..766ac36 --- /dev/null +++ b/dot-guile @@ -0,0 +1,3 @@ +(use-modules (ice-9 readline)) +(activate-readline) +(add-to-load-path "/home/titan/dev/helpful_scripts/guile/") diff --git a/dot-inputrc b/dot-inputrc new file mode 100644 index 0000000..5a53eaf --- /dev/null +++ b/dot-inputrc @@ -0,0 +1 @@ +set show-all-if-ambiguous on diff --git a/install.scm b/install.scm index 57afda3..5346740 100755 --- a/install.scm +++ b/install.scm @@ -1,15 +1,17 @@ #!/usr/bin/guile \ -e main -s !# -(use-modules (ice-9 popen) - (ice-9 ftw) - (ice-9 match) - (ice-9 and-let-star) - (logging logger) - (logging port-log) - (oop goops) - (term ansi-color)) +(use-modules + (ice-9 and-let-star) + (ice-9 ftw) + (ice-9 match) + (ice-9 popen) + (ice-9 regex) + (logging logger) + (logging port-log) + (oop goops) + (term ansi-color)) (define (ansi-color-log-formatter lvl time str) (let ((color (cond ((eq? lvl 'CRITICAL) 'RED) @@ -86,9 +88,12 @@ (list 0) path)) +(define (replace str pattern new) + (regexp-substitute/global #f pattern str 'pre new 'post)) + (define (config-links src target dry-run) (let ((src-path (expand-file src)) - (target-path (expand-file target))) + (target-path (replace (expand-file target) "dot-" "."))) (unless (and (symlink? target-path) (equal? (readlink target-path) src-path)) (clean-file target-path dry-run) (symlink src-path target-path) @@ -158,8 +163,10 @@ (git-config) (config-links "dot-guile" "~/.guile" #f) (config-links "dot-zshrc" "~/.zshrc" #f) + (config-links "dot-inputrc" "~/.inputrc" #f) (config-links "gnupu/gpg-agent.conf" "~/.gnupg/gpg-agent" #f) (symlink-tree "bin" "~/.local/bin") (symlink-tree "config" "~/.config") + (symlink-tree "mail" "~/") (shutdown-logging)) diff --git a/mail/dot-mbsyncrc b/mail/dot-mbsyncrc new file mode 100644 index 0000000..3e3e7d6 --- /dev/null +++ b/mail/dot-mbsyncrc @@ -0,0 +1,140 @@ +############################################################################### +# GMAIL + +IMAPAccount gmail +# Address to connect to +Host imap.gmail.com +User najera.oscar@gmail.com +PassCmd "pass show google/googlemail.com/najera.oscar" +AuthMechs LOGIN +# Use SSL +SSLType IMAPS +# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section. +CertificateFile /etc/ssl/certs/ca-certificates.crt +#CertificateFile ~/.cert/imap.gmail.com.pem +#CertificateFile ~/.cert/Equifax_Secure_CA.pem + +IMAPStore gmail-remote +Account gmail + +MaildirStore gmail-local +# The trailing "/" is important +Path ~/.mail/gmail/ +Inbox ~/.mail/gmail/Inbox +SubFolders Legacy + +Channel gmail +Master :gmail-remote: +Slave :gmail-local: +# Exclude everything under the internal [Gmail] folder, except the interesting folders +Patterns * ![Gmail]* "[Gmail]/Sent Mail" +# Or include everything +#Patterns * +# Automatically create missing mailboxes, both locally and on the server +Create Both +# Save the synchronization state files in the relevant directory +SyncState * +Expunge Both + +############################################################################### +# Personal +IMAPAccount hi_pers +Host git.oscarnajera.com +User hi@oscarnajera.com +PassCmd "pass show Correos/mail.oscarnajera.com" +AuthMechs LOGIN +SSLType IMAPS + +IMAPStore hi_pers-remote +Account hi_pers + +MaildirStore hi_pers-local +Path ~/.mail/hi_pers/ +Inbox ~/.mail/hi_pers/Inbox +SubFolders Verbatim + +Channel hi_pers +Master :hi_pers-remote: +Slave :hi_pers-local: +Patterns * +Create Both +SyncState * +Expunge Both + +############################################################################### +# AMZbooks +IMAPAccount kindle +Host git.oscarnajera.com +User kindle@oscarnajera.com +PassCmd "pass show Correos/kindle@oscarnajera.com" +AuthMechs LOGIN +SSLType IMAPS + +IMAPStore kindle-remote +Account kindle + +MaildirStore kindle-local +Path ~/.mail/kindle/ +Inbox ~/.mail/kindle/Inbox +SubFolders Verbatim + +Channel kindle +Master :kindle-remote: +Slave :kindle-local: +Patterns * +Create Both +SyncState * +Expunge Both + +############################################################################### +# Startup +IMAPAccount delightfuldying +Host git.oscarnajera.com +User oscar.najera@delightfuldying.com +PassCmd "pass show WebSites/delightfuldying.com/mailbox/julie" +AuthMechs LOGIN +SSLType IMAPS + +IMAPStore dd-remote +Account delightfuldying + +MaildirStore dd-local +Path ~/.mail/dd/ +Inbox ~/.mail/dd/Inbox +SubFolders Verbatim + +Channel delightfuldying +Master :dd-remote: +Slave :dd-local: +Patterns * +Create Both +SyncState * +Expunge Both + +############################################################################### +# Startup +IMAPAccount fallforward +Host git.oscarnajera.com +User sarah@fallforward.space +PassCmd "pass show WebSites/fallforward.space/mailbox/sarah" +AuthMechs LOGIN +SSLType IMAPS + +IMAPStore ff-remote +Account fallforward + +MaildirStore ff-local +Path ~/.mail/ff/ +Inbox ~/.mail/ff/Inbox +SubFolders Verbatim + +Channel fallforward +Master :ff-remote: +Slave :ff-local: +Patterns * +Create Both +SyncState * +Expunge Both +# Local Variables: +# mode: conf-unix +# End: diff --git a/mail/dot-notmuch-config b/mail/dot-notmuch-config new file mode 100644 index 0000000..e74011c --- /dev/null +++ b/mail/dot-notmuch-config @@ -0,0 +1,102 @@ +# -*- mode: conf-unix -*- +# .notmuch-config - Configuration file for the notmuch mail system +# +# For more information about notmuch, see https://notmuchmail.org + +# Database configuration +# +# The only value supported here is 'path' which should be the top-level +# directory where your mail currently exists and to where mail will be +# delivered in the future. Files should be individual email messages. +# Notmuch will store its database within a sub-directory of the path +# configured here named ".notmuch". +# +[database] +path=.mail + +# User configuration +# +# Here is where you can let notmuch know how you would like to be +# addressed. Valid settings are +# +# name Your full name. +# primary_email Your primary email address. +# other_email A list (separated by ';') of other email addresses +# at which you receive email. +# +# Notmuch will use the various email addresses configured here when +# formatting replies. It will avoid including your own addresses in the +# recipient list of replies, and will set the From address based on the +# address to which the original email was addressed. +# +[user] +name=Oscar Najera +primary_email=hi@oscarnajera.com +other_email=hello@oscarnajera.com;najera.oscar@gmail.com;oscar.najera-ocampo@u-psud.fr;on@mathias-kettner.de + +# Configuration for "notmuch new" +# +# The following options are supported here: +# +# tags A list (separated by ';') of the tags that will be +# added to all messages incorporated by "notmuch new". +# +# ignore A list (separated by ';') of file and directory names +# that will not be searched for messages by "notmuch new". +# +# NOTE: *Every* file/directory that goes by one of those +# names will be ignored, independent of its depth/location +# in the mail store. +# +[new] +#tags=unread;inbox; +tags=new; +ignore=.uidvalidity;.mbsyncstate;.directory + +# Search configuration +# +# The following option is supported here: +# +# exclude_tags +# A ;-separated list of tags that will be excluded from +# search results by default. Using an excluded tag in a +# query will override that exclusion. +# +[search] +exclude_tags=deleted;spam; + +# Maildir compatibility configuration +# +# The following option is supported here: +# +# synchronize_flags Valid values are true and false. +# +# If true, then the following maildir flags (in message filenames) +# will be synchronized with the corresponding notmuch tags: +# +# Flag Tag +# ---- ------- +# D draft +# F flagged +# P passed +# R replied +# S unread (added when 'S' flag is not present) +# +# The "notmuch new" command will notice flag changes in filenames +# and update tags, while the "notmuch tag" and "notmuch restore" +# commands will notice tag changes and update flags in filenames +# +[maildir] +synchronize_flags=true + +# Cryptography related configuration +# +# The following *deprecated* option is currently supported: +# +# gpg_path +# binary name or full path to invoke gpg. +# NOTE: In a future build, this option will be ignored. +# Setting $PATH is a better approach. +# +[crypto] +gpg_path=gpg diff --git a/rofi/config.rasi b/rofi/config.rasi deleted file mode 100644 index 6f5608e..0000000 --- a/rofi/config.rasi +++ /dev/null @@ -1,7 +0,0 @@ -configuration { - modi: "window,run,combi"; - show-icons: true; - terminal: "termite"; - combi-modi: "window,run"; -} -@import "/usr/share/rofi/themes/fancy.rasi" -- cgit v1.2.3