From 84ef21f2667c948ba929638091ed2eb9801650ee Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 20 Apr 2023 18:11:49 -0400 Subject: [PATCH] Start tracking systemd Units TODO: gamma.service should be the model for others. ie. Do not call distrobox-enter directly. Export the app/bin from the distrobox and just provide the arguments. --- systemd/gamma.service | 11 +++++++++++ systemd/sway-transparency.service | 15 +++++++++++++++ systemd/wallpapers.service | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 systemd/gamma.service create mode 100644 systemd/sway-transparency.service create mode 100644 systemd/wallpapers.service diff --git a/systemd/gamma.service b/systemd/gamma.service new file mode 100644 index 000000000..39278d600 --- /dev/null +++ b/systemd/gamma.service @@ -0,0 +1,11 @@ +[Unit] +Description=Inverting eInk contrast + +[Service] +#WorkingDirectory=/var/home/%u/.spool +ExecStart=/var/home/%u/.local/bin/wl-gammactl -c -1.000 -b 2.000 -g 0.500 -m DP-1 +Restart=always +TimeoutSec=5 + +[Install] +WantedBy=graphical.target diff --git a/systemd/sway-transparency.service b/systemd/sway-transparency.service new file mode 100644 index 000000000..725bca9cf --- /dev/null +++ b/systemd/sway-transparency.service @@ -0,0 +1,15 @@ +[Unit] +Description=Sway window transparency daemon +PartOf=graphical-session.target +After=sway.service + +[Service] +Type=simple +ExecStart=/var/home/jpm/scripts/sway/sway-transparency.py +Restart=unless-stopped +Requires=dbus.service +After=dbus.service +TimeoutSec=5 + +[Install] +WantedBy=default.target diff --git a/systemd/wallpapers.service b/systemd/wallpapers.service new file mode 100644 index 000000000..d1cea0ebd --- /dev/null +++ b/systemd/wallpapers.service @@ -0,0 +1,14 @@ +[Unit] +Description=Rotate through cropped wallpapers for %u + +[Service] +Type=forking +#PIDFile=/var/home/%u/.spool/wallpaper.pid +WorkingDirectory=/var/home/%u/.spool +ExecStart=/var/home/%u/scripts/distrobox/debian12/wallpaper.pl +#ExecStart=/var/home/%u/scripts/distrobox/debian12/wallpaper.pl -d --path=/home/jpm/wallpapers `cat /var/home/%u/.spool/wallpaper_outputs` +Restart=always +TimeoutSec=5 + +[Install] +WantedBy=graphical.target