all repos — dotfiles @ beb3b8ad3cc4eb491db47ed03fcb8c23e0ece77f

my *nix dotfiles

Add mailsync script among other things
Anirudh Oppiliappan x@icyphox.sh
Sun, 26 Dec 2021 16:43:10 +0530
commit

beb3b8ad3cc4eb491db47ed03fcb8c23e0ece77f

parent

73df1800321b760bc4114e2ab967a34a269f8d41

6 files changed, 43 insertions(+), 51 deletions(-)

jump to
A bin/mailsync

@@ -0,0 +1,10 @@

+#!/bin/sh +# mailsync: sync email using mbsync and notify on new mail + +mbsync -qa &>/dev/null + +new="$HOME/mail/personal/Inbox/new/" +count="$(find $new -type f | wc -l)" + +[[ "$count" -gt 0 ]] && + printf 'SEC:5\tTAG:mail\tMail\t%s new mail\n' "$count" > "$XNOTIFY_FIFO"
M bin/signalbin/signal

@@ -2,9 +2,9 @@ #!/bin/sh

# signal: launch signal-desktop via a vm (vmm(4)) status="$(vmctl status 1 | grep running)" -if [ "$status" == "" ]; then +[[ "$status" == "" ]] && { vmctl start pantwo sleep 10 -fi +} ssh -Y pantwo signal-desktop &> /dev/null
M config/sxhkd/sxhkdrcconfig/sxhkd/sxhkdrc

@@ -1,37 +1,3 @@

-# _ _ _ -# _____ _| |__ | | ____| |_ __ ___ -#/ __\ \/ / '_ \| |/ / _` | '__/ __| -#\__ \> <| | | | < (_| | | | (__ -#|___/_/\_\_| |_|_|\_\__,_|_| \___| -# - -#super + Return -# alacritty - -#super + d -# dmenu_run - -# super + ctrl + l -# ~/bin/lock.sh - -# super + p -# ~/bin/pwmenu.sh - -# XF86AudioRaiseVolume -# pamixer -i 2 -# -# XF86AudioLowerVolume -# pamixer -d 2 -# -# XF86AudioMute -# pamixer -t - -# XF86MonBrightnessUp -# lux -a 20 -# -# XF86MonBrightnessDown -# lux -s 20 -# ctrl + shift + bracketright scr -s
M home/.Xresourceshome/.Xresources

@@ -22,8 +22,8 @@

! xprompt xprompt.font: SF Mono:style=Regular:size=12:antialias=true xprompt.gravity: C -xprompt.borderWidth: 0 -xprompt.geometry: 1200x50 +xprompt.borderWidth: 1 +xprompt.geometry: 400x50 ! xterm xterm*faceName: SF Mono
M home/.cwmrchome/.cwmrc

@@ -21,8 +21,8 @@

# execs bind-key 4-Return '/usr/X11R6/bin/xterm' bind-key 4-p '/home/icy/bin/pwmenu.sh' -bind-key CS-Print "/home/icy/bin/scr -s" -bind-key C-Print "/home/icy/bin/scr -f" +bind-key CS-backslash "/home/icy/bin/scr -s" +bind-key C-backslash "/home/icy/bin/scr -f" bind-key 4-n "st -e nvim /home/icy/notes" bind-key 4-l "/home/icy/bin/log" bind-key 4C-q "xlock -mode space"
M home/.xsessionhome/.xsession

@@ -1,22 +1,20 @@

#!/bin/sh -# _ _ _ -# __ _(_)_ __ (_) |_ _ __ ___ -# \ \/ / | '_ \| | __| '__/ __| -# _ > <| | | | | | |_| | | (__ -#(_)_/\_\_|_| |_|_|\__|_| \___| -# - xmodmap ~/.xmodmap eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")" export LC_CTYPE="en_US.UTF-8" -export ENV="$HOME/.kshrc" sxhkd & -xrdb -l ~/.Xresources & + +# xorg things +xrdb -l ~/.Xresources xsetroot -solid '#cccccc' xrandr --dpi 96 -syndaemon -k -i 0.5 -d xsetroot -cursor_name left_ptr +xrandr --output DP2 --set "Broadcast RGB" "Full" + +# touchpad setup +syndaemon -k -i 0.5 -d + redshift -l 12.972442:77.580643 -t 6400:5700 -m randr & # xnotify

@@ -26,5 +24,23 @@ rm -f $XNOTIFY_FIFO

mkfifo $XNOTIFY_FIFO xnotify <$XNOTIFY_FIFO 3<>$XNOTIFY_FIFO & -st & +# notifications +notifycpu() { + tail -f /var/log/daemon |\ + awk ' + $5 ~ /^apmd.*:$/ && $0 ~ "external power status: not connected" && $(NF - 2) < 25 { + printf "SEC:0\tTAG:power\tBattery is low: %s\n", $(NF - 2) + } + $5 ~ /^sensorsd.*:$/ && $7 == "exceeds" { + printf "SEC:5\tTAG:temp\tTemperature is at %d°C\n", $9 + } + { + fflush() + } + ' +} + +notifycpu > "$XNOTIFY_FIFO" & + +# window manager ~/leet/cwm/cwm