From 30c44f676e69615bffab5efb42e582c5fca78e4b Mon Sep 17 00:00:00 2001 From: Nick Boughton Date: Wed, 9 Dec 2020 23:07:53 +0000 Subject: [PATCH] removed home path hardcode from service files --- README.md | 1 - waybar/modules/aur-vcheck/vcheck.service | 6 +++--- waybar/modules/updates/updates.service | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a099da1..f2f7d25 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ If you want to use the custom/pacman module you'll need Go and Yay installed. Yo * ````mkdir -p ~/tmp```` as this is where I output the json data that is polled by the waybar config * Symlink the updates.timer and updates.service files from waybar/modules/updates/ into ~/.config/systemd/user -* Fix the paths in the .service file for your home directory * Run ````systemctl --user daemon-reload```` * Run ````systemctl --user enable updates.timer```` diff --git a/waybar/modules/aur-vcheck/vcheck.service b/waybar/modules/aur-vcheck/vcheck.service index c69caf4..9538691 100644 --- a/waybar/modules/aur-vcheck/vcheck.service +++ b/waybar/modules/aur-vcheck/vcheck.service @@ -3,7 +3,7 @@ Description=Check for new upstream AUR versions of maintained NPM packages [Service] Type=oneshot -WorkingDirectory=/home/nick/.config/waybar/modules/aur-vcheck +WorkingDirectory=%h/.config/waybar/modules/aur-vcheck Environment=DISPLAY=:0.0 -Environment=XAUTHORITY=/home/nick/.Xauthority -ExecStart=go run /home/nick/.config/waybar/modules/aur-vcheck/aur-vcheck.go /home/nick/.config/waybar/modules/aur-vcheck/config.json \ No newline at end of file +Environment=XAUTHORITY=%h/.Xauthority +ExecStart=go run %h/.config/waybar/modules/aur-vcheck/aur-vcheck.go %h/.config/waybar/modules/aur-vcheck/config.json \ No newline at end of file diff --git a/waybar/modules/updates/updates.service b/waybar/modules/updates/updates.service index 8b5a3b7..d4a684e 100644 --- a/waybar/modules/updates/updates.service +++ b/waybar/modules/updates/updates.service @@ -3,5 +3,5 @@ Description=Check for Pacman and AUR/git package updates [Service] Type=oneshot -WorkingDirectory=/home/nick/.config/waybar/modules/updates -ExecStart=go run /home/nick/.config/waybar/modules/updates/update-check.go \ No newline at end of file +WorkingDirectory=%h/.config/waybar/modules/updates +ExecStart=go run %h/.config/waybar/modules/updates/update-check.go \ No newline at end of file