This commit is contained in:
pika 2025-05-22 12:01:16 +02:00
parent d927bf44f6
commit 3dd0a03a2c
3 changed files with 124 additions and 36 deletions

View file

@ -303,22 +303,14 @@ __dep__() {
instPika yazi instPika yazi
;; ;;
hyprland) hyprland)
if ! $arch; then # if ! $arch; then
instPika hyprland instPika hyprland
else # else
_install hyprland hypridle hyprshot # _install hyprland hypridle hyprshot
fi # fi
;; ;;
hyprpanel) hyprpanel)
if ! command_exists hyprpanel; then instPika hyprpanel
if arch; then
_install hyprpanel-ags-git
else
echo_warning "not on arch, cannot install hyprpanel.. yet.."
fi
else
echo_info "hyprpanel - already installed!"
fi
;; ;;
neovim) neovim)
if $neovim; then if $neovim; then
@ -333,10 +325,16 @@ __dep__() {
;; ;;
*) *)
if ! command_exists "$hyprdots_dependency"; then if ! command_exists "$hyprdots_dependency"; then
echo_note "--- installing $hyprdots_dependency ---" # echo_note "--- installing $hyprdots_dependency ---"
_install "$hyprdots_dependency" spin bold yellow "Installing $hyprdots_dependency.."
if run --err err _install "$hyprdots_dependency"; then
check green bold "$hyprdots_dependency was installed"
else
throw "$hyprdots_dependency could not get installed"
echo_error "${err:-}"
fi
else else
echo_info "$hyprdots_dependency - already installed" repen bold green "$hyprdots_dependency - already installed"
fi fi
;; ;;
esac esac
@ -360,7 +358,7 @@ pkg_optional() {
) )
case "$_ops" in case "$_ops" in
Y | y) Y | y | yes)
for _o_ in "${_ops[@]}"; do for _o_ in "${_ops[@]}"; do
if command_exists "$_o_"; then if command_exists "$_o_"; then
echo_note "$_o_ - is already installed" echo_note "$_o_ - is already installed"
@ -377,30 +375,119 @@ pkg_optional() {
} }
__stow__() { __stow__() {
stow --verbose --target="$HOME" --defer=.gitmodules --restow */ local err
spin grey "Linking dotfiles.."
if run --err err stow --verbose --target="$HOME" --defer=.gitmodules --restow */; then
check "Linked dotfiles!"
else
throw "Could not use stow to link dofiles.."
echo_error "${err:-}"
fi
}
c_fonts() {
local err
local dirFonts="$HOME/.local/share/fonts/"
if [[ ! -d "$dirFonts" ]]; then
if choise "Seems like you may miss some fonts.. Do you want to clone them now to <$HOME/.local/share/fonts/>" </dev/tty; then
# echo_info "Seems like you may miss some fonts.. Do you want to clone them now to <$HOME/.local/share/fonts/> ? [y|n]" && read -r ask_fonts
# case "$ask_fonts" in
# [Yy])
if ! command_exists git; then
spin "Installing fonts.."
if run pkg-install git; then
return 0
fi
if run --err err git clone --depth=1 https://git.k4li.de/pika/fonts.git "$dirFonts"; then
check "Cloned fonts correctly!"
else
throw "Error cloning fonts!"
echo_error "${err:-}"
fi
else
git clone --depth=1 https://git.k4li.de/pika/fonts.git "$dirFonts"
fi
# ;;
# [Nn])
else
pen bold red "You might have some font issues, but that's your business now!"
return 0
fi
fi
}
c_wallpapers() {
local dirWallpaper="$HOME/.wallpapers"
if [[ ! -d "$dirWallpaper" ]]; then
if confirm "Seems like you may miss some wallpapers.. Do you want to clone them now to <$HOME/.wallpapers/> ?" </dev/tty; then
# case "$ask_wall" in
# [Yy])
spin blue "Preparing wallpaper clone.."
if ! command_exists git; then
if run pkg-install git; then
return 0
fi
else
if run --err err git clone --depth=1 https://git.k4li.de/pika/wallpaper.git "$dirWallpaper"; then
check bold blue "Wallpapers loaded correctly!"
else
throw "Error downloading wallpapers!"
echo_error "${err:-}"
fi
fi
# ;;
# [Nn])
else
pen bold red "All right, be sure to checkout the $HOME/.config/hypr/.scripts/random_swww.sh to change the wallpaper dir"
return 0
fi
# ;;
# *)
# c_wallpapers
# ;;
# esac
fi
}
mkdirs() {
# ─< .config dir >────────────────────────────────────────────────────────────────────────
if [[ ! -f $HOME/.config/ ]]; then
pen grey "mkdir $HOME/.config"
silentexec mkdir $HOME/.config
fi
if [[ ! -f $HOME/.local/share/icons/ ]]; then
pen grey "mkdir -p $HOME/.local/share/icons/"
silentexec mkdir -p $HOME/.local/share/icons/
fi
if [[ ! -f $HOME/.local/share/fonts/ ]]; then
c_fonts || pen grey "mkdir -p $HOME/.local/share/fonts/" && silentexec mkdir -p $HOME/.local/share/fonts/
fi
c_wallpapers
} }
main() { main() {
check_root mkdirs
get_packager
# check_root
# get_packager
__validate__ __validate__
__dep__ __dep__
if ! command_exists stow; then if ! command_exists stow; then
echo_error "we couldn't find stow on the machine, do you want us to install it? (y/n): " if confirm "We couldn't find stow on the machine, do you want us to install it?"; then
read -r ask_stow
case "$ask_stow" in
Y | y)
_install stow _install stow
;; else
*) pen red bold "You cannot proceed without installing stow! Please install manually"
echo_error "You cannot proceed without installing stow! Please install manually"
exit 1 exit 1
;; fi
esac
else else
echo_info "stow was found, going on to prepare to stow your config" pen blue "Stow was found, going on to prepare to stow your config"
sleep 0.3 sleep 0.3
fi fi
@ -409,11 +496,12 @@ main() {
sleep 2 sleep 2
[ "$__optional__" = "true" ] && if $__optional__; then
pkg_optional pkg_optional
fi
__monitors__ __monitors__
echo_note "found resolution ${res}" pen blue bold "found resolution ${res}"
} }
if getImports "https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" && getImports "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh"; then if getImports "https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" && getImports "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh"; then

View file

@ -1,10 +1,10 @@
all: all:
./makedir.sh # ./makedir.sh
./install.sh ./install.sh
# stow --verbose --target=$$HOME --defer=^.*git.* --restow */ # stow --verbose --target=$$HOME --defer=^.*git.* --restow */
install: install:
./makedir.sh # ./makedir.sh
./install.sh ./install.sh
# stow --verbose --target=$$HOME --defer=^.*git.* --restow */ # stow --verbose --target=$$HOME --defer=^.*git.* --restow */

2
zsh

@ -1 +1 @@
Subproject commit d3d137a22bf352de190d0411a658d2e54fb13431 Subproject commit db7ac16675938e5960b624d31426f104e5ef616d