Skip to content

ConnerWill/yayfzf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

493 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yayfzf

Fullscreen interactive AUR / repo package manager using yay and fzf

Shellcheck GitHub last commit GitHub issues GitHub repo size GitHub top language GitHub language count License GitHub Release Version AUR Version GitLab

Description

yayfzf is a fullscreen interactive package manager for Arch Linux systems.

It uses yay for package operations and fzf for searching, selecting, installing, removing, and updating packages.

Table of Contents

Screenshots

demo screenshot demo screenshot 2
demo screenshot 3 demo screenshot 4

Features

  • Interactive menu for Arch Linux package management
  • Package search using yay
  • Package selection using fzf
  • Install, remove, and update packages
  • Inline package information preview
  • Multi-select support
  • Toggleable package preview window
  • Built-in color themes
  • Interactive theme selector
  • Configurable layout, border, prompt, preview window, and sort order
  • XDG-compliant configuration file support
  • Bash and Zsh completion support

Requirements

  • bash
  • yay
  • fzf
  • awk
  • sed
  • tr
  • tput

Installation

AUR

yay -S yayfzf

Git

Clone the repository and make the script executable:

git clone https://github.com/connerwill/yayfzf.git
cd yayfzf
chmod +x bin/yayfzf

Optionally, install the executable, documentation, man page, license, and shell completions:

sudo install -Dm755 "bin/yayfzf" "/usr/local/bin/yayfzf"
sudo install -Dm644 "docs/README.md" "/usr/share/doc/yayfzf/README.md"
sudo install -Dm644 "docs/yayfzf.1" "/usr/share/man/man1/yayfzf.1"
sudo install -Dm644 "LICENSE" "/usr/share/licenses/yayfzf/LICENSE"
sudo install -Dm644 "completion/_yayfzf" "/usr/share/zsh/site-functions/_yayfzf"
sudo install -Dm644 "completion/yayfzf_completion.sh" "/usr/share/bash-completion/completions/yayfzf"

Usage

Launch the interactive interface:

yayfzf

Start with an initial package search query:

yayfzf fzf

Command Line Options

Option Description
--sort-by [sort option] Set package search sort order
--no-preview Disable package preview window
-t, --theme [theme] Set built-in theme
-l, --list-themes Show list of built-in themes
--preview-themes Interactively preview and select a built-in theme
-i, --init-config Install example configuration file
-s, --show-config Show example configuration file content
-k, --keybindings Show keybindings and exit
-v, --verbose Show verbose output
-h Show short help
--help Show full help
--help-man Show man page help
-V, --version Show version

Examples

Run yayfzf with no search query:

yayfzf

Search for fzf:

yayfzf fzf

Search packages sorted by votes:

yayfzf --sort-by votes

Start with the dracula theme:

yayfzf --theme dracula

Show all built-in themes:

yayfzf --list-themes

Open the interactive theme selector:

yayfzf --preview-themes

Start with the package preview window disabled:

yayfzf --no-preview

Install an example configuration file:

yayfzf --init-config

Show the short help menu:

yayfzf -h

Keybindings

Key Action
Move up
Move down
PGUP Move up one page
PGDN Move down one page
HOME Move to first
END Move to last
ENTER Perform action on selection
TAB Select item
Shift+TAB Unselect item
CTRL+a Select all items
CTRL+d Deselect all items
CTRL+i Install selected packages
CTRL+r Remove selected package
CTRL+u Update all packages
CTRL+l Clear query, screen, and selection
CTRL+Backspace Clear query
CTRL+/ Cycle preview window position and size
CTRL+v Toggle package preview window
? Show keybindings
CTRL+c Exit yayfzf
CTRL+w Exit yayfzf
ESC Exit yayfzf

Configuration

Configuration Files

yayfzf looks for configuration files in this order and uses the first file found:

  • $XDG_CONFIG_HOME/yayfzf/yayfzf.conf
  • $HOME/.config/yayfzf/yayfzf.conf
  • $HOME/.yayfzf.conf

Install an example configuration file:

yayfzf --init-config

Show the current example configuration:

yayfzf --show-config

Configuration Options

Option Description Default Values
THEME Built-in color theme default Show available themes: yayfzf --list-themes
SORT_BY Package search sort order popularity popularity, votes, last_updated
PREVIEW_WINDOW fzf package preview window layout and size right:60%:wrap Any valid fzf --preview-window value
LAYOUT fzf layout reverse default, reverse
BORDER fzf border style rounded Any valid fzf --border value
YAYFZF_PROMPT fzf prompt string yayfzf> Any string
ENABLE_PREVIEW Enable package preview window true true, false
VERBOSE Enable verbose output false true, false
YAYFZF_PAGER Pager used for config/help output ${PAGER:-less} less, bat, more, etc.
CTRL_C_CLOSE Exit when fzf returns an empty selection true true, false
NO_COLOR Disable ANSI color output false true, false

Example configuration:

# Theme
# Show available themes:
#   yayfzf --list-themes
#
# Interactively select a theme:
#   yayfzf --preview-themes
THEME="default"

# Package sort order: popularity, votes, last_updated
SORT_BY="popularity"

# Preview window options for fzf
PREVIEW_WINDOW="right:60%:wrap"

# Layout: default, reverse
LAYOUT="reverse"

# Border style
BORDER="rounded"

# Prompt for fzf
YAYFZF_PROMPT="yayfzf> "

# Enable package preview window
ENABLE_PREVIEW=true

# Verbose output
VERBOSE=false

# Pager
YAYFZF_PAGER="${PAGER:-less}"

# Close yayfzf with Ctrl-C / empty fzf selection
CTRL_C_CLOSE=true

# Disable color output
NO_COLOR=false

# Example of custom user theme (Replace 'custom' with theme name)
BUILTIN_THEMES[custom]="
  fg:#c0caf5
  bg:#1a1b26
  hl:#7aa2f7
  fg+:#c0caf5
  bg+:#24283b
  hl+:#7dcfff
  info:#7aa2f7
  prompt:#7dcfff
  pointer:#7dcfff
  marker:#9ece6a
  spinner:#9ece6a
  header:#9ece6a
"

See Also

Other

Contributing

Click to expand contributing section

Any contributions you make are appreciated.

If you want to contribute, please fork this repo and create a pull request.

  1. Fork the project
  2. Create your feature branch
git checkout -b AmazingNewFeature
  1. Commit your changes
git commit -m 'Description of the amazing feature you added'
  1. Push to the branch
git push origin AmazingNewFeature
  1. Open a pull request.

If you experience bugs or have suggestions, open an issue.

Donate

Monero (XMR) icon and wallet QR code XMR : 86tE67soBqFb5fxNGgC4HLdwZXebP42ewfBwfKyMDKvFbgA7T8p4g4T5BBNA9LNbwaVafup973w41PdvCS7bbj6gTNQpCh1

₿ BTC : bc1qpg5d69n2knsete7vw7f2vqpkg4a0faq9rc6se0

(back to top)

About

AUR package fzf finder to search, install, remove, and manage packages using yay

Topics

Resources

License

Stars

Watchers

Forks

Contributors