2016-12-17 00:06:41 -08:00
|
|
|
#!/usr/bin/env bash
|
2016-11-02 17:01:16 -07:00
|
|
|
|
2016-12-28 19:45:31 -08:00
|
|
|
# Maybe start this daemon
|
2017-04-26 15:53:44 -07:00
|
|
|
running() { pgrep -x "$1" >/dev/null; }
|
2016-12-28 19:45:31 -08:00
|
|
|
run() {
|
|
|
|
command -v "$1" >/dev/null || return
|
2017-01-17 20:22:10 -08:00
|
|
|
running "$1" || "$@"
|
2016-12-28 19:45:31 -08:00
|
|
|
}
|
2016-10-19 07:56:37 -07:00
|
|
|
|
2017-01-03 15:18:56 -08:00
|
|
|
# failsafe
|
|
|
|
{
|
|
|
|
sleep 5
|
|
|
|
|
|
|
|
# If sxhkd isn't running by now something is wrong and we're stuck, so open
|
|
|
|
# a terminal so I can do something about it
|
2017-05-04 04:12:49 -07:00
|
|
|
pgrep -x sxhkd >/dev/null || urxvt &
|
2017-01-03 15:18:56 -08:00
|
|
|
} &
|
|
|
|
|
2016-11-02 17:01:16 -07:00
|
|
|
# mouse acceleration
|
|
|
|
xset m 11/8 0
|
|
|
|
# keyboard repeat rate
|
|
|
|
xset r rate 350 45
|
|
|
|
|
2016-12-28 19:45:31 -08:00
|
|
|
# set wallpaper
|
2017-05-04 04:12:49 -07:00
|
|
|
run feh --no-fehbg --image-bg black --bg-center "$HOME/wallpaper"
|
2016-11-05 08:28:45 -07:00
|
|
|
|
2017-01-03 15:18:56 -08:00
|
|
|
# essentials
|
|
|
|
run sxhkd & # keyboard daemon
|
|
|
|
run dunst & # notifications
|
2017-05-10 11:56:31 -07:00
|
|
|
|
|
|
|
# perdy effects + transparency
|
|
|
|
[[ -f ~/.config/compton.conf ]] && run compton &
|
2016-12-24 13:01:59 -08:00
|
|
|
|
2017-01-03 15:18:56 -08:00
|
|
|
# non-essentials
|
2017-04-26 15:53:44 -07:00
|
|
|
run mpd & # music server
|
|
|
|
run redshift & # screen temperature based on time-of-day
|
|
|
|
run rslsync & # resilio sync
|
2016-12-28 19:45:31 -08:00
|
|
|
|
2017-01-17 20:22:10 -08:00
|
|
|
# key agents
|
2017-02-28 16:03:35 -08:00
|
|
|
running ssh-agent || { ssh-agent -s | sed 's/^echo/#echo/' >~/.ssh/agentenv; }
|
|
|
|
running gpg-agent || { gpg-agent --daemon | sed 's/^echo/#echo/' >~/.gnupg/agentenv; }
|