aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2021-12-26 16:43:10 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2021-12-26 16:43:10 +0530
commitbeb3b8ad3cc4eb491db47ed03fcb8c23e0ece77f (patch)
tree32594c6a0124de77802d755155e9e638f75894e5
parent73df1800321b760bc4114e2ab967a34a269f8d41 (diff)
downloaddotfiles-beb3b8ad3cc4eb491db47ed03fcb8c23e0ece77f.tar.gz
Add mailsync script among other things
-rwxr-xr-xbin/mailsync10
-rwxr-xr-xbin/signal4
-rw-r--r--config/sxhkd/sxhkdrc34
-rw-r--r--home/.Xresources4
-rw-r--r--home/.cwmrc4
-rw-r--r--home/.xsession38
6 files changed, 43 insertions, 51 deletions
diff --git a/bin/mailsync b/bin/mailsync
new file mode 100755
index 0000000..556560a
--- /dev/null
+++ b/bin/mailsync
@@ -0,0 +1,10 @@
1#!/bin/sh
2# mailsync: sync email using mbsync and notify on new mail
3
4mbsync -qa &>/dev/null
5
6new="$HOME/mail/personal/Inbox/new/"
7count="$(find $new -type f | wc -l)"
8
9[[ "$count" -gt 0 ]] &&
10 printf 'SEC:5\tTAG:mail\tMail\t%s new mail\n' "$count" > "$XNOTIFY_FIFO"
diff --git a/bin/signal b/bin/signal
index b83e209..841a743 100755
--- a/bin/signal
+++ b/bin/signal
@@ -2,9 +2,9 @@
2# signal: launch signal-desktop via a vm (vmm(4)) 2# signal: launch signal-desktop via a vm (vmm(4))
3 3
4status="$(vmctl status 1 | grep running)" 4status="$(vmctl status 1 | grep running)"
5if [ "$status" == "" ]; then 5[[ "$status" == "" ]] && {
6 vmctl start pantwo 6 vmctl start pantwo
7 sleep 10 7 sleep 10
8fi 8}
9 9
10ssh -Y pantwo signal-desktop &> /dev/null 10ssh -Y pantwo signal-desktop &> /dev/null
diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc
index 3f40ee9..afe8b7a 100644
--- a/config/sxhkd/sxhkdrc
+++ b/config/sxhkd/sxhkdrc
@@ -1,37 +1,3 @@
1# _ _ _
2# _____ _| |__ | | ____| |_ __ ___
3#/ __\ \/ / '_ \| |/ / _` | '__/ __|
4#\__ \> <| | | | < (_| | | | (__
5#|___/_/\_\_| |_|_|\_\__,_|_| \___|
6#
7
8#super + Return
9# alacritty
10
11#super + d
12# dmenu_run
13
14# super + ctrl + l
15# ~/bin/lock.sh
16
17# super + p
18# ~/bin/pwmenu.sh
19
20# XF86AudioRaiseVolume
21# pamixer -i 2
22#
23# XF86AudioLowerVolume
24# pamixer -d 2
25#
26# XF86AudioMute
27# pamixer -t
28
29# XF86MonBrightnessUp
30# lux -a 20
31#
32# XF86MonBrightnessDown
33# lux -s 20
34#
35ctrl + shift + bracketright 1ctrl + shift + bracketright
36 scr -s 2 scr -s
37 3
diff --git a/home/.Xresources b/home/.Xresources
index 6d823ae..6fbb459 100644
--- a/home/.Xresources
+++ b/home/.Xresources
@@ -22,8 +22,8 @@ xnotify.wrap: true
22! xprompt 22! xprompt
23xprompt.font: SF Mono:style=Regular:size=12:antialias=true 23xprompt.font: SF Mono:style=Regular:size=12:antialias=true
24xprompt.gravity: C 24xprompt.gravity: C
25xprompt.borderWidth: 0 25xprompt.borderWidth: 1
26xprompt.geometry: 1200x50 26xprompt.geometry: 400x50
27 27
28! xterm 28! xterm
29xterm*faceName: SF Mono 29xterm*faceName: SF Mono
diff --git a/home/.cwmrc b/home/.cwmrc
index 24f2cff..b3c7a86 100644
--- a/home/.cwmrc
+++ b/home/.cwmrc
@@ -21,8 +21,8 @@ bind-key 4S-5 window-movetogroup-5
21# execs 21# execs
22bind-key 4-Return '/usr/X11R6/bin/xterm' 22bind-key 4-Return '/usr/X11R6/bin/xterm'
23bind-key 4-p '/home/icy/bin/pwmenu.sh' 23bind-key 4-p '/home/icy/bin/pwmenu.sh'
24bind-key CS-Print "/home/icy/bin/scr -s" 24bind-key CS-backslash "/home/icy/bin/scr -s"
25bind-key C-Print "/home/icy/bin/scr -f" 25bind-key C-backslash "/home/icy/bin/scr -f"
26bind-key 4-n "st -e nvim /home/icy/notes" 26bind-key 4-n "st -e nvim /home/icy/notes"
27bind-key 4-l "/home/icy/bin/log" 27bind-key 4-l "/home/icy/bin/log"
28bind-key 4C-q "xlock -mode space" 28bind-key 4C-q "xlock -mode space"
diff --git a/home/.xsession b/home/.xsession
index ce3c133..7c02be1 100644
--- a/home/.xsession
+++ b/home/.xsession
@@ -1,22 +1,20 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# _ _ _
4# __ _(_)_ __ (_) |_ _ __ ___
5# \ \/ / | '_ \| | __| '__/ __|
6# _ > <| | | | | | |_| | | (__
7#(_)_/\_\_|_| |_|_|\__|_| \___|
8#
9
10xmodmap ~/.xmodmap 3xmodmap ~/.xmodmap
11eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")" 4eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")"
12export LC_CTYPE="en_US.UTF-8" 5export LC_CTYPE="en_US.UTF-8"
13export ENV="$HOME/.kshrc"
14sxhkd & 6sxhkd &
15xrdb -l ~/.Xresources & 7
8# xorg things
9xrdb -l ~/.Xresources
16xsetroot -solid '#cccccc' 10xsetroot -solid '#cccccc'
17xrandr --dpi 96 11xrandr --dpi 96
18syndaemon -k -i 0.5 -d
19xsetroot -cursor_name left_ptr 12xsetroot -cursor_name left_ptr
13xrandr --output DP2 --set "Broadcast RGB" "Full"
14
15# touchpad setup
16syndaemon -k -i 0.5 -d
17
20redshift -l 12.972442:77.580643 -t 6400:5700 -m randr & 18redshift -l 12.972442:77.580643 -t 6400:5700 -m randr &
21 19
22# xnotify 20# xnotify
@@ -26,5 +24,23 @@ rm -f $XNOTIFY_FIFO
26mkfifo $XNOTIFY_FIFO 24mkfifo $XNOTIFY_FIFO
27xnotify <$XNOTIFY_FIFO 3<>$XNOTIFY_FIFO & 25xnotify <$XNOTIFY_FIFO 3<>$XNOTIFY_FIFO &
28 26
29st & 27# notifications
28notifycpu() {
29 tail -f /var/log/daemon |\
30 awk '
31 $5 ~ /^apmd.*:$/ && $0 ~ "external power status: not connected" && $(NF - 2) < 25 {
32 printf "SEC:0\tTAG:power\tBattery is low: %s\n", $(NF - 2)
33 }
34 $5 ~ /^sensorsd.*:$/ && $7 == "exceeds" {
35 printf "SEC:5\tTAG:temp\tTemperature is at %d°C\n", $9
36 }
37 {
38 fflush()
39 }
40 '
41}
42
43notifycpu > "$XNOTIFY_FIFO" &
44
45# window manager
30~/leet/cwm/cwm 46~/leet/cwm/cwm