mirror of
https://github.com/prdlk/television.git
synced 2026-11-02 13:12:51 +00:00
49 lines
1.2 KiB
TOML
49 lines
1.2 KiB
TOML
[metadata]
|
|||
|
|
name = "systemd-units"
|
||
|
|
description = "List and manage systemd services"
|
||
|
|
requirements = ["systemctl"]
|
||
|
|
|
||
|
|
[source]
|
||
|
|
command = [
|
||
|
|
{ name = "Active", run = "systemctl list-units --type=service --no-pager --no-legend --plain" },
|
||
|
|
{ name = "All", run = "systemctl list-units --type=service --all --no-pager --no-legend --plain" },
|
||
|
|
]
|
||
|
|
display = "{split: :0}"
|
||
|
|
|
||
|
|
[preview]
|
||
|
|
command = "systemctl status '{split: :0}' --no-pager"
|
||
|
|
|
||
|
|
[ui]
|
||
|
|
layout = "portrait"
|
||
|
|
|
||
|
|
[keybindings]
|
||
|
|
ctrl-s = "actions:start"
|
||
|
|
f2 = "actions:stop"
|
||
|
|
ctrl-r = "actions:restart"
|
||
|
|
ctrl-e = "actions:enable"
|
||
|
|
ctrl-d = "actions:disable"
|
||
|
|
|
||
|
|
[actions.start]
|
||
|
|
description = "Start the selected service"
|
||
|
|
command = "sudo systemctl start '{split: :0}'"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.stop]
|
||
|
|
description = "Stop the selected service"
|
||
|
|
command = "sudo systemctl stop '{split: :0}'"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.restart]
|
||
|
|
description = "Restart the selected service"
|
||
|
|
command = "sudo systemctl restart '{split: :0}'"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.enable]
|
||
|
|
description = "Enable the selected service"
|
||
|
|
command = "sudo systemctl enable '{split: :0}'"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.disable]
|
||
|
|
description = "Disable the selected service"
|
||
|
|
command = "sudo systemctl disable '{split: :0}'"
|
||
|
|
mode = "execute"
|