This commit is contained in:
The-Repo-Club 2022-10-25 07:07:52 +01:00
parent cc61fddb8f
commit 2885c6eaa0
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
3 changed files with 54 additions and 7 deletions

Binary file not shown.

View File

@ -1,4 +1,25 @@
#!/usr/bin/env bash
#-*-coding:utf-8 -*-
#Auto updated?
# Yes
#File:
# pacsync
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github:
# https://github.com/The-Repo-Club/
#
#Created:
# Tue 25 October 2022, 07:04:14 AM [GMT+1]
#Modified:
# Tue 25 October 2022, 07:07:37 AM [GMT+1]
#
#Description:
# FZF menu for pacman yay or paru
#
#Dependencies:
# bash, pacman, yay, paru
#
# Dependencies:
# pacman, yay, fzf
@ -6,10 +27,11 @@ function go_pacman() {
cmd=$(pacman -Slq | fzf --prompt 'pacman> ' \
--header 'Install packages. CTRL+(Pacman/Aur/Installed/Quit)' \
--bind 'ctrl-p:change-prompt(pacman> )+reload(pacman -Slq)' \
--bind 'ctrl-a:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-y:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-r:change-prompt(paru> )+reload(paru -Slq)' \
--bind 'ctrl-i:change-prompt(inst> )+reload(yay -Qq)' \
--multi --height=80% --preview 'sleep 2; yay -Si {1}' \
--preview-window right) #| xargs -ro yay -S
--preview-window right) #| xargs -ro pacman -S
cmd=${cmd//$'\n'/ } # newline -> space
if [ -n "$cmd" ]; then
yay -S "$cmd"
@ -21,7 +43,8 @@ function go_yay() {
cmd=$(yay -Slq | fzf --prompt 'yay> ' \
--header 'Install packages. CTRL+(Pacman/Aur/Installed/Quit)' \
--bind 'ctrl-p:change-prompt(pacman> )+reload(pacman -Slq)' \
--bind 'ctrl-a:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-y:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-r:change-prompt(paru> )+reload(paru -Slq)' \
--bind 'ctrl-i:change-prompt(inst> )+reload(yay -Qq)' \
--multi --height=80% --preview 'sleep 2; yay -Si {1}' \
--preview-window right) #| xargs -ro yay -S
@ -32,14 +55,31 @@ function go_yay() {
exit
}
function go_installed() {
cmd=$(yay -Qq | fzf --prompt 'installed> ' \
function go_paru() {
cmd=$(paru -Slq | fzf --prompt 'paru> ' \
--header 'Install packages. CTRL+(Pacman/Aur/Installed/Quit)' \
--bind 'ctrl-p:change-prompt(pacman> )+reload(pacman -Slq)' \
--bind 'ctrl-a:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-y:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-r:change-prompt(paru> )+reload(paru -Slq)' \
--bind 'ctrl-i:change-prompt(inst> )+reload(yay -Qq)' \
--multi --height=80% --preview 'sleep 2; yay -Si {1}' \
--preview-window right) #| xargs -ro paru -S
cmd=${cmd//$'\n'/ } # newline -> space
if [ -n "$cmd" ]; then
yay -S "$cmd"
fi
exit
}
function go_installed() {
cmd=$(pacman -Qq | fzf --prompt 'installed> ' \
--header 'Install packages. CTRL+(Pacman/Aur/Installed/Quit)' \
--bind 'ctrl-p:change-prompt(pacman> )+reload(pacman -Slq)' \
--bind 'ctrl-y:change-prompt(yay> )+reload(yay -Slq)' \
--bind 'ctrl-r:change-prompt(paru> )+reload(paru -Slq)' \
--bind 'ctrl-i:change-prompt(installed> )+reload(yay -Qq)' \
--multi --height=80% --preview 'sleep 2; yay -Si {1}' \
--preview-window right) #| xargs -ro yay -S
--preview-window right) #| xargs -ro pacman -S
cmd=${cmd//$'\n'/ } # newline -> space
if [ -n "$cmd" ]; then
yay -S "$cmd"
@ -54,6 +94,9 @@ case $1 in
*yay)
go_yay
;;
*paru)
go_paru
;;
*installed)
go_installed
;;

View File

@ -16,6 +16,8 @@ clifm
cmusfetcher500
colorgrab
cutycapt
devour
downgrade
dracula-gtk-theme
dracula-icons
dracula-qt5-theme
@ -56,6 +58,7 @@ nerd-fonts-roboto-mono
nerd-fonts-source-code-pro
nvm
pacmanity
paru
pcurses
perl-checkupdates-aur
perl-www-aur
@ -118,3 +121,4 @@ yaru-session
yaru-sound-theme
yaru-unity-theme
yaru-xfwm4-theme
yay