Switch to using stow for dotfiles management

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2019-12-31 14:18:38 +05:30
parent 5cbc5a63c5
commit 7200bbece7
27 changed files with 2663 additions and 196 deletions

15
.gitmodules vendored Normal file
View file

@ -0,0 +1,15 @@
[submodule "tmux/.tmux/plugins/tmux-continuum"]
path = tmux/.tmux/plugins/tmux-continuum
url = https://github.com/tmux-plugins/tmux-continuum.git
[submodule "tmux/.tmux/plugins/tmux-copycat"]
path = tmux/.tmux/plugins/tmux-copycat
url = https://github.com/tmux-plugins/tmux-copycat.git
[submodule "tmux/.tmux/plugins/tmux-open"]
path = tmux/.tmux/plugins/tmux-open
url = https://github.com/tmux-plugins/tmux-open.git
[submodule "tmux/.tmux/plugins/tmux-resurrect"]
path = tmux/.tmux/plugins/tmux-resurrect
url = https://github.com/tmux-plugins/tmux-resurrect.git
[submodule "tmux/.tmux/plugins/tmux-yank"]
path = tmux/.tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank.git

26
Makefile Normal file
View file

@ -0,0 +1,26 @@
all:
@echo ""
@echo "usage:"
@echo ""
@echo "* make dotfiles -- to install dotfiles"
@echo "* make clean -- to clean up dotfiles"
@echo "* make update -- get latest version from github, install manually"
@echo ""
linux:
mkdir -p ~/.config
stow gitconfig
stow gnupg
stow imapfilter
stow mbsyncrc
stow msmtprc
stow mutt
stow notmuch-config
stow nvim
stow tmux
update:
git pull --verbose
.PHONY : all dotfiles clean

View file

@ -1,15 +1,15 @@
set from = "maitysanchayan@gmail.com"
set sendmail = "/usr/bin/msmtp -a Sanchayan"
set mbox = "+Sanchayan/Archive"
set postponed = "+Sanchayan/Drafts"
set record = "+Sanchayan/Sent"
set mbox = "+Archive"
set postponed = "+drafts"
set record = "+Sent"
color status green default
macro index D \
"<save-message>+Sanchayan/Trash<enter>" \
"<save-message>+Trash<enter>" \
"move message to the trash"
macro index S \
"<save-message>+Sanchayan/Spam<enter>" \
"<save-message>+Spam<enter>" \
"mark message as spam"

View file

@ -1,17 +1,14 @@
#!/bin/bash
imapfilter -c /home/sanchayan/.imapfilter/config.lua
mbsync -Va
notmuch new
export DISPLAY=:0
let toradex_mail_count=`ls /home/sanchayan/Mail/Toradex/INBOX/new/|wc -l`
let stefan_mail_count=`ls /home/sanchayan/Mail/Sanchayan/Stefan/new/|wc -l`
let sanchayan_linux=`ls /home/sanchayan/Mail/Sanchayan/Linux\ Kernel/new/|wc -l`
let inbox=`ls /home/sanchayan/Mail/Inbox/new/|wc -l`
if (("$toradex_mail_count" > 0)); then
/usr/bin/notify-send "You have $toradex_mail_count new mails in Toradex" --icon=dialog-information;
if (("$inbox" > 0)); then
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
$inbox new mails in Inbox"
fi
if (("$stefan_mail_count" > 0)); then
/usr/bin/notify-send "You have $stefan_mail_count new mails in Stefan inbox" --icon=dialog-information;
fi
if (("$sanchayan_linux" > 0)); then
/usr/bin/notify-send "You have $sanchayan_linux new mails in Linux Kernel inbox" --icon=dialog-information;
fi

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Check every ten seconds if the process identified as $1 is still
# running. After 5 checks (~60 seconds), kill it. Return non-zero to
# indicate something was killed.
monitor() {
local pid=$1 i=0
while ps $pid &>/dev/null; do
if (( i++ > 3 )); then
echo "Max checks reached. Sending SIGKILL to ${pid}..." >&2
kill -9 $pid; return 1
fi
sleep 60
done
return 0
}
read -r pid < ~/.offlineimap/pid
if ps $pid &>/dev/null; then
echo "Process $pid already running. Exiting..." >&2
exit 1
fi
imapfilter
offlineimap -o -u quiet & monitor $!
#offlineimap -a Toradex -o -u quiet & monitor $!

View file

