From ab3ebdd18c6dc48776577a75a3c2f500ddcf7b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Aug 2014 08:25:02 +0200 Subject: [PATCH] use new xorg.socket stuff --- user/app@.service | 8 -------- user/autotrash.service | 9 --------- user/chromium.service | 4 ++++ user/clean-music-library.service | 9 --------- user/copyq.service | 6 +++++- user/cron-daily.target.wants/gpo.service | 1 - user/cron-weekly.target.wants/autotrash.service | 1 - user/default.target | 2 -- user/default.target.wants/mpdstated.service | 1 - user/default.target.wants/rsync-upload.path | 1 - user/dropbox-backup.service | 12 ------------ user/dropbox.service | 6 +++++- user/dunst.service | 10 ++++++++++ user/environment.target | 3 --- user/evolution.service | 9 +++++++++ user/gajim-sleep.service | 13 ------------- user/gajim.service | 9 +++++++++ user/gnome-encfs.service | 6 ------ user/gnome-keyring.service | 10 ---------- user/gpo.service | 13 ------------- user/i3.service | 11 +++++++++++ user/mpd.service | 3 --- user/mpd.socket | 5 ++--- user/mpdstated.service | 10 ---------- user/mystuff.target | 6 ++++++ user/mystuff.target.wants/chromium.service | 1 + user/mystuff.target.wants/copyq.service | 1 + user/mystuff.target.wants/dropbox.service | 1 + user/mystuff.target.wants/dunst.service | 1 + user/mystuff.target.wants/evolution.service | 1 + user/mystuff.target.wants/gajim.service | 1 + user/mystuff.target.wants/pulseaudio.service | 1 + user/mystuff.target.wants/setxkbmap.service | 1 + user/mystuff.target.wants/xrdb.service | 1 + user/mystuff.target.wants/xset.service | 1 + user/offlineimap.service | 10 ---------- user/pcmanfm-deamon.service | 5 ----- user/pulseaudio.service | 5 ++--- user/rsync-upload.path | 6 ------ user/rsync-upload.service | 8 -------- user/setxkbmap.service | 11 +++++++++++ .../mpd.socket | 0 user/tmux.service | 12 ------------ user/wm.target | 9 +++++++++ user/xmodmap.service | 11 +++++++++++ user/xorg.target | 10 ++++++++++ user/xorg.target.wants/xorg@0.socket | 1 + user/xorg@.service | 11 +++++++++++ user/xorg@.socket | 8 ++++++++ user/xrdb.service | 11 +++++++++++ user/xset.service | 11 +++++++++++ 51 files changed, 156 insertions(+), 151 deletions(-) delete mode 100644 user/app@.service delete mode 100644 user/autotrash.service delete mode 100644 user/clean-music-library.service delete mode 120000 user/cron-daily.target.wants/gpo.service delete mode 120000 user/cron-weekly.target.wants/autotrash.service delete mode 100644 user/default.target delete mode 120000 user/default.target.wants/mpdstated.service delete mode 120000 user/default.target.wants/rsync-upload.path delete mode 100644 user/dropbox-backup.service create mode 100644 user/dunst.service delete mode 100644 user/environment.target create mode 100644 user/evolution.service delete mode 100644 user/gajim-sleep.service create mode 100644 user/gajim.service delete mode 100644 user/gnome-encfs.service delete mode 100644 user/gnome-keyring.service delete mode 100644 user/gpo.service create mode 100644 user/i3.service delete mode 100644 user/mpdstated.service create mode 100644 user/mystuff.target create mode 120000 user/mystuff.target.wants/chromium.service create mode 120000 user/mystuff.target.wants/copyq.service create mode 120000 user/mystuff.target.wants/dropbox.service create mode 120000 user/mystuff.target.wants/dunst.service create mode 120000 user/mystuff.target.wants/evolution.service create mode 120000 user/mystuff.target.wants/gajim.service create mode 120000 user/mystuff.target.wants/pulseaudio.service create mode 120000 user/mystuff.target.wants/setxkbmap.service create mode 120000 user/mystuff.target.wants/xrdb.service create mode 120000 user/mystuff.target.wants/xset.service delete mode 100644 user/offlineimap.service delete mode 100644 user/pcmanfm-deamon.service delete mode 100644 user/rsync-upload.path delete mode 100644 user/rsync-upload.service create mode 100644 user/setxkbmap.service rename user/{default.target.wants => sockets.target.wants}/mpd.socket (100%) delete mode 100644 user/tmux.service create mode 100644 user/wm.target create mode 100644 user/xmodmap.service create mode 100644 user/xorg.target create mode 120000 user/xorg.target.wants/xorg@0.socket create mode 100644 user/xorg@.service create mode 100644 user/xorg@.socket create mode 100644 user/xrdb.service create mode 100644 user/xset.service diff --git a/user/app@.service b/user/app@.service deleted file mode 100644 index e9caef4..0000000 --- a/user/app@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Application "%i" -After=environment.target -IgnoreOnIsolate=yes - -[Service] -ExecStart=/usr/bin/env %i -KillMode=process diff --git a/user/autotrash.service b/user/autotrash.service deleted file mode 100644 index 8ca2c22..0000000 --- a/user/autotrash.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Automatic Trash cleanup - -[Service] -Type=oneshot -ExecStart=/usr/bin/autotrash --days=14 - -[Install] -WantedBy=cron-weekly.target diff --git a/user/chromium.service b/user/chromium.service index 8a314fb..0112108 100644 --- a/user/chromium.service +++ b/user/chromium.service @@ -2,4 +2,8 @@ Description=Chromium [Service] +Environment=DISPLAY=:0 ExecStart=/usr/bin/chromium + +[Install] +WantedBy=mystuff.target diff --git a/user/clean-music-library.service b/user/clean-music-library.service deleted file mode 100644 index 7fb8520..0000000 --- a/user/clean-music-library.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Clean Empty folder / Deadlinks - -[Service] -Type=oneshot -ExecStart=/home/joerg/bin/clean-music-library.rb - -[Install] -WantedBy=timer-daily.target diff --git a/user/copyq.service b/user/copyq.service index 9987af5..7241687 100644 --- a/user/copyq.service +++ b/user/copyq.service @@ -1,5 +1,9 @@ [Unit] -Description=handle clipboards +Description=Evolution [Service] +Environment=DISPLAY=:0 ExecStart=/usr/bin/copyq + +[Install] +WantedBy=mystuff.target diff --git a/user/cron-daily.target.wants/gpo.service b/user/cron-daily.target.wants/gpo.service deleted file mode 120000 index 3b5ab00..0000000 --- a/user/cron-daily.target.wants/gpo.service +++ /dev/null @@ -1 +0,0 @@ -/home/joerg/.config/systemd/user/gpo.service \ No newline at end of file diff --git a/user/cron-weekly.target.wants/autotrash.service b/user/cron-weekly.target.wants/autotrash.service deleted file mode 120000 index b6c9c42..0000000 --- a/user/cron-weekly.target.wants/autotrash.service +++ /dev/null @@ -1 +0,0 @@ -/home/joerg/.config/systemd/user/autotrash.service \ No newline at end of file diff --git a/user/default.target b/user/default.target deleted file mode 100644 index eb3844f..0000000 --- a/user/default.target +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Description=Target which is executed at startup diff --git a/user/default.target.wants/mpdstated.service b/user/default.target.wants/mpdstated.service deleted file mode 120000 index 68c293b..0000000 --- a/user/default.target.wants/mpdstated.service +++ /dev/null @@ -1 +0,0 @@ -/home/joerg/.config/systemd/user/mpdstated.service \ No newline at end of file diff --git a/user/default.target.wants/rsync-upload.path b/user/default.target.wants/rsync-upload.path deleted file mode 120000 index d6f683a..0000000 --- a/user/default.target.wants/rsync-upload.path +++ /dev/null @@ -1 +0,0 @@ -/home/joerg/.config/systemd/user/rsync-upload.path \ No newline at end of file diff --git a/user/dropbox-backup.service b/user/dropbox-backup.service deleted file mode 100644 index 2ed9f60..0000000 --- a/user/dropbox-backup.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Backup to Dropbox - -[Service] -Type=oneshot -Nice=19 -IOSchedulingClass=2 -IOSchedulingPriority=7 -ExecStart=/usr/bin/yaourt -B %h/Backup/pacman/ - -[Install] -WantedBy=timer-weekly.target diff --git a/user/dropbox.service b/user/dropbox.service index f6fa095..ee94ba3 100644 --- a/user/dropbox.service +++ b/user/dropbox.service @@ -1,5 +1,9 @@ [Unit] -Description=Dropbox Network Storage Daemon +Description=Dropbox [Service] +Environment=DISPLAY=:0 ExecStart=/usr/bin/dropboxd + +[Install] +WantedBy=mystuff.target diff --git a/user/dunst.service b/user/dunst.service new file mode 100644 index 0000000..6e0b620 --- /dev/null +++ b/user/dunst.service @@ -0,0 +1,10 @@ +[Unit] +Description=small notification daemon +After=dbus.socket + +[Service] +Environment=DISPLAY=:0 +ExecStart=/usr/bin/dunst + +[Install] +WantedBy=mystuff.target diff --git a/user/environment.target b/user/environment.target deleted file mode 100644 index 6a43a49..0000000 --- a/user/environment.target +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Description=Set session environment variables -IgnoreOnIsolate=true diff --git a/user/evolution.service b/user/evolution.service new file mode 100644 index 0000000..3a042cd --- /dev/null +++ b/user/evolution.service @@ -0,0 +1,9 @@ +[Unit] +Description=Evolution + +[Service] +Environment=DISPLAY=:0 +ExecStart=/usr/bin/evolution + +[Install] +WantedBy=mystuff.target diff --git a/user/gajim-sleep.service b/user/gajim-sleep.service deleted file mode 100644 index 6a9fafe..0000000 --- a/user/gajim-sleep.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Suspend Gajim -Before=sleep.target -StopWhenUnneeded=yes - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=-/usr/bin/gajim-remote change_status offline -ExecStop=-/usr/bin/gajim-remote change_status online - -[Install] -WantedBy=sleep.target diff --git a/user/gajim.service b/user/gajim.service new file mode 100644 index 0000000..79c90d3 --- /dev/null +++ b/user/gajim.service @@ -0,0 +1,9 @@ +[Unit] +Description=Gajim + +[Service] +Environment=DISPLAY=:0 +ExecStart=/usr/bin/gajim + +[Install] +WantedBy=mystuff.target diff --git a/user/gnome-encfs.service b/user/gnome-encfs.service deleted file mode 100644 index ff2b43d..0000000 --- a/user/gnome-encfs.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Mount encfs with gnome keyring -After=gnome-keyring.service - -[Service] -ExecStart=/usr/bin/gnome-encfs --mount diff --git a/user/gnome-keyring.service b/user/gnome-keyring.service deleted file mode 100644 index 7504598..0000000 --- a/user/gnome-keyring.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=GNOME Keyring Daemon -Wants=environment.target -Before=environment.target -IgnoreOnIsolate=true - -[Service] -Type=oneshot -ExecStart=/bin/sh -c 'test "$GNOME_KEYRING_CONTROL" && systemctl --user set-environment $(gnome-keyring-daemon --start)' -RemainAfterExit=true diff --git a/user/gpo.service b/user/gpo.service deleted file mode 100644 index 41eec6b..0000000 --- a/user/gpo.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Automatic Gpodder download - -[Service] -Type=oneshot -Nice=19 -IOSchedulingClass=2 -IOSchedulingPriority=7 -ExecStart=/usr/bin/gpo update -ExecStart=/usr/bin/gpo download - -[Install] -WantedBy=cron-daily.target diff --git a/user/i3.service b/user/i3.service new file mode 100644 index 0000000..9621664 --- /dev/null +++ b/user/i3.service @@ -0,0 +1,11 @@ +[Unit] +Description=An improved dynamic tiling window manager +After=xorg.target + +[Service] +Environment=DISPLAY=:0 +ExecStart=/usr/bin/i3 +Restart=on-failure + +[Install] +WantedBy=wm.target diff --git a/user/mpd.service b/user/mpd.service index c2ee8e7..b89bc65 100644 --- a/user/mpd.service +++ b/user/mpd.service @@ -3,6 +3,3 @@ Description=Music Player Daemon [Service] ExecStart=/usr/bin/mpd --no-daemon - -[Install] -WantedBy=default.target diff --git a/user/mpd.socket b/user/mpd.socket index 52bc762..1875980 100644 --- a/user/mpd.socket +++ b/user/mpd.socket @@ -1,9 +1,8 @@ [Unit] -Description=Music Player Daemon socket +Description=Music Player Daemon Sockets [Socket] ListenStream=6600 -Service=mpd.service [Install] -WantedBy=default.target +WantedBy=sockets.target diff --git a/user/mpdstated.service b/user/mpdstated.service deleted file mode 100644 index 6567b9a..0000000 --- a/user/mpdstated.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Watch mpd state -Requires=mpd.service -After=mpd.service - -[Service] -ExecStart=/usr/bin/mpdstated --no-daemon - -[Install] -WantedBy=default.target diff --git a/user/mystuff.target b/user/mystuff.target new file mode 100644 index 0000000..a3cdf2e --- /dev/null +++ b/user/mystuff.target @@ -0,0 +1,6 @@ +[Unit] +Description=Xinitrc Stuff +#After=xorg.target + +[Install] +Alias=default.target diff --git a/user/mystuff.target.wants/chromium.service b/user/mystuff.target.wants/chromium.service new file mode 120000 index 0000000..706b64a --- /dev/null +++ b/user/mystuff.target.wants/chromium.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/chromium.service \ No newline at end of file diff --git a/user/mystuff.target.wants/copyq.service b/user/mystuff.target.wants/copyq.service new file mode 120000 index 0000000..a48f72c --- /dev/null +++ b/user/mystuff.target.wants/copyq.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/copyq.service \ No newline at end of file diff --git a/user/mystuff.target.wants/dropbox.service b/user/mystuff.target.wants/dropbox.service new file mode 120000 index 0000000..ce42784 --- /dev/null +++ b/user/mystuff.target.wants/dropbox.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/dropbox.service \ No newline at end of file diff --git a/user/mystuff.target.wants/dunst.service b/user/mystuff.target.wants/dunst.service new file mode 120000 index 0000000..5c4abcf --- /dev/null +++ b/user/mystuff.target.wants/dunst.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/dunst.service \ No newline at end of file diff --git a/user/mystuff.target.wants/evolution.service b/user/mystuff.target.wants/evolution.service new file mode 120000 index 0000000..4e2ea2f --- /dev/null +++ b/user/mystuff.target.wants/evolution.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/evolution.service \ No newline at end of file diff --git a/user/mystuff.target.wants/gajim.service b/user/mystuff.target.wants/gajim.service new file mode 120000 index 0000000..2175182 --- /dev/null +++ b/user/mystuff.target.wants/gajim.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/gajim.service \ No newline at end of file diff --git a/user/mystuff.target.wants/pulseaudio.service b/user/mystuff.target.wants/pulseaudio.service new file mode 120000 index 0000000..deaea97 --- /dev/null +++ b/user/mystuff.target.wants/pulseaudio.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/pulseaudio.service \ No newline at end of file diff --git a/user/mystuff.target.wants/setxkbmap.service b/user/mystuff.target.wants/setxkbmap.service new file mode 120000 index 0000000..d0348f5 --- /dev/null +++ b/user/mystuff.target.wants/setxkbmap.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/setxkbmap.service \ No newline at end of file diff --git a/user/mystuff.target.wants/xrdb.service b/user/mystuff.target.wants/xrdb.service new file mode 120000 index 0000000..e50dd92 --- /dev/null +++ b/user/mystuff.target.wants/xrdb.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/xrdb.service \ No newline at end of file diff --git a/user/mystuff.target.wants/xset.service b/user/mystuff.target.wants/xset.service new file mode 120000 index 0000000..6d26b1d --- /dev/null +++ b/user/mystuff.target.wants/xset.service @@ -0,0 +1 @@ +/home/joerg/.config/systemd/user/xset.service \ No newline at end of file diff --git a/user/offlineimap.service b/user/offlineimap.service deleted file mode 100644 index f3189a5..0000000 --- a/user/offlineimap.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Start offlineimap as a daemon - -[Service] -ExecStart=/usr/bin/offlineimap -KillSignal=SIGUSR2 -Restart=always - -[Install] -WantedBy=default.target diff --git a/user/pcmanfm-deamon.service b/user/pcmanfm-deamon.service deleted file mode 100644 index e10526b..0000000 --- a/user/pcmanfm-deamon.service +++ /dev/null @@ -1,5 +0,0 @@ -[Unit] -Description=Dropbox Network Storage Daemon - -[Service] -ExecStart=/usr/bin/pcmanfm --daemon-mode diff --git a/user/pulseaudio.service b/user/pulseaudio.service index 3ecafbc..0b99e85 100644 --- a/user/pulseaudio.service +++ b/user/pulseaudio.service @@ -1,11 +1,10 @@ [Unit] Description=PulseAudio Sound System -Before=sound.target [Service] BusName=org.pulseaudio.Server ExecStart=/usr/bin/pulseaudio -Restart=always +Restart=on-failure [Install] -WantedBy=default.target +WantedBy=mystuff.target diff --git a/user/rsync-upload.path b/user/rsync-upload.path deleted file mode 100644 index d5076e9..0000000 --- a/user/rsync-upload.path +++ /dev/null @@ -1,6 +0,0 @@ -[Path] -PathChanged=/home/joerg/upload -MakeDirectory=yes - -[Install] -WantedBy=default.target diff --git a/user/rsync-upload.service b/user/rsync-upload.service deleted file mode 100644 index cf99580..0000000 --- a/user/rsync-upload.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Rsync Server Upload - -[Service] -ExecStart=/home/joerg/bin/upload - -[Install] -WantedBy=mystuff.target diff --git a/user/setxkbmap.service b/user/setxkbmap.service new file mode 100644 index 0000000..6e5a201 --- /dev/null +++ b/user/setxkbmap.service @@ -0,0 +1,11 @@ +[Unit] +Description=Enable zapping +After=xorg.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=setxkbmap -option terminate:ctrl_alt_bksp + +[Install] +WantedBy=mystuff.target diff --git a/user/default.target.wants/mpd.socket b/user/sockets.target.wants/mpd.socket similarity index 100% rename from user/default.target.wants/mpd.socket rename to user/sockets.target.wants/mpd.socket diff --git a/user/tmux.service b/user/tmux.service deleted file mode 100644 index 202edca..0000000 --- a/user/tmux.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Tmux Server - -[Service] -Type=forking -RemainAfterExit=yes -ExecStart=/usr/bin/tmux new-session -d -s %u -ExecStop=/usr/bin/tmux kill-session -t %u -Restart=Always - -[Install] -WantedBy=default.target diff --git a/user/wm.target b/user/wm.target new file mode 100644 index 0000000..cbdc176 --- /dev/null +++ b/user/wm.target @@ -0,0 +1,9 @@ +[Unit] +Description=Window Manager +Wants=xorg.target +Wants=mystuff.target +Requires=dbus.socket +AllowIsolate=true + +[Install] +Alias=default.target diff --git a/user/xmodmap.service b/user/xmodmap.service new file mode 100644 index 0000000..36c7fe9 --- /dev/null +++ b/user/xmodmap.service @@ -0,0 +1,11 @@ +[Unit] +Description=Capslock is escape +After=xorg.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' + +[Install] +WantedBy=mystuff.target diff --git a/user/xorg.target b/user/xorg.target new file mode 100644 index 0000000..d4dede5 --- /dev/null +++ b/user/xorg.target @@ -0,0 +1,10 @@ +# +# X server target +# + +# xorg.target is a virtual target - it becomes active as soon as Xorg +# is ready to accept incoming connections. If your service requires +# Xorg to be ready, include 'After=xorg.target' in your service file. + +[Unit] +Description=The basic Xorg server diff --git a/user/xorg.target.wants/xorg@0.socket b/user/xorg.target.wants/xorg@0.socket new file mode 120000 index 0000000..87b1062 --- /dev/null +++ b/user/xorg.target.wants/xorg@0.socket @@ -0,0 +1 @@ +xorg@.socket \ No newline at end of file diff --git a/user/xorg@.service b/user/xorg@.service new file mode 100644 index 0000000..343db2a --- /dev/null +++ b/user/xorg@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Xorg server at display %i + +Requires=xorg@%i.socket +After=xorg@%i.socket + +[Service] +Type=simple +SuccessExitStatus=0 1 + +ExecStart=/usr/bin/Xorg :%i -nolisten tcp -noreset -verbose 2 vt1 diff --git a/user/xorg@.socket b/user/xorg@.socket new file mode 100644 index 0000000..c667cce --- /dev/null +++ b/user/xorg@.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Socket for xorg at display %i + +[Socket] +ListenStream=/tmp/.X11-unix/X%i + +[Install] +WantedBy=xorg.target diff --git a/user/xrdb.service b/user/xrdb.service new file mode 100644 index 0000000..d1d388a --- /dev/null +++ b/user/xrdb.service @@ -0,0 +1,11 @@ +[Unit] +Description=Capslock is escape +After=xorg.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/xrdb -merge %h/.Xresources + +[Install] +WantedBy=mystuff.target diff --git a/user/xset.service b/user/xset.service new file mode 100644 index 0000000..a8aabf9 --- /dev/null +++ b/user/xset.service @@ -0,0 +1,11 @@ +[Unit] +Description=Xorg Blanking +After=xorg.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/xset -b +dpms 0 0 300 + +[Install] +WantedBy=mystuff.target