all repos — dotfiles @ f713de8850ef33ed54eb44bbec2af3fd797ad8b7

my *nix dotfiles

home/.xsession (view raw)

 1#!/bin/sh
 2
 3xmodmap ~/.xmodmap
 4eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")"
 5export LC_CTYPE="en_US.UTF-8"
 6sxhkd &
 7
 8# xorg things
 9xrdb -l ~/.Xresources
10xsetroot -solid '#cccccc'
11xrandr --dpi 96
12xsetroot -cursor_name left_ptr
13xrandr --output DP-1 --set "Broadcast RGB" "Full"
14
15# touchpad setup
16syndaemon -k -i 0.5 -d
17
18redshift -l 12.972442:77.580643 -t 6400:5700 -m randr &
19
20# xnotify
21XNOTIFY_FIFO="$HOME/.cache/xnotify$DISPLAY.fifo"
22export XNOTIFY_FIFO
23rm -f $XNOTIFY_FIFO
24mkfifo $XNOTIFY_FIFO
25xnotify <$XNOTIFY_FIFO 3<>$XNOTIFY_FIFO &
26
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
46~/leet/cwm/cwm