aboutsummaryrefslogtreecommitdiffstats
path: root/basics/.config/systemd/user
diff options
context:
space:
mode:
Diffstat (limited to 'basics/.config/systemd/user')
-rw-r--r--basics/.config/systemd/user/battery-monitor.service13
-rw-r--r--basics/.config/systemd/user/emacs.service13
-rw-r--r--basics/.config/systemd/user/ssh-agent.service10
3 files changed, 36 insertions, 0 deletions
diff --git a/basics/.config/systemd/user/battery-monitor.service b/basics/.config/systemd/user/battery-monitor.service
new file mode 100644
index 0000000..c672ac5
--- /dev/null
+++ b/basics/.config/systemd/user/battery-monitor.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Battery Monitor
+
+[Service]
+Type=simple
+Environment=DISPLAY=:0
+Environment=XAUTHORITY=%h/.Xauthority
+ExecStart=/bin/bash %h/.bin/battery-monitor
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=default.target
diff --git a/basics/.config/systemd/user/emacs.service b/basics/.config/systemd/user/emacs.service
new file mode 100644
index 0000000..f3d7df9
--- /dev/null
+++ b/basics/.config/systemd/user/emacs.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Emacs text editor
+Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/emacs --fg-daemon
+ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
+Environment=SSH_AUTH_SOCK=%t/keyring/ssh
+Restart=on-failure
+
+[Install]
+WantedBy=default.target
diff --git a/basics/.config/systemd/user/ssh-agent.service b/basics/.config/systemd/user/ssh-agent.service
new file mode 100644
index 0000000..9428410
--- /dev/null
+++ b/basics/.config/systemd/user/ssh-agent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH key agent
+
+[Service]
+Type=simple
+Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+
+[Install]
+WantedBy=default.target