Merge branch 'dev' into thesis
mail: fix notification through cron add keymaps to next- and previous-new
This commit is contained in:
commit
fafbc7029c
@ -17,7 +17,8 @@ setbg &
|
|||||||
dwmblocks &
|
dwmblocks &
|
||||||
xrdb "$XDG_CONFIG_HOME/X11/xresources"
|
xrdb "$XDG_CONFIG_HOME/X11/xresources"
|
||||||
xrdb -merge "$XDG_STATE_HOME/xcolors"
|
xrdb -merge "$XDG_STATE_HOME/xcolors"
|
||||||
xautolock -locker slock -time 5 -corners 000- &
|
xss-lock -- slock &
|
||||||
|
get_dbus &
|
||||||
|
|
||||||
cursor_setup "SYNA30BD:00 06CB:CE08" "trackpad" &> /dev/null &
|
cursor_setup "SYNA30BD:00 06CB:CE08" "trackpad" &> /dev/null &
|
||||||
cursor_setup "PIXART HP Wireless Keyboard and Mouse" &> /dev/null &
|
cursor_setup "PIXART HP Wireless Keyboard and Mouse" &> /dev/null &
|
||||||
|
@ -10,6 +10,8 @@ macro index,pager in '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/neomu
|
|||||||
# General rebindings
|
# General rebindings
|
||||||
bind index j next-entry
|
bind index j next-entry
|
||||||
bind index k previous-entry
|
bind index k previous-entry
|
||||||
|
bind index J next-new
|
||||||
|
bind index K previous-new
|
||||||
bind attach <return> view-mailcap
|
bind attach <return> view-mailcap
|
||||||
bind attach l view-mailcap
|
bind attach l view-mailcap
|
||||||
bind editor <space> noop
|
bind editor <space> noop
|
||||||
|
18
.local/bin/get_dbus
Executable file
18
.local/bin/get_dbus
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# @author : swytch
|
||||||
|
# @file : get_dbus
|
||||||
|
# @license : GPLv3
|
||||||
|
# @created : Wednesday May 20, 2020 18:04:01 CEST
|
||||||
|
#
|
||||||
|
# @description : retrieve and store DBUS_SESSION_BUS_ADDRESS in case
|
||||||
|
# some utilitary needs it (e.g. cronie)
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
|
env | grep DBUS_SESSION_BUS_ADDRESS > "$HOME/.dbus/Xdbus"
|
||||||
|
echo "export DBUS_SESSION_BUS_ADDRESS" >> "$HOME/.dbus/Xdbus"
|
||||||
|
chmod 600 $HOME/.dbus/Xdbus
|
||||||
|
|
||||||
|
exit 0
|
@ -23,16 +23,19 @@ eval "$(grep -h -- \
|
|||||||
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \
|
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \
|
||||||
"$XDG_CONFIG_HOME/zsh/.zprofile" "$HOME/.pam_environment" 2>/dev/null)"
|
"$XDG_CONFIG_HOME/zsh/.zprofile" "$HOME/.pam_environment" 2>/dev/null)"
|
||||||
|
|
||||||
case "$(readlink -f /sbin/init)" in
|
|
||||||
*systemd*) export XDG_RUNTIME_DIR=unix:path=/run/user/$(id -u)/bus ;;
|
|
||||||
esac
|
|
||||||
export GPG_TTY=$TTY
|
export GPG_TTY=$TTY
|
||||||
|
[ -r "$HOME/.dbus/Xdbus" ] && source "$HOME/.dbus/Xdbus"
|
||||||
|
|
||||||
# Config file location must be passed at execution, not as envrionment variable
|
# Config file location must be passed at execution, not as envrionment variable
|
||||||
[ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc"
|
[ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc"
|
||||||
|
|
||||||
|
pgrepoutput="$(pgrep -ax X\(\|org\|wayland\))"
|
||||||
|
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||||
notify() {
|
notify() {
|
||||||
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
|
[ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do
|
||||||
|
export DISPLAY=$x
|
||||||
|
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
|
||||||
|
done;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check account for new mail. Notify if there is new content.
|
# Check account for new mail. Notify if there is new content.
|
||||||
|
Reference in New Issue
Block a user