From: Samir Benmendil Date: Tue, 11 Nov 2014 13:49:54 +0000 (+0000) Subject: systemd: add user units X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/689f510970b412e5202751cb10c3921a31448ebd systemd: add user units --- diff --git a/Makefile b/Makefile index 0344649..9ddf695 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ APATH := $(realpath .) FILES := bin DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp profile weechat xbindkeysrc Xresources xprofile zprofile zshrc -CONFIGFILES := aliases compton.conf git mimeo.conf mpd offlineimap ranger retroarch vim xkb zsh +CONFIGFILES := aliases compton.conf git mimeo.conf mpd offlineimap ranger retroarch systemd vim xkb zsh .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES) install: $(FILES) $(DOTFILES) $(CONFIGFILES) diff --git a/systemd/user/.gitignore b/systemd/user/.gitignore new file mode 100644 index 0000000..355164c --- /dev/null +++ b/systemd/user/.gitignore @@ -0,0 +1 @@ +*/ diff --git a/systemd/user/alarm.service b/systemd/user/alarm.service new file mode 100644 index 0000000..83ec855 --- /dev/null +++ b/systemd/user/alarm.service @@ -0,0 +1,9 @@ +[Unit] +Description=Alarm + +[Service] +Type=oneshot +ExecStart=/usr/bin/ponymix set-volume 100 +ExecStart=/usr/bin/mpc volume 60 +ExecStart=/usr/bin/mpc stop +ExecStart=/usr/bin/mpc play diff --git a/systemd/user/alarm.timer b/systemd/user/alarm.timer new file mode 100644 index 0000000..f1fb32b --- /dev/null +++ b/systemd/user/alarm.timer @@ -0,0 +1,6 @@ +[Unit] +Description=Alarm + +[Timer] +OnCalendar=09:30 +WakeSystem=true diff --git a/systemd/user/dropbox.service b/systemd/user/dropbox.service new file mode 100644 index 0000000..eeff128 --- /dev/null +++ b/systemd/user/dropbox.service @@ -0,0 +1,12 @@ +[Unit] +Description=Dropbox + +[Service] +Type=simple +ExecStart=/usr/bin/dropboxd +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure + +[Install] +WantedBy=default.target diff --git a/systemd/user/mpd.service b/systemd/user/mpd.service new file mode 100644 index 0000000..1d5875a --- /dev/null +++ b/systemd/user/mpd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Music Player Daemon +After=network.target sound.target + +[Service] +ExecStart=/usr/bin/mpd --no-daemon + +[Install] +WantedBy=default.target diff --git a/systemd/user/offlineimap.service b/systemd/user/offlineimap.service new file mode 100644 index 0000000..70824c7 --- /dev/null +++ b/systemd/user/offlineimap.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start offlineimap as a daemon + +[Service] +ExecStart=/usr/bin/offlineimap -u quiet +KillSignal=SIGUSR2 +Restart=always + +[Install] +WantedBy=multi-user.target