included installer TUIs, ghostty config and zsh config.
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Show a fuzzy-finder TUI for picking new AUR packages to install.
|
||||
|
||||
fzf_args=(
|
||||
--multi
|
||||
--preview 'clear && yay -Siia {1}'
|
||||
--preview-label='alt-p: toggle description, alt-b/B: toggle PKGBUILD, alt-j/k: scroll, tab: multi-select'
|
||||
--preview-label-pos='bottom'
|
||||
--preview-window 'left:65%:wrap'
|
||||
--bind 'alt-p:toggle-preview'
|
||||
--bind 'alt-d:preview-half-page-down,alt-u:preview-half-page-up'
|
||||
--bind 'alt-k:preview-up,alt-j:preview-down'
|
||||
--bind 'alt-b:change-preview:clear && yay -Gpa {1} | tail -n +5'
|
||||
--bind 'alt-B:change-preview:clear && yay -Siia {1}'
|
||||
--color 'pointer:green,marker:green'
|
||||
)
|
||||
|
||||
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
||||
|
||||
if [[ -n $pkg_names ]]; then
|
||||
# Add aur/ prefix to each package name and convert to space-separated for yay
|
||||
sudo -v
|
||||
echo "$pkg_names" | sed 's/^/aur\//' | tr '\n' ' ' | xargs yay -S --noconfirm
|
||||
sudo updatedb
|
||||
echo "done installing!"
|
||||
read -n 1
|
||||
fi
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Show a fuzzy-finder TUI for picking new Arch and OPR packages to install.
|
||||
|
||||
fzf_args=(
|
||||
--multi
|
||||
--preview 'clear && pacman -Sii {1}'
|
||||
--preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select'
|
||||
--preview-label-pos='bottom'
|
||||
--preview-window 'left:65%:wrap'
|
||||
--bind 'alt-p:toggle-preview'
|
||||
--bind 'alt-d:preview-half-page-down,alt-u:preview-half-page-up'
|
||||
--bind 'alt-k:preview-up,alt-j:preview-down'
|
||||
--color 'pointer:green,marker:green'
|
||||
)
|
||||
|
||||
pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
|
||||
|
||||
if [[ -n $pkg_names ]]; then
|
||||
# Convert newline-separated selections to space-separated for yay
|
||||
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm
|
||||
echo "finished installing."
|
||||
read -n 1
|
||||
fi
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
## command aliases
|
||||
alias pacgui=~/.config/sdgos/tuis/pkg-install.sh
|
||||
alias aurgui=~/.config/sdgos/tuis/aur-install.sh
|
||||
alias find="fzf --layout=reverse --preview='bat {}'"
|
||||
alias microfind='micro $(pwd)/$(fzf --layout=reverse --preview="bat {}")'
|
||||
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
||||
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
||||
alias ll='eza -l --color=always --group-directories-first --icons' # long format
|
||||
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
||||
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
alias ......='cd ../../../../..'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias update='sudo pacman -Syu'
|
||||
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l'
|
||||
alias apt='man pacman'
|
||||
alias apt-get='man pacman'
|
||||
alias please='sudo'
|
||||
alias jctl="journalctl -p 3 -xb"
|
||||
EDITOR=micro
|
||||
IMAGEPROGRAM='satty --filename'
|
||||
|
||||
## filetype aliases, default-opens them with the set program
|
||||
alias -s json=$EDITOR
|
||||
alias -s yaml=$EDITOR
|
||||
alias -s md=$EDITOR
|
||||
alias -s toml=$EDITOR
|
||||
alias -s conf=$EDITOR
|
||||
alias -s yml=$EDITOR
|
||||
alias -s txt=$EDITOR
|
||||
alias -s css=$EDITOR
|
||||
alias -s html=$EDITOR
|
||||
alias -s png=$IMAGEPROGRAM
|
||||
alias -s jpg=$IMAGEPROGRAM
|
||||
alias -s jpeg=$IMAGEPROGRAM
|
||||
alias -s webp=$IMAGEPROGRAM
|
||||
|
||||
eval "$(zoxide init zsh --cmd cd )"
|
||||
Reference in New Issue
Block a user