diff --git a/.asoudrc b/.asoudrc index 3d265408..36c4c044 100644 --- a/.asoudrc +++ b/.asoudrc @@ -1,13 +1,18 @@ -pcm.softvol { - type softvol - slave.pcm "cards.pcm.default" - control { - name "Software" - card 0 - } - max_db 20.0 -} pcm.!default { - type plug - slave.pcm "softvol" + type plug + slave.pcm "softvol" +} + +pcm.softvol { + type softvol + slave { + pcm "dmix" + } + control { + name "Pre-Amp" + card 0 + } + min_dB -5.0 + max_dB 26.0 + resolution 6 } diff --git a/.config/Scripts/check.sh b/.config/Scripts/check.sh new file mode 100755 index 00000000..9dcb8876 --- /dev/null +++ b/.config/Scripts/check.sh @@ -0,0 +1,8 @@ +#!/bin/bash +notification="i3 exec mpv ~/.config/Scripts/ding.opus" + +cd $(dirname $0) +while read entry + do + [ "$(ls -A $entry)" ] && echo "New mail found in $entry." && exec $notification && notmuch new || echo "No new mail found in $entry." + done < inboxes diff --git a/.config/Scripts/inboxes b/.config/Scripts/inboxes new file mode 100644 index 00000000..166acb3d --- /dev/null +++ b/.config/Scripts/inboxes @@ -0,0 +1,2 @@ +/home/USERNAME/.Mail/Gmail/INBOX/new/ +/home/USERNAME/.Mail/Personal/INBOX/new/ diff --git a/.config/Scripts/mailsyncloop.sh b/.config/Scripts/mailsyncloop.sh index 206461df..8d77a353 100755 --- a/.config/Scripts/mailsyncloop.sh +++ b/.config/Scripts/mailsyncloop.sh @@ -1,10 +1,15 @@ #!/bin/bash -offlineimap -o +cd $(dirname $0) +inboxes=$(cat inboxes) + +bash ~/.config/Scripts/check.sh while : do if [ -f $(pgrep offlineimap) ]; then offlineimap -o echo "OfflineIMAP sync complete." + bash check.sh + notmuch new else echo "OfflineIMAP already running." fi diff --git a/.config/mutt/email.md b/.config/mutt/email.md new file mode 100644 index 00000000..a7504fdc --- /dev/null +++ b/.config/mutt/email.md @@ -0,0 +1,40 @@ +# Luke's mutt/OfflineIMAP/msmtp/notmuch setup + +## My email setup gives you the following: + ++ A clean, fast and vim-like terminal interface to send and read email (mutt) ++ OfflineIMAP, which takes keep a copy of all of your mail offline, allowing you to read and ++ notmuch as an email indexer, which allows you to easily search email by content within mutt. ++ A looping script which continually uses OfflineIMAP to check mail, and if there is new mail, it will both notify you with a ding and then tell notmuch to quickly index the new mail for searching. + +All of these features are well synced together and require just a little setup. + +To use my email setup, be sure to have `neomutt`, `offlineimap`, `msmtp` `notmuch` and `notmuch-mutt` installed. + +Note that the notification sound will work on i3 by default. You can edit the notification command that runs in `.config/Scripts/check.sh`. + +## How to set it up. + +To use this setup, you have to add your email settings where required. + +There are several steps after which everything should work nicely. + ++ **First**, open `.offlineimaprc` and add your email account and server info (details are in that file. ++ To index your mail for quick searching, run `notmuch setup` and give your mail directory (`~/.Mail` by default in my configs) ++ Then you can go ahead and start syncing your email by running `offlineimap -o`. This will download your mail from all the accounts you use to `~/.Mail`. + + If you want to use my autosync loop script, make sure to check `.config/Scripts/inboxes` to ensure that your inboxes are there. ++ Next, add your email account info to `.msmtprc`. ++ And the same to `.config/mutt/personalrc` or `.config/mutt/gmailrc` or your own rc file. + + (mutt will try to load the `gmailrc` by default. You can change this in `.config/mutt/muttrc`.) + +## Updating + +As I said before, I have a loop script in `.config/Scripts/mailsyncloop.sh` which will run OfflineIMAPs every few minutes and will play a notification sound and run notmuch if new mail is found. + +I suggest running this scipt in a tty or tmux session, so you can check up on it if you really want. That's what I do. + +## Enjoy your email! + +If you're using my i3 config, you can run mutt with `mutt`. Explore the `muttrc` to see my bindings and add your own. + +If you're not using my i3 config, you may want to move `muttrc` to `~/.muttrc`, because I keep my `muttrc` in the `.config` directory to different reasons, but it will look only in `~` by default. diff --git a/.config/mutt/luke_mutt_readme.md b/.config/mutt/luke_mutt_readme.md deleted file mode 100644 index b805ca7b..00000000 --- a/.config/mutt/luke_mutt_readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# Luke's mutt readme - -mutt is a terminal email program. - -## Using my configs - -Move the muttrc file to ~/.muttrc to activate it by default. - -Make an rc file for your own email address. If you have a Gmail account, for example, modify the "gmailrc" file to your address. Make sure muttrc is sourcing the file you want. - -You should also have Neomutt installed for full compatibility. - -## Macros and shortcuts - -I've made some changes to the bindings to make mutt a little more vim-like. See them in muttrc for yourself. - -I've also employed gotbletu's shortcuts for changing accounts and moving from Inbox to Sent to Drafts etc. - -Note that the commands for movement to different boxes are in the individual email configs. This is because the folder structure of each account may differ. When mutt loads another email account, it also loades the new shortcuts. You may need to make changes for your email account. - -## Colors and themes - -My muttrc has my particular formats for email headers and date. - -You have a lot of freedom in how you can configure how mutt works. Here, I have a file "muttcol" which is originally someone else's theme (can't remember where I got it), but I've also made color changes in the muttrc. - -My config is made for Neomutt, which allows email headers to have different colors for different information. If you're not running Neomutt, you'll get errors when using my configs. To remove these errors delete the following lines from the muttrc: - -color index_author red default '.*' -color index_number blue default -color index_subject cyan default '.s' -color index_size green default - -## Aliases - -You can use aliases to avoid having to type out email addresses over and over. For example, if you have the following: - -alias luke luke@lukesmith.xyz - -whenever you type in "luke" as a recipient, it will automatically direct that you my email. You can also have aliases for groups of people, separated by a comma. - -alias best_friends billy@gmail.com, sally@gmail.com, amanda@gmail.com, chad@gmail.com - -so whenever you type in "best_friends," mutt will direct the mail to all four of these email addresses. - -## Passwords - -If you don't want mutt to ask for your password when logging on, set imap_pass to your password. - -imap_pass = muh_password - - -Same is true of smtp_pass if you want to send emails without a password. - -smtp = muh_password - -There are securer ways of storing your pass word, which you can research youself. I'm still figuring out an elegant solution that works for me. - -## To come... - -I'm still figuring out offlineIMAPs and some other little things to interface with mutt. I'll put up a new video when I'm totally successful. diff --git a/.config/mutt/luke_mutt_readme_2.md b/.config/mutt/luke_mutt_readme_2.md deleted file mode 100644 index c7e16e69..00000000 --- a/.config/mutt/luke_mutt_readme_2.md +++ /dev/null @@ -1,27 +0,0 @@ -# Luke's mutt readme, Part 2: Offline IMAPS - -Here was my goal: - -+ Have an extensible terminal based email client that can store all of my emails offline for access when I don't have internet. - -This is important, not just for general convenience, but because I don't have internet for most of the day. - -## OfflineIMAPS - -OfflineIMAPS keeps a local repo of your IMAP emails on your own machine. I've done the setup in this rice for you, you just have to fill in your account info. - -## Setup - -Look up your server info for your email provider. The details will be on their website. - -First go to `~/.offlineimaprc`. I have a template for a Gmail account there already. You can simply add your username and password in the required locations. You can add or replace the gmail account with any other kind of email account as well, just instead of `type = Gmail`, use `type = IMAP` in the remote repository. Note that each email account will have a general settings category, marked [Account NAME] and two sub repositories, one being the online repo and the other being a directory on your own machine, marked [Repository NAME-remote] and [Repository NAME-local]. To add new accounts mimic the syntax I have. - -Then either run `offlineimap -o` and if your information was entered correctly, OfflineIMAP will begin to download *all* of your email (which may take a while). - -Next add your account and (SMTP) server info to `~/.msmtp`. This will allow you to send emails. - -## How to keep synced - -Each time you run `offlineimap`, mail will be synced between the internet and your own machine. I don't have a systematized way to run this, but `~/.config/Scripts/mailsyncloop.sh` is aliased to `mailsync` and will updateOfflineIMAP every couple of minutes or so. There are smarter ways to do this, and if you develop one, feel free to tell me! - -[luke@lukesmith.xyz](mailto:luke@lukesmith.xyz) diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap old mode 100755 new mode 100644 diff --git a/.config/mutt/muttcol b/.config/mutt/muttcol old mode 100755 new mode 100644 diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc old mode 100755 new mode 100644 index 86b4a0b4..9f30f22b --- a/.config/mutt/muttrc +++ b/.config/mutt/muttrc @@ -1,4 +1,3 @@ -#source "gpg -dq ~/.ayylmao |" source ~/.config/mutt/gmailrc source ~/.config/mutt/muttcol source ~/.config/mutt/aliases @@ -11,8 +10,6 @@ set mail_check = "10" set mailcap_path = ~/.config/mutt/mailcap set date_format="%m/%d %I:%M" set index_format="%2C %Z %d %-15.15F %s (%-4.4c)" -#set status_format="mpv ~/.config/mutt/bump.wav" -#set wrap = 0 auto_view text/html alternative_order text/plain text/enriched text/html diff --git a/.config/mutt/personalrc b/.config/mutt/personalrc new file mode 100644 index 00000000..a372456d --- /dev/null +++ b/.config/mutt/personalrc @@ -0,0 +1,23 @@ +# vim: filetype=muttrc +set imap_user = "YOU@YOURDOMAIN.COM" +set smtp_url = "SMTPSERVERINFO:PORT" +set realname = "YOUR NAME" +set mbox_type = Maildir +set sendmail = "/usr/bin/msmtp -a personal" +set folder = "~/.Mail/Personal" +set spoolfile = +INBOX +set record = +INBOX.Sent +set postponed = +INBOX.Drafts +set header_cache = ~/.config/mutt/Personal/cache/headers +set message_cachedir = ~/.config/mutt/Personal/cache/bodies +set certificate_file = ~/.config/mutt/Personal/certificates +set ssl_starttls = yes +set ssl_force_tls = yes + +bind index g noop +bind index gg first-entry +macro index gi "=INBOX" "Go to inbox" +macro index gs "=INBOX.Sent" "Go to sent" +macro index gd "=INBOX.Drafts" "Go to drafts" +macro index gj "=INBOX.Junk" "Go to junk" +macro index gt "=INBOX.Trash" "Go to trash" diff --git a/.config/ranger/luke_ranger_readme.pdf b/.config/ranger/luke_ranger_readme.pdf deleted file mode 100644 index c9fc6533..00000000 Binary files a/.config/ranger/luke_ranger_readme.pdf and /dev/null differ diff --git a/.config/ranger/luke_ranger_readme.md b/.config/ranger/ranger.md similarity index 95% rename from .config/ranger/luke_ranger_readme.md rename to .config/ranger/ranger.md index cb1e85e2..86cd5dbe 100644 --- a/.config/ranger/luke_ranger_readme.md +++ b/.config/ranger/ranger.md @@ -20,6 +20,8 @@ Press any "verb" followed by any "argument" to perform a folder operation. "gd" ## Many little things! +(Some of this has been changed or depreciated. I'll update soon.) + + bg -- (for i3 users) makes an image your background (assuming i3 is looking at ~/.config/wall.png for your background) + X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive. + Z -- zips a folder up into a .tar.gz archive. diff --git a/.msmtprc b/.msmtprc index bc8fcb21..026e722a 100644 --- a/.msmtprc +++ b/.msmtprc @@ -1,19 +1,25 @@ +# vim: filetype=config +#These are settings for all accounts. account default protocol smtp auth on tls on tls_nocertcheck +#Below are example accounts. Comment out what you don't use. + +#Here is an example gmail account. account gmail from YOURNAME@gmail.com user YOURNAME@gmail.com -password "$PASSWORD" +password "PASSWORD" host smtp.gmail.com port 587 +#Here is another example account. Search for your email host's SMTP server and add the information here. account personal from USER@DOMMAIN.COM user USER@DOMMAIN.COM -password "$PASSWORD" +password "PASSWORD" host HOST-SERVER port XXX diff --git a/.offlineimaprc b/.offlineimaprc index cb6ece33..38739808 100644 --- a/.offlineimaprc +++ b/.offlineimaprc @@ -1,10 +1,12 @@ +# vim filetype=config +# Here are settings for all accounts. [general] accounts = gmail, personal starttls = yes ssl = yes -####### +# Here's an example Gmail account, just add in a username and password to use your own. [Account gmail] localrepository = gmail-local @@ -14,15 +16,15 @@ remoterepository = gmail-remote type = Gmail remoteuser = YOURNAME@gmail.com remotepass = $PASSWORD -#folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail'] +#Note that the line below will not sync Gmail's redundant "All Mail" box. You can add other inboxes here you don't want to sync. +folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail'] sslcacertfile = /etc/ssl/certs/ca-certificates.crt [Repository gmail-local] type = Maildir localfolders = ~/.Mail/Gmail -####### - +# Here's an other more general example. Add your username, password and IMAP server information, which you can look this up on your email host's website. [Account personal] localrepository = personal-local diff --git a/README.md b/README.md index 94b4f86c..19b69fbd 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,16 @@ These are the files to my Void Linux Rice. ## More documentation -Check other config folders for more specific documentation. For example [config mutt](.config/mutt/) contains documentation on how to set up mutt with your email account. +Check other config folders for more specific documentation. For example [config contains documentation on how to set up mutt with your email account. + +[Email configuration](.config/mutt/email.md) +[ranger configuration](.config/ranger/) ## Dynamic Configuration Files One of the most notable parts of my setup is that my ~/.bashrc and configs for ranger and qutebrowser are dynamically synchronized with by `~/.config/Scripts/shortcuts.py`. Each config file has a "base" form to which directory shortcuts are added and synchronized every time i3 refreshes or when you press Super+F2. -Each of these programs have shortcuts to edit config files and to go to or move files to certain directories. Each time `shortcuts.py` is run, the pairs in both `~/.config/Scripts/folders` and `~/.config/Scripts/configs` are put in the syntax of each application and the +Each of these programs have shortcuts to edit config files and to go to or move files to certain directories. Each time `shortcuts.py` is run, the pairs in both `~/.config/Scripts/folders` and `~/.config/Scripts/configs` are put in the syntax of each application, added to the base configs, and the plopped in the appropriate location. ### What does this mean?