Compare commits
2 Commits
a819973018
...
110ae9e4eb
| Author | SHA1 | Date | |
|---|---|---|---|
| 110ae9e4eb | |||
| 832cad605a |
15
lib/utils.sh
15
lib/utils.sh
@@ -91,8 +91,19 @@ is_package_installed() {
|
||||
local pkg="$1"
|
||||
|
||||
if command -v pacman >/dev/null 2>&1; then
|
||||
pacman -Qi "$pkg" >/dev/null 2>&1
|
||||
return $?
|
||||
pacman -Qi "$pkg" >/dev/null 2>&1 && return 0
|
||||
if command -v expac >/dev/null 2>&1; then
|
||||
expac -Q '%n %P' 2>/dev/null | awk -v pkg="$pkg" '
|
||||
{ for (i=2; i<=NF; i++) if ($i == pkg) {found=1; exit} }
|
||||
END {exit !found}
|
||||
' && return 0
|
||||
else
|
||||
while IFS= read -r installed; do
|
||||
[[ -z "$installed" ]] && continue
|
||||
pacman -Qi "$installed" 2>/dev/null | grep -qP "Provides\s*:\s*.*\b${pkg}\b" && return 0
|
||||
done < <(pacman -Qq 2>/dev/null)
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 1
|
||||
|
||||
@@ -134,7 +134,7 @@ get_group_packages() {
|
||||
brightnessctl playerctl \
|
||||
grim slurp swappy hyprshot \
|
||||
wl-clipboard libnotify sshpass \
|
||||
hyprpolkitagent aylurs-gtk-shell
|
||||
hyprpolkitagent aylurs-gtk-shell awww
|
||||
;;
|
||||
|
||||
gpu)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
module_description() {
|
||||
printf "Additional Software (Obsidian, Neovim, VS Code, Spotify, Brave, Chromium, VLC, PipeWire, Docker, Blender)\n"
|
||||
printf "Additional Software (Obsidian, Neovim, VS Code, Spotify, Brave, Chromium, VLC, PipeWire, Docker, Blender, opencode)\n"
|
||||
}
|
||||
|
||||
module_required() { return 1; }
|
||||
@@ -30,7 +30,8 @@ module_main() {
|
||||
"VLC" \
|
||||
"PipeWire Tools" \
|
||||
"Docker" \
|
||||
"Blender"
|
||||
"Blender" \
|
||||
"opencode"
|
||||
)"
|
||||
|
||||
if [[ -z "$choices" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user