43 lines
1 KiB
Bash
43 lines
1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Maybe start this daemon
|
|
running() { pgrep -x "$1" >/dev/null; }
|
|
run() {
|
|
command -v "$1" >/dev/null || return
|
|
running "$1" || "$@"
|
|
}
|
|
|
|
# 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
|
|
pgrep -x sxhkd >/dev/null || urxvt &
|
|
} &
|
|
|
|
# mouse acceleration
|
|
xset m 11/8 0
|
|
# keyboard repeat rate
|
|
xset r rate 350 45
|
|
|
|
# set wallpaper
|
|
run feh --no-fehbg --image-bg black --bg-center "$HOME/wallpaper"
|
|
|
|
# essentials
|
|
export SXHKD_SHELL=bash # likely faster than default SHELL
|
|
run sxhkd & # keyboard daemon
|
|
run dunst & # notifications
|
|
|
|
# perdy effects + transparency
|
|
[[ -f ~/.config/compton.conf ]] && run compton &
|
|
|
|
# non-essentials
|
|
run mpd & # music server
|
|
run redshift & # screen temperature based on time-of-day
|
|
run rslsync & # resilio sync
|
|
|
|
# key agents
|
|
running ssh-agent || { ssh-agent -s | sed 's/^echo/#echo/' >~/.ssh/agentenv; }
|
|
running gpg-agent || { gpg-agent --daemon | sed 's/^echo/#echo/' >~/.gnupg/agentenv; }
|