fix: again

This commit is contained in:
pika 2025-03-21 19:46:25 +01:00
parent 37b518c393
commit 9b584aa697

View file

@ -162,8 +162,7 @@ askThings() {
echo_info "Choose a bar provider - [w]aybar || [g]Bar || [h]yprpanel"
read -r askBar </dev/tty
echo_info "Choose a Terminal config (.)(.)"
echo_note "[G]hostty, [K]itty, [A]lacritty"
echo_info "Choose a Terminal config (.)[G]hostty, [K]itty, [A]lacritty(.)"
read -r askTerminal </dev/tty
echo_info "Do you also want to install optional packages? (y/n)"
@ -213,25 +212,38 @@ __validate__() {
[aA] | alacritty) cloneDots "alacritty" ;;
esac
else
echo_error "Something went terribly wrong"
exit 1
fi
if [ ! -d "$HOME/.config/nvim" ]; then
echo_note "There was no nvim config found, do you want to clone the pika nvim? (y/n)"
read -r _neovim </dev/tty
case "$_neovim" in
[yY])
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
;;
esac
fi
}
__dep__() {
_depss="
wezterm
btop
entr
unzip
zip
fzf
zoxide
tmux
grimshot
copyq
wlogout
"
for hyprdots_dependency in $_depss; do
_depss=(
"stow"
"btop"
"entr"
"unzip"
"zip"
"fzf"
"tmux"
"copyq"
"rsync"
"wezterm"
"wlogout"
"zoxide"
)
for hyprdots_dependency in "${_depss[@]}"; do
if ! command_exists "$hyprdots_dependency"; then
echo_note "--- installing $hyprdots_dependency ---"
_install "$hyprdots_dependency"
@ -241,23 +253,23 @@ __dep__() {
done
}
_monitors() {
__monitors__() {
if [ ! -e "$HOME/.monitors.conf" ]; then
local res="$(hyprctl monitors | grep -oP '\d+x\d+@\d+\.\d+' | head -n 1)"
res="$(hyprctl monitors | grep -oP '\d+x\d+@\d+\.\d+' | head -n 1)"
touch "$HOME/.monitors.conf"
echo "monitor = eDP-1, ${res}, 0x0, 1" >"$HOME/.monitors.conf"
fi
}
pkg_optional() {
_ops="
cowsay
cmatrix
trash-cli
"
_ops=(
"cowsay"
"cmatrix"
"trash-cli"
)
case "$_ops" in
Y | y)
for _o_ in $_ops; do
for _o_ in "${_ops[@]}"; do
if command_exists "$_o_"; then
echo_note "$_o_ - is already installed"
else
@ -271,18 +283,6 @@ pkg_optional() {
;;
esac
if [ ! -d "$HOME/.config/nvim" ]; then
echo_note "There was no nvim config found, do you want to clone the pika nvim? (y/n)"
read -r _neovim </dev/tty
case "$_neovim" in
Y | y)
git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
;;
*)
echo default
;;
esac
fi
}
__stow__() {
@ -294,6 +294,7 @@ main() {
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): "
@ -320,7 +321,8 @@ main() {
[ "$__optional__" -eq "true" ] &&
pkg_optional
_monitors
__monitors__
echo_note "found resolution ${res}"
}
main