fixed script paths cuz im stupid.

This commit is contained in:
Dante 2024-02-29 13:39:53 -05:00 committed by GitHub
parent f0f67c478a
commit 1675a1e041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 386 additions and 0 deletions

60
scripts/globalcontrol.sh Normal file
View file

@ -0,0 +1,60 @@
#!/usr/bin/env sh
# wallpaper var
EnableWallDcol=0
ConfDir="${XDG_CONFIG_HOME:-$HOME/.config}"
CloneDir="$HOME/Hyprdots"
ThemeCtl="$ConfDir/hypr/theme.ctl"
cacheDir="$HOME/.cache/hyprdots"
# theme var
gtkTheme=`gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g"`
gtkMode=`gsettings get org.gnome.desktop.interface color-scheme | sed "s/'//g" | awk -F '-' '{print $2}'`
# hypr var
hypr_border=`hyprctl -j getoption decoration:rounding | jq '.int'`
hypr_width=`hyprctl -j getoption general:border_size | jq '.int'`
# notification var
#ncolor="-h string:bgcolor:#191724 -h string:fgcolor:#faf4ed -h string:frcolor:#56526e"
#
#if [ "${gtkMode}" == "light" ] ; then
# ncolor="-h string:bgcolor:#f4ede8 -h string:fgcolor:#9893a5 -h string:frcolor:#908caa"
#fi
# pacman fns
pkg_installed()
{
local PkgIn=$1
if pacman -Qi $PkgIn &> /dev/null
then
#echo "${PkgIn} is already installed..."
return 0
else
#echo "${PkgIn} is not installed..."
return 1
fi
}
get_aurhlpr()
{
if pkg_installed yay
then
aurhlpr="yay"
elif pkg_installed paru
then
aurhlpr="paru"
fi
}
check(){
local Pkg_Dep=$(for PkgIn in "$@"; do ! pkg_installed $PkgIn && echo "$PkgIn"; done)
if [ -n "$Pkg_Dep" ]; then echo -e "$0 Dependencies:\n$Pkg_Dep"
read -p "ENTER to install (Other key: Cancel): " ans
if [ -z "$ans" ]; then get_aurhlpr ; $aurhlpr -S $Pkg_Dep
else echo "Skipping installation of packages" ;exit 1
fi
fi
}