fix(setup): make it profile based
This commit is contained in:
@@ -16,37 +16,17 @@ FORCE=false
|
|||||||
REMOVE_EXISTING=false
|
REMOVE_EXISTING=false
|
||||||
IGNORE_EXISTING=false
|
IGNORE_EXISTING=false
|
||||||
ERROR=false
|
ERROR=false
|
||||||
|
PROFILE="hyprland"
|
||||||
|
|
||||||
# Define packages
|
pkg_query_arch() {
|
||||||
typeset -a PKGS
|
pacman -Qi "$@"
|
||||||
PKGS=(
|
}
|
||||||
"alacritty"
|
|
||||||
"tmux"
|
typeset -A PKG_QUERY
|
||||||
"zsh"
|
PKG_QUERY["Arch Linux"]="pkg_query_arch"
|
||||||
"hyprland"
|
|
||||||
"uwsm"
|
typeset -A PKGS
|
||||||
"fnott"
|
PKGS["Arch Linux hyprland"]="alacritty tmux zsh hyprland uwsm fnott pipewire wireplumber hyprpolkitagent qt5-wayland qt6-wayland hyprlock hypridle xdg-desktop-portal-hyprland xdg-desktop-portal-gtk hyprland-qt-support waybar rofi wl-clipboard dolphin pasystray playerctl brightnessctl breeze pavucontrol otf-font-awesome"
|
||||||
"pipewire"
|
|
||||||
"wireplumber"
|
|
||||||
"hyprpolkitagent"
|
|
||||||
"qt5-wayland"
|
|
||||||
"qt6-wayland"
|
|
||||||
"hyprlock"
|
|
||||||
"hypridle"
|
|
||||||
"xdg-desktop-portal-hyprland"
|
|
||||||
"xdg-desktop-portal-gtk"
|
|
||||||
"hyprland-qt-support"
|
|
||||||
"waybar"
|
|
||||||
"rofi"
|
|
||||||
"wl-clipboard"
|
|
||||||
"dolphin"
|
|
||||||
"pasystray"
|
|
||||||
"playerctl"
|
|
||||||
"brightnessctl"
|
|
||||||
"breeze"
|
|
||||||
"pavucontrol"
|
|
||||||
"otf-font-awesome"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Define paths to symlink
|
# Define paths to symlink
|
||||||
typeset -a SYMLINKS
|
typeset -a SYMLINKS
|
||||||
@@ -107,17 +87,11 @@ error() {
|
|||||||
|
|
||||||
check_packages_installed() {
|
check_packages_installed() {
|
||||||
local -a missing
|
local -a missing
|
||||||
|
local -a pkgs
|
||||||
|
|
||||||
for pkg in "${PKGS[@]}"; do
|
pkgs=(${=PKGS["$DISTRO $PROFILE"]})
|
||||||
local -a cmd
|
for pkg in "${pkgs[@]}"; do
|
||||||
|
if ! ${PKG_QUERY["$DISTRO"]} "$pkg" >/dev/null 2>&1; then
|
||||||
if [ $DISTRO = "Arch Linux" ]; then
|
|
||||||
cmd=(pacman -Qi "$pkg")
|
|
||||||
else
|
|
||||||
cmd=(type "$pkg")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! eval "$cmd[@]" >/dev/null 2>&1; then
|
|
||||||
missing+=($pkg)
|
missing+=($pkg)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user