From bc4be96cb132e5cf86cf6f688d62d4d4bc437f8d Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 17 Jun 2020 21:33:58 +0200 Subject: [PATCH] added pacman scripts --- .local/share/scripts/pacman-browse.sh | 2 ++ .local/share/scripts/pacman-install.sh | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100755 .local/share/scripts/pacman-browse.sh create mode 100755 .local/share/scripts/pacman-install.sh diff --git a/.local/share/scripts/pacman-browse.sh b/.local/share/scripts/pacman-browse.sh new file mode 100755 index 0000000..57bfaf7 --- /dev/null +++ b/.local/share/scripts/pacman-browse.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +comm -23 <(pacman -Qqe | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u) | fzf --preview 'pacman -Qil {}' --bind 'enter:execute(pacman -Qil {} | less)' diff --git a/.local/share/scripts/pacman-install.sh b/.local/share/scripts/pacman-install.sh new file mode 100755 index 0000000..bf2b9c9 --- /dev/null +++ b/.local/share/scripts/pacman-install.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +PKG=$(pacman -Slq | fzf --preview 'pacman -Si {1}') +if [ -n "$PKG" ]; then + sudo pacman -S "$PKG" +fi +