34 lines
935 B
TOML
34 lines
935 B
TOML
[metadata]
|
|
name = "pkgs-apt"
|
|
description = "List and manage APT packages, including upgradable ones"
|
|
requirements = ["dpkg", "apt"]
|
|
|
|
[source]
|
|
command = [
|
|
"dpkg-query -W -f='${Package}\t${Version}\t${Status}\n' 2>/dev/null | grep 'install ok installed' | awk -F'\t' '{print $1, $2}'",
|
|
"apt-mark showmanual 2>/dev/null | sort -u",
|
|
"apt-get -s upgrade 2>/dev/null | grep -oP '^Inst \\K[^ ]+' | sort -u",
|
|
]
|
|
|
|
[preview]
|
|
command = "apt show '{split: :0}' 2>/dev/null"
|
|
|
|
[keybindings]
|
|
ctrl-u = "actions:upgrade"
|
|
ctrl-d = "actions:remove"
|
|
|
|
[actions.upgrade]
|
|
description = "Upgrade the selected package"
|
|
command = "sudo apt install --only-upgrade '{split: :0}'"
|
|
mode = "execute"
|
|
|
|
[actions.reinstall]
|
|
description = "Reinstall the selected package"
|
|
command = "sudo apt install --reinstall '{split: :0}'"
|
|
mode = "execute"
|
|
|
|
[actions.remove]
|
|
description = "Remove the selected package"
|
|
command = "sudo apt remove '{split: :0}'"
|
|
mode = "execute"
|