summaryrefslogtreecommitdiffstats
path: root/local/.bin/hornet
diff options
context:
space:
mode:
Diffstat (limited to 'local/.bin/hornet')
-rwxr-xr-xlocal/.bin/hornet/import11
-rwxr-xr-xlocal/.bin/hornet/svdisable10
-rwxr-xr-xlocal/.bin/hornet/svdn29
-rwxr-xr-xlocal/.bin/hornet/svget5
-rwxr-xr-xlocal/.bin/hornet/svkill6
-rwxr-xr-xlocal/.bin/hornet/svlog5
-rwxr-xr-xlocal/.bin/hornet/svre6
-rwxr-xr-xlocal/.bin/hornet/svst5
-rwxr-xr-xlocal/.bin/hornet/svstop6
-rwxr-xr-xlocal/.bin/hornet/svup6
10 files changed, 6 insertions, 83 deletions
diff --git a/local/.bin/hornet/import b/local/.bin/hornet/import
index 307d56b..ea4f1f2 100755
--- a/local/.bin/hornet/import
+++ b/local/.bin/hornet/import
@@ -1,10 +1,11 @@
#!/bin/sh
-for service in unclutter compton; do
- if svst $service; then
- svdn $service >/dev/null
- # shellcheck disable=SC2064
- trap "svup $service > /dev/null" EXIT
+services=""
+trap 'for service in $services; do systemctl --user start $service; done' EXIT
+for service in unclutter picom; do
+ if [ "$(systemctl --user show --property MainPID --value "$service")" != 0 ]; then
+ systemctl --user stop "$service"
+ services="$service $services"
fi
done
/usr/bin/import "$@"
diff --git a/local/.bin/hornet/svdisable b/local/.bin/hornet/svdisable
deleted file mode 100755
index 24f779f..0000000
--- a/local/.bin/hornet/svdisable
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-set -eu
-
-svc="$1"
-
-svdn "$svc"
-svdn "${svc}/log"
-svc -x ~/.services/enabled/"$svc"/log
-svc -x ~/.services/enabled/"$svc"
-rm -f ~/.services/enabled/"$svc"
diff --git a/local/.bin/hornet/svdn b/local/.bin/hornet/svdn
deleted file mode 100755
index 6687879..0000000
--- a/local/.bin/hornet/svdn
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svst "$1" || exit 0
-
-svstop "$1"
-svst "$1" || exit 0
-
-sleep 1
-
-svstop "$1"
-for _ in $(seq 1 5); do
- svst "$1" || exit 0
- sleep 1
-done
-svst "$1" || exit 0
-
-svstop "$1"
-for _ in $(seq 1 10); do
- svst "$1" || exit 0
- sleep 1
-done
-svst "$1" || exit 0
-
-svkill "$1"
-svst "$1" || exit 0
-
-exit 1
diff --git a/local/.bin/hornet/svget b/local/.bin/hornet/svget
deleted file mode 100755
index 0eab9bf..0000000
--- a/local/.bin/hornet/svget
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svstat "$HOME/.services/enabled/$1"
diff --git a/local/.bin/hornet/svkill b/local/.bin/hornet/svkill
deleted file mode 100755
index a84e1a2..0000000
--- a/local/.bin/hornet/svkill
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svc -k "$HOME/.services/enabled/$1"
-svget "$1"
diff --git a/local/.bin/hornet/svlog b/local/.bin/hornet/svlog
deleted file mode 100755
index 201ce9b..0000000
--- a/local/.bin/hornet/svlog
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-tail -F "$HOME/.log/$1/current" | tai64nlocal
diff --git a/local/.bin/hornet/svre b/local/.bin/hornet/svre
deleted file mode 100755
index 159b017..0000000
--- a/local/.bin/hornet/svre
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svdn "$1"
-svup "$1"
diff --git a/local/.bin/hornet/svst b/local/.bin/hornet/svst
deleted file mode 100755
index 4d0c6ce..0000000
--- a/local/.bin/hornet/svst
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svget "$1" | grep -q ": up ("
diff --git a/local/.bin/hornet/svstop b/local/.bin/hornet/svstop
deleted file mode 100755
index 649ec26..0000000
--- a/local/.bin/hornet/svstop
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svc -d "$HOME/.services/enabled/$1"
-svget "$1"
diff --git a/local/.bin/hornet/svup b/local/.bin/hornet/svup
deleted file mode 100755
index 3772fdb..0000000
--- a/local/.bin/hornet/svup
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-svc -u "$HOME/.services/enabled/$1"
-svget "$1"