#!/bin/sh store() { selection=$(yay -Ss | sed -z 's/\n\s\+/ - /g' | sed -E 's/^[^\/]*\///g' | sed -e 's/([0-9.]* .iB /(/g' | sed -e 's/\[base-devel\]//g' | sed -e 's/ \+/ /g' | dmenu) name=$(echo $selection | awk '{ print $1 }') if [ -z "$name" ]; then exit fi if [ -z "$(yay -Qs $name)" ]; then selection=$(printf 'Install\nInfo\nBack' | dmenu -p "Package: $name ") else selection=$(printf 'Remove\nInfo\nBack' | dmenu -p "Package: $name ") fi echo $name case "$selection" in Install)window "yay -S $name" && notify-send "Storeless" "$name Successfully Installed";; Remove)window "yay -Rns $name" && notify-send "Storeless" "$name Successfully Removed ";; Info)notify-send -t 0 "$name" "$(yay -Si $name)";; Back)store;; esac } primaryscreenwidth() { xrandr | grep primary | awk '{ print $4 }' | grep -o '^[0-9]*' } window() { st -g 108x24+10+40 -c floating $1 } update() { window yay notify-send "Storeless" "System Up To Date" } case "$(printf "Store\nUpdate" | dmenu)" in Store)store;; Update)update;; esac