wip
This commit is contained in:
parent
d927bf44f6
commit
3dd0a03a2c
3 changed files with 124 additions and 36 deletions
154
install.sh
154
install.sh
|
@ -303,22 +303,14 @@ __dep__() {
|
|||
instPika yazi
|
||||
;;
|
||||
hyprland)
|
||||
if ! $arch; then
|
||||
# if ! $arch; then
|
||||
instPika hyprland
|
||||
else
|
||||
_install hyprland hypridle hyprshot
|
||||
fi
|
||||
# else
|
||||
# _install hyprland hypridle hyprshot
|
||||
# fi
|
||||
;;
|
||||
hyprpanel)
|
||||
if ! command_exists hyprpanel; then
|
||||
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
|
||||
instPika hyprpanel
|
||||
;;
|
||||
neovim)
|
||||
if $neovim; then
|
||||
|
@ -333,10 +325,16 @@ __dep__() {
|
|||
;;
|
||||
*)
|
||||
if ! command_exists "$hyprdots_dependency"; then
|
||||
echo_note "--- installing $hyprdots_dependency ---"
|
||||
_install "$hyprdots_dependency"
|
||||
# echo_note "--- installing $hyprdots_dependency ---"
|
||||
spin bold yellow "Installing $hyprdots_dependency.."
|
||||
if run --err err _install "$hyprdots_dependency"; then
|
||||
check green bold "$hyprdots_dependency was installed"
|
||||
else
|
||||
echo_info "$hyprdots_dependency - already installed"
|
||||
throw "$hyprdots_dependency could not get installed"
|
||||
echo_error "${err:-}"
|
||||
fi
|
||||
else
|
||||
repen bold green "$hyprdots_dependency - already installed"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -360,7 +358,7 @@ pkg_optional() {
|
|||
)
|
||||
|
||||
case "$_ops" in
|
||||
Y | y)
|
||||
Y | y | yes)
|
||||
for _o_ in "${_ops[@]}"; do
|
||||
if command_exists "$_o_"; then
|
||||
echo_note "$_o_ - is already installed"
|
||||
|
@ -377,30 +375,119 @@ pkg_optional() {
|
|||
}
|
||||
|
||||
__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() {
|
||||
check_root
|
||||
get_packager
|
||||
mkdirs
|
||||
|
||||
# check_root
|
||||
# get_packager
|
||||
|
||||
__validate__
|
||||
__dep__
|
||||
|
||||
if ! command_exists stow; then
|
||||
echo_error "we couldn't find stow on the machine, do you want us to install it? (y/n): "
|
||||
read -r ask_stow
|
||||
case "$ask_stow" in
|
||||
Y | y)
|
||||
if confirm "We couldn't find stow on the machine, do you want us to install it?"; then
|
||||
_install stow
|
||||
;;
|
||||
*)
|
||||
echo_error "You cannot proceed without installing stow! Please install manually"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo_info "stow was found, going on to prepare to stow your config"
|
||||
pen red bold "You cannot proceed without installing stow! Please install manually"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
pen blue "Stow was found, going on to prepare to stow your config"
|
||||
sleep 0.3
|
||||
fi
|
||||
|
||||
|
@ -409,11 +496,12 @@ main() {
|
|||
|
||||
sleep 2
|
||||
|
||||
[ "$__optional__" = "true" ] &&
|
||||
if $__optional__; then
|
||||
pkg_optional
|
||||
fi
|
||||
|
||||
__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
|
||||
|
|
4
makefile
4
makefile
|
@ -1,10 +1,10 @@
|
|||
all:
|
||||
./makedir.sh
|
||||
# ./makedir.sh
|
||||
./install.sh
|
||||
# stow --verbose --target=$$HOME --defer=^.*git.* --restow */
|
||||
|
||||
install:
|
||||
./makedir.sh
|
||||
# ./makedir.sh
|
||||
./install.sh
|
||||
# stow --verbose --target=$$HOME --defer=^.*git.* --restow */
|
||||
|
||||
|
|
2
zsh
2
zsh
|
@ -1 +1 @@
|
|||
Subproject commit d3d137a22bf352de190d0411a658d2e54fb13431
|
||||
Subproject commit db7ac16675938e5960b624d31426f104e5ef616d
|
Loading…
Add table
Add a link
Reference in a new issue