feat: add bash configs

This commit is contained in:
hhhh hgfh 2026-09-17 16:55:04 +03:00
parent fd258a4df3
commit 6ee9a85ca1
7 changed files with 275 additions and 0 deletions

27
bash/systemd.bash Normal file
View file

@ -0,0 +1,27 @@
set-scope() {
local scope="${1:-default-scope}"
systemd-run \
--user \
--scope \
--unit="$scope" \
bash
}
check-scope() {
local scope="${1:-default-scope}"
systemctl --user status "$scope.scope"
}
shtop() {
local scope="${1:-default-scope.scope}"
local cg
cg=$(systemctl --user show \
"$scope" \
-p ControlGroup \
--value) || return
htop -p "$(paste -sd, "/sys/fs/cgroup${cg}/cgroup.procs")"
}