]> git.rmz.io Git - dotfiles.git/commitdiff
systemd: add user units
authorSamir Benmendil <samir.benmendil@gmail.com>
Tue, 11 Nov 2014 13:49:54 +0000 (13:49 +0000)
committerSamir Benmendil <samir.benmendil@gmail.com>
Tue, 11 Nov 2014 13:52:55 +0000 (13:52 +0000)
Makefile
systemd/user/.gitignore [new file with mode: 0644]
systemd/user/alarm.service [new file with mode: 0644]
systemd/user/alarm.timer [new file with mode: 0644]
systemd/user/dropbox.service [new file with mode: 0644]
systemd/user/mpd.service [new file with mode: 0644]
systemd/user/offlineimap.service [new file with mode: 0644]

index 03446499bed398dc56fe17c2266133b9bfa0eceb..9ddf69571e4795ef86b466bd45a6f192ab3fcf11 100644 (file)
--- 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 (file)
index 0000000..355164c
--- /dev/null
@@ -0,0 +1 @@
+*/
diff --git a/systemd/user/alarm.service b/systemd/user/alarm.service
new file mode 100644 (file)
index 0000000..83ec855
--- /dev/null
@@ -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 (file)
index 0000000..f1fb32b
--- /dev/null
@@ -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 (file)
index 0000000..eeff128
--- /dev/null
@@ -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 (file)
index 0000000..1d5875a
--- /dev/null
@@ -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 (file)
index 0000000..70824c7
--- /dev/null
@@ -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