ref: a3188c16c2d36b1e3262955452bff6c36edc3f48 dotfiles/scripts/install_dpmsconf.sh -rwxr-xr-x 287 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# install dpmsconf cronjob for the current user

if [ $(crontab -l 2>/dev/null | wc -l) -eq 0 ] ; then
	# user has no crontab
	echo '* * * * * $HOME/bin/apply-dpms' | crontab  -
else
	(crontab -l | grep -v "apply-dpms" ; echo '* * * * * $HOME/bin/apply-dpms') | crontab  -
fi