summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-02-10 05:22:33 -0500
committerBen Sima <ben@bsima.me>2022-02-10 05:22:33 -0500
commita3507266f55ac85fed1fde0ac488344e9add29f8 (patch)
treee99d9e52dfc4b8fff0faf09a5782c94df8b37845 /sys
parent3105cbe35ffb97b03baca0b52b6057f4303fb9bc (diff)
two more fzf scripts: p and sys
Diffstat (limited to 'sys')
-rwxr-xr-xsys10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys b/sys
new file mode 100755
index 0000000..27be7fd
--- /dev/null
+++ b/sys
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+systemctl "$@" list-unit-files \
+ | tail -n +2 \
+ | head -n -2 \
+ | cut -d' ' -f1 \
+ | fzf \
+ --preview="systemctl $@ status {}" \
+ --preview-window "bottom,follow" \
+ --bind "alt-1:change-preview:systemctl $@ status {}" \
+ --bind "alt-2:change-preview:journalctl $@ -fu {}"