@ -1,12 +1,11 @@
set mbox_type = Maildir
set spoolfile = "+Sanchayan/INBOX"
set spoolfile = "+Inbox"
source ~/.mutt/accounts/sanchayan
folder-hook Sanchayan/* source ~/.mutt/accounts/sanchayan
folder-hook Victor/* source ~/.mutt/accounts/victor
folder-hook Toradex/* source ~/.mutt/accounts/toradex
#folder-hook Victor/* source ~/.mutt/accounts/victor
set mail_check = 0
set envelope_from
@ -48,14 +47,11 @@ macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
set send_charset="us-ascii:utf-8"
set send_charset="utf-8"
set editor="nano"
set editor="nvim"
set date_format="%y-%m-%d %T"
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
folder-hook *[sS]ent* 'set index_format="%2C | %Z [%d] %-30.30t (%-4.4c) %s"'
folder-hook ! *[sS]ent* 'set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"'
set sleep_time = 0
set mailcap_path = ~/.mutt/mailcap
@ -77,8 +73,7 @@ macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuc
# 'a' shows all messages again (supersedes default <alias> binding)
macro index a "<limit>all\n" "show all messages (undo limit)"
set header_cache=~/Mail/mutt_cache/ # a much faster opening of mailboxes...
set header_cache=~/Gmail/mutt_cache/ # a much faster opening of mailboxes...
macro index D "<save-message>+/ACCOUNT/[Gmail].Trash<enter>" "Move message to the trash"
macro index D "<save-message>+/Trash<enter>" "Move message to the trash"
source /etc/Muttrc.gpg.dist

View file

@ -1,15 +0,0 @@
set from = "maitysanchayan@gmail.com"
set sendmail = "/usr/bin/msmtp -a Sanchayan"
set mbox = "+Archive"
set postponed = "+drafts"
set record = "+Sent"
color status green default
macro index D \
"<save-message>+Trash<enter>" \
"move message to the trash"
macro index S \
"<save-message>+Spam<enter>" \
"mark message as spam"

View file

@ -1,14 +0,0 @@
set from = "sanchayan.maity@toradex.com"
set sendmail = "/usr/bin/msmtp -a Toradex"
set mbox = "+Toradex/archive"
set postponed = "+Toradex/drafts"
set record = "+Toradex/Sent"
macro index D \
"<save-message>+Toradex/Trash<enter>" \
"move message to the trash"
macro index S \
"<save-message>+Toradex/Spam<enter>" \
"mark message as spam"

View file

@ -1,15 +0,0 @@
set from = "victorascroft@gmail.com"
set sendmail = "/usr/bin/msmtp -a Victor"
set mbox = "+Victor/Archive"
set postponed = "+Victor/Drafts"
set record = "+Victor/Sent"
color status cyan default
macro index D \
"<save-message>+Victor/Trash<enter>" \
"move message to the trash"
macro index S \
"<save-message>+Victor/Spam<enter>" \
"mark message as spam"

View file

@ -1 +0,0 @@
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput

View file

@ -1,14 +0,0 @@
#!/bin/bash
imapfilter -c /home/sanchayan/.imapfilter/config.lua
mbsync -Va
notmuch new
export DISPLAY=:0
let inbox=`ls /home/sanchayan/Mail/Inbox/new/|wc -l`
if (("$inbox" > 0)); then
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
$inbox new mails in Inbox"
fi

@ -1 +0,0 @@
Subproject commit 3b23c55eb43849975656dd89e3f35dacd2b93e69

View file

@ -1,79 +0,0 @@
set mbox_type = Maildir
set spoolfile = "+Inbox"
source ~/.mutt/accounts/sanchayan
folder-hook Sanchayan/* source ~/.mutt/accounts/sanchayan
#folder-hook Victor/* source ~/.mutt/accounts/victor
set mail_check = 0
set envelope_from
unset move # gmail does that
set delete # don't ask, just do
unset confirmappend # don't ask, just do!
set quit # don't ask, just do!!
unset mark_old # read/new is good enough for me
# sort/threading
set sort = threads
set sort_aux = reverse-last-date-received
set sort_re
# look and feel
set pager_index_lines = 8
set pager_context = 5
set pager_stop
set menu_scroll
set smart_wrap
set tilde
unset markers
# composing
set fcc_attach
unset mime_forward
set forward_format = "Fwd: %s"
set include
set forward_quote
ignore * # first, ignore all headers
unignore from: to: cc: date: subject: # then, show only these
hdr_order from: to: cc: date: subject: # and in this order
source "~/.mutt/mutt-colors-solarized/mutt-colors-solarized-light-16.muttrc"
macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
set send_charset="us-ascii:utf-8"
set send_charset="utf-8"
set editor="nvim"
set date_format="%y-%m-%d %T"
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
set sleep_time = 0
set mailcap_path = ~/.mutt/mailcap
auto_view text/html
alternative_order text/plain text/html
## Abook
set query_command= "abook --mutt-query '%s'"
macro index,pager A "<pipe-message>abook --add-email-quiet<return>"
## Add this sender to Abook
bind editor <Tab> complete-query
set edit_headers = yes
# 'L' performs a notmuch query, showing only the results
macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
# 'a' shows all messages again (supersedes default <alias> binding)
macro index a "<limit>all\n" "show all messages (undo limit)"
set header_cache=~/Gmail/mutt_cache/ # a much faster opening of mailboxes...
macro index D "<save-message>+/Trash<enter>" "Move message to the trash"

View file

@ -0,0 +1,2 @@
plug.vim:
wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

File diff suppressed because it is too large Load diff

@ -0,0 +1 @@
Subproject commit 7f99beee1d4c93b08f822ade5b9982092c3a41f8

@ -0,0 +1 @@
Subproject commit ca3d52dc48bee27af5e5f55035cf82e188011e94

@ -0,0 +1 @@
Subproject commit cedb4584908bd8458fadc8d3e64101d3cbb48d46

@ -0,0 +1 @@
Subproject commit 905abba3c3b8a1e12c7d0fa31ff7c489a75515f9

@ -0,0 +1 @@
Subproject commit 648005db64d9bf3c4650eff694ecb6cf3e42b0c8