aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--X/.Xresources2
-rw-r--r--X/.xinitrc5
-rw-r--r--doom/config.el60
-rwxr-xr-xinstall.sh75
-rw-r--r--msmtp/config20
-rw-r--r--services/clipboard.service9
-rw-r--r--services/mailnotify.service2
-rw-r--r--services/mbsync.service2
8 files changed, 125 insertions, 50 deletions
diff --git a/X/.Xresources b/X/.Xresources
index aee38d1..66b090a 100644
--- a/X/.Xresources
+++ b/X/.Xresources
@@ -1,3 +1,5 @@
+Xcursor.size: 22
+
! Dracula Xresources palette
*.foreground: #F8F8F2
*.background: #282A36
diff --git a/X/.xinitrc b/X/.xinitrc
index 4cbbf6e..5112b47 100644
--- a/X/.xinitrc
+++ b/X/.xinitrc
@@ -32,15 +32,16 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
unset f
fi
+xset r rate 200 30
+
# Startup programs
eval $(ssh-agent)
-dropbox &
sxhkd &
compton &
redshift &
dunst &
wal -R
-xrandr --output DP-1 --auto --output DP-2 --left-of DP-1 --auto --output DVI-1-0 --rotate left --right-of DP-1 --auto
+# xrandr --output DP-1 --auto --output DP-2 --left-of DP-1 --auto --output DVI-1-0 --rotate left --right-of DP-1 --auto
feh --bg-fill "$(< "${HOME}/.cache/wal/wal")"
xsetroot -cursor_name left_ptr
diff --git a/doom/config.el b/doom/config.el
index 18b6d6c..2d6c0c5 100644
--- a/doom/config.el
+++ b/doom/config.el
@@ -32,9 +32,6 @@
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type nil)
-(setq auth-sources '("~/.authinfo.gpg"
- "~/.authinfo"))
-
;; Add some keybinding customisations.
;; Stop emacs from freezing when trying to minimize it on a tiling WM.
@@ -199,7 +196,10 @@
;; Delete all whitespace until the first non-whitespace character.
(use-package! hungry-delete
- :config (global-hungry-delete-mode))
+ :config
+ (global-hungry-delete-mode)
+ ;; disable hungry delete in minibuffer-mode: https://github.com/abo-abo/swiper/issues/2761
+ (add-to-list 'hungry-delete-except-modes 'minibuffer-mode))
;; Org configuration
(use-package! org
@@ -303,12 +303,11 @@
org-todo-keywords
'((sequence
"TODO(t)" ; A task that needs doing & is ready to do
- "PROJECT(p)" ; A project, which usually contains other tasks
- "START(s)" ; A task that is in progress
+ "PROJ(p)" ; A project, which usually contains other tasks
+ "STRT(s)" ; A task that is in progress
"WAIT(w)" ; Something external is holding up this task
"HOLD(h)" ; This task is paused/on hold because of me
- "DEFERRED(h)" ; Demoted for later
- "SOMEDAY(m)" ; todo some day
+ "SMDY(m)" ; todo some day
"|"
"DONE(d!)" ; Task successfully completed
"KILL(k)") ; Task was cancelled, aborted or is no longer applicable
@@ -759,26 +758,18 @@
(calendar-last-day-of-month month year)))
(= day last-day-of-month)))
-;;(setq smtpmail-smtp-server "smtp.mailbox.org" ;; <-- edit this !!!
-;; smtpmail-smtp-service 587 ;; 25 is default -- uncomment and edit if needed
-;; smtpmail-stream-type 'starttls)
-
-(require 'smtpmail)
-
-(setq user-mail-address "ymh15@ic.ac.uk"
- smtpmail-smtp-server "smtp.office365.com"
- smtpmail-smtp-service 587
- smtpmail-stream-type 'starttls
- message-send-mail-function 'message-smtpmail-send-it)
+(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-signature "Yann Herklotz
Imperial College London
https://yannherklotz.com")
-(setq message-send-mail-function 'message-smtpmail-send-it)
-
(setq auth-sources '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc"))
+(setq mail-specify-envelope-from t
+ message-sendmail-envelope-from 'header
+ mail-envelope-from 'header)
+
(use-package! modus-operandi-theme
:config
(custom-theme-set-faces! 'modus-operandi
@@ -791,13 +782,34 @@ https://yannherklotz.com")
(use-package! notmuch
:config
+ (defun ymhg/notmuch-search-delete-mail (&optional beg end)
+ "Delete a message."
+ (interactive (notmuch-interactive-region))
+ (if (member "deleted" (notmuch-search-get-tags))
+ (notmuch-search-tag (list "-deleted"))
+ (notmuch-search-tag (list "+deleted" "-unread") beg end)))
+
+ (defun ymhg/notmuch-show-delete-mail (&optional beg end)
+ "Delete a message."
+ (interactive (notmuch-interactive-region))
+ (if (member "deleted" (notmuch-show-get-tags))
+ (notmuch-show-tag (list "-deleted"))
+ (notmuch-show-tag (list "+deleted" "-unread") beg end)))
+
+ (map!
+ :map notmuch-show-mode-map
+ "d" #'ymhg/notmuch-show-delete-mail)
+ (map!
+ :map notmuch-search-mode-map
+ "d" #'ymhg/notmuch-search-delete-mail)
+
(setq notmuch-saved-searches
- '((:name "inbox" :query "tag:inbox not tag:trash" :key "n")
+ '((:name "inbox" :query "tag:inbox not tag:deleted" :key "n")
(:name "flagged" :query "tag:flagged" :key "f")
(:name "sent" :query "tag:sent" :key "s")
(:name "drafts" :query "tag:draft" :key "d")
- (:name "mailbox" :query "tag:mailbox not tag:trash" :key "m")
- (:name "imperial" :query "tag:imperial not tag:trash" :key "i"))))
+ (:name "mailbox" :query "tag:mailbox not tag:deleted" :key "m")
+ (:name "imperial" :query "tag:imperial not tag:deleted" :key "i"))))
;;(use-package! ox-ssh
;; :after org
diff --git a/install.sh b/install.sh
index 6fce6d9..9583968 100755
--- a/install.sh
+++ b/install.sh
@@ -22,13 +22,14 @@ function print_help {
}
function ln_configs {
- ln $EXTRA_OPTS ${SCRIPT_DIR}/${1} $2
+ if [[ $FORCE -eq 1 ]]; then
+ rm -rI $2
+ fi
+ ln $EXTRA_OPTS ${SCRIPT_DIR}/$1 $2
}
function mk {
- if [[ $FORCE -eq 1 ]]; then
- mkdir -p "$1"
- fi
+ mkdir -p "$1"
}
EXTRA_OPTS=" -s "
@@ -45,23 +46,28 @@ for i in "$@"; do
exit 0
;;
- emacs) EMACS=1; NOT_ALL=1;;
- X) X=1; NOT_ALL=1;;
- tmux) TMUX=1; NOT_ALL=1;;
- i3) I3=1; NOT_ALL=1;;
- zsh) ZSH=1; NOT_ALL=1;;
- isync) ISYNC=1; NOT_ALL=1;;
- polybar) POLYBAR=1; NOT_ALL=1;;
- compton) COMPTON=1; NOT_ALL=1;;
- firefox) FIREFOX=1; NOT_ALL=1;;
- ncmpcpp) NCMPCPP=1; NOT_ALL=1;;
- mpd) MPD=1; NOT_ALL=1;;
- bspwm) BSPWM=1; NOT_ALL=1;;
- rofi) ROFI=1; NOT_ALL=1;;
- termite) TERMITE=1; NOT_ALL=1;;
- afew) AFEW=1; NOT_ALL=1;;
- doom) DOOM=1; NOT_ALL=1;;
- notmuch) NOTMUCH=1; NOT_ALL=1;;
+ X) X=1; NOT_ALL=1;;
+ afew) AFEW=1; NOT_ALL=1;;
+ bspwm) BSPWM=1; NOT_ALL=1;;
+ compton) COMPTON=1; NOT_ALL=1;;
+ doom) DOOM=1; NOT_ALL=1;;
+ emacs) EMACS=1; NOT_ALL=1;;
+ firefox) FIREFOX=1; NOT_ALL=1;;
+ i3) I3=1; NOT_ALL=1;;
+ isync) ISYNC=1; NOT_ALL=1;;
+ mpd) MPD=1; NOT_ALL=1;;
+ msmtp) MSMTP=1; NOT_ALL=1;;
+ ncmpcpp) NCMPCPP=1; NOT_ALL=1;;
+ notmuch) NOTMUCH=1; NOT_ALL=1;;
+ polybar) POLYBAR=1; NOT_ALL=1;;
+ scripts) SCRIPTS=1; NOT_ALL=1;;
+ services) SERVICES=1; NOT_ALL=1;;
+ sxhkd) SXHKD=1; NOT_ALL=1;;
+ rofi) ROFI=1; NOT_ALL=1;;
+ termite) TERMITE=1; NOT_ALL=1;;
+ tmux) TMUX_INST=1; NOT_ALL=1;;
+ zathura) ZATHURA=1; NOT_ALL=1;;
+ zsh) ZSH=1; NOT_ALL=1;;
*)
print_help
@@ -77,11 +83,27 @@ if [[ ! -z $EMACS ]] || [[ -z $NOT_ALL ]]; then
ln_configs emacs/loader.org ~/.emacs.d/loader.org
fi
+if [[ ! -z $SXHKD ]] || [[ -z $NOT_ALL ]]; then
+ echo "Installing sxhkd config..."
+ mk ~/.config/sxhkd
+ ln_configs sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc
+fi
+
if [[ ! -z $DOOM ]] || [[ -z $NOT_ALL ]]; then
echo "Installing doom config..."
ln_configs doom ~/.config/doom
fi
+if [[ ! -z $MSMTP ]] || [[ -z $NOT_ALL ]]; then
+ echo "Installing msmtp config..."
+ ln_configs msmtp ~/.config/msmtp
+fi
+
+if [[ ! -z $ZATHURA ]] || [[ -z $NOT_ALL ]]; then
+ echo "Installing zathura config..."
+ ln_configs zathura ~/.config/zathura
+fi
+
if [[ ! -z $AFEW ]] || [[ -z $NOT_ALL ]]; then
echo "Installing afew config..."
mk ~/.config/afew
@@ -100,7 +122,7 @@ if [[ ! -z $X ]] || [[ -z $NOT_ALL ]]; then
ln_configs X/.xinitrc ~/.xinitrc
fi
-if [[ ! -z $TMUX ]] || [[ -z $NOT_ALL ]]; then
+if [[ ! -z $TMUX_INST ]] || [[ -z $NOT_ALL ]]; then
echo "Installing tmux config..."
ln_configs tmux/.tmux.conf ~/.tmux.conf
fi
@@ -172,3 +194,12 @@ if [[ ! -z $TERMITE ]] || [[ -z $NOT_ALL ]]; then
mk ~/.config/termite
ln_configs termite/config ~/.config/termite/config
fi
+
+if [[ ! -z $SERVICES ]] || [[ -z $NOT_ALL ]]; then
+ echo "Installing services config..."
+ mk ~/.config/systemd/user
+ ln_configs services/mailnotify.service ~/.config/systemd/user/mailnotify.service
+ ln_configs services/mbsync.service ~/.config/systemd/user/mbsync.service
+ ln_configs services/mbsync.timer ~/.config/systemd/user/mbsync.timer
+ ln_configs services/clipboard.service ~/.config/systemd/user/clipboard.service
+fi
diff --git a/msmtp/config b/msmtp/config
new file mode 100644
index 0000000..a837836
--- /dev/null
+++ b/msmtp/config
@@ -0,0 +1,20 @@
+defaults
+auth on
+tls on
+logfile ~/.msmtp.log
+
+account mailbox
+host smtp.mailbox.org
+port 587
+from yann@yannherklotz.com
+user ymherklotz@mailbox.org
+passwordeval "pass show mailbox/ymherklotz@mailbox.org"
+
+account imperial
+host smtp.office365.com
+port 587
+from yann.herklotz15@imperial.ac.uk
+user ymh15@ic.ac.uk
+passwordeval "pass show imperial/ymh15"
+
+account default : mailbox
diff --git a/services/clipboard.service b/services/clipboard.service
new file mode 100644
index 0000000..b34df49
--- /dev/null
+++ b/services/clipboard.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Clipboard management through Syncthing.
+
+[Service]
+Type=simple
+ExecStart=/home/ymherklotz/.local/bin/clipboard.sh
+
+[Install]
+WantedBy=default.target
diff --git a/services/mailnotify.service b/services/mailnotify.service
index 8e11656..cf0b39f 100644
--- a/services/mailnotify.service
+++ b/services/mailnotify.service
@@ -3,7 +3,7 @@ Description=Mailbox notification service
[Service]
Type=simple
-ExecStart=/home/yannherklotz/.local/bin/mailnotify.sh
+ExecStart=/home/ymherklotz/.local/bin/mailnotify.sh
[Install]
WantedBy=default.target
diff --git a/services/mbsync.service b/services/mbsync.service
index 54d073f..c5047ec 100644
--- a/services/mbsync.service
+++ b/services/mbsync.service
@@ -4,4 +4,4 @@ After=network.target network-online.target dbus.socket
[Service]
Type=oneshot
-ExecStart=/usr/bin/mbsync -Va && notmuch new && afew --tag --new
+ExecStart=/home/ymherklotz/.local/bin/mail.sh