From 813397c6c798f84c6ff8cd8bb41ea2e7d5b8300c Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 17 Apr 2025 08:43:53 +0200 Subject: [PATCH] add vcsh hooks --- .config/vcsh/hooks-available/systemd-user.update | 6 ++++++ .config/vcsh/hooks-enabled/post-clone.systemd-user-update | 1 + .config/vcsh/hooks-enabled/post-enter.systemd-user-update | 1 + .config/vcsh/hooks-enabled/post-pull.systemd-user-update | 1 + .config/vcsh/hooks-enabled/post-run.systemd-user-update | 1 + .gitignore.d/systemd | 5 +++++ 6 files changed, 15 insertions(+) create mode 100755 .config/vcsh/hooks-available/systemd-user.update create mode 120000 .config/vcsh/hooks-enabled/post-clone.systemd-user-update create mode 120000 .config/vcsh/hooks-enabled/post-enter.systemd-user-update create mode 120000 .config/vcsh/hooks-enabled/post-pull.systemd-user-update create mode 120000 .config/vcsh/hooks-enabled/post-run.systemd-user-update diff --git a/.config/vcsh/hooks-available/systemd-user.update b/.config/vcsh/hooks-available/systemd-user.update new file mode 100755 index 0000000..3e949fc --- /dev/null +++ b/.config/vcsh/hooks-available/systemd-user.update @@ -0,0 +1,6 @@ +#!/bin/sh + +cd ${XDG_CONFIG_DIR:-~/.config}/systemd/user +git ls-files . | grep -q . || exit 0 +echo Triggering systemd-user daemon reload… >&2 +systemctl --user daemon-reload diff --git a/.config/vcsh/hooks-enabled/post-clone.systemd-user-update b/.config/vcsh/hooks-enabled/post-clone.systemd-user-update new file mode 120000 index 0000000..8590d5d --- /dev/null +++ b/.config/vcsh/hooks-enabled/post-clone.systemd-user-update @@ -0,0 +1 @@ +../hooks-available/systemd-user.update \ No newline at end of file diff --git a/.config/vcsh/hooks-enabled/post-enter.systemd-user-update b/.config/vcsh/hooks-enabled/post-enter.systemd-user-update new file mode 120000 index 0000000..8590d5d --- /dev/null +++ b/.config/vcsh/hooks-enabled/post-enter.systemd-user-update @@ -0,0 +1 @@ +../hooks-available/systemd-user.update \ No newline at end of file diff --git a/.config/vcsh/hooks-enabled/post-pull.systemd-user-update b/.config/vcsh/hooks-enabled/post-pull.systemd-user-update new file mode 120000 index 0000000..8590d5d --- /dev/null +++ b/.config/vcsh/hooks-enabled/post-pull.systemd-user-update @@ -0,0 +1 @@ +../hooks-available/systemd-user.update \ No newline at end of file diff --git a/.config/vcsh/hooks-enabled/post-run.systemd-user-update b/.config/vcsh/hooks-enabled/post-run.systemd-user-update new file mode 120000 index 0000000..8590d5d --- /dev/null +++ b/.config/vcsh/hooks-enabled/post-run.systemd-user-update @@ -0,0 +1 @@ +../hooks-available/systemd-user.update \ No newline at end of file diff --git a/.gitignore.d/systemd b/.gitignore.d/systemd index 442f4b0..7751a55 100644 --- a/.gitignore.d/systemd +++ b/.gitignore.d/systemd @@ -1,5 +1,10 @@ * !/.config/systemd/user/.gitignore +!/.config/vcsh/hooks-available/systemd-user.update +!/.config/vcsh/hooks-enabled/post-clone.systemd-user-update +!/.config/vcsh/hooks-enabled/post-enter.systemd-user-update +!/.config/vcsh/hooks-enabled/post-pull.systemd-user-update +!/.config/vcsh/hooks-enabled/post-run.systemd-user-update !/.gitignore.d/systemd !/.zsh/aliases/sc !/.zsh/aliases/scu -- 2.39.5