#!/usr/bin/env bash systemctl "$@" list-unit-files \ | head -n -2 \ | fzf \ --layout=reverse \ --preview="systemctl $@ status {1}" \ --preview-window "bottom,follow" \ --header-first \ --header-lines 1 \ --header="alt-1: status, alt-2: logs" \ --bind "alt-1:change-preview:systemctl $@ status {1}" \ --bind "alt-2:change-preview:journalctl $@ -fu {1}"