fix: again
This commit is contained in:
parent
37b518c393
commit
9b584aa697
1 changed files with 39 additions and 37 deletions
76
install.sh
76
install.sh
|
@ -162,8 +162,7 @@ askThings() {
|
||||||
echo_info "Choose a bar provider - [w]aybar || [g]Bar || [h]yprpanel"
|
echo_info "Choose a bar provider - [w]aybar || [g]Bar || [h]yprpanel"
|
||||||
read -r askBar </dev/tty
|
read -r askBar </dev/tty
|
||||||
|
|
||||||
echo_info "Choose a Terminal config (.)(.)"
|
echo_info "Choose a Terminal config (.)[G]hostty, [K]itty, [A]lacritty(.)"
|
||||||
echo_note "[G]hostty, [K]itty, [A]lacritty"
|
|
||||||
read -r askTerminal </dev/tty
|
read -r askTerminal </dev/tty
|
||||||
|
|
||||||
echo_info "Do you also want to install optional packages? (y/n)"
|
echo_info "Do you also want to install optional packages? (y/n)"
|
||||||
|
@ -213,25 +212,38 @@ __validate__() {
|
||||||
[aA] | alacritty) cloneDots "alacritty" ;;
|
[aA] | alacritty) cloneDots "alacritty" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
echo_error "Something went terribly wrong"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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__() {
|
__dep__() {
|
||||||
_depss="
|
_depss=(
|
||||||
wezterm
|
"stow"
|
||||||
btop
|
"btop"
|
||||||
entr
|
"entr"
|
||||||
unzip
|
"unzip"
|
||||||
zip
|
"zip"
|
||||||
fzf
|
"fzf"
|
||||||
zoxide
|
"tmux"
|
||||||
tmux
|
"copyq"
|
||||||
grimshot
|
"rsync"
|
||||||
copyq
|
"wezterm"
|
||||||
wlogout
|
"wlogout"
|
||||||
"
|
"zoxide"
|
||||||
for hyprdots_dependency in $_depss; do
|
)
|
||||||
|
|
||||||
|
for hyprdots_dependency in "${_depss[@]}"; do
|
||||||
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"
|
_install "$hyprdots_dependency"
|
||||||
|
@ -241,23 +253,23 @@ __dep__() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
_monitors() {
|
__monitors__() {
|
||||||
if [ ! -e "$HOME/.monitors.conf" ]; then
|
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"
|
touch "$HOME/.monitors.conf"
|
||||||
echo "monitor = eDP-1, ${res}, 0x0, 1" >"$HOME/.monitors.conf"
|
echo "monitor = eDP-1, ${res}, 0x0, 1" >"$HOME/.monitors.conf"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_optional() {
|
pkg_optional() {
|
||||||
_ops="
|
_ops=(
|
||||||
cowsay
|
"cowsay"
|
||||||
cmatrix
|
"cmatrix"
|
||||||
trash-cli
|
"trash-cli"
|
||||||
"
|
)
|
||||||
case "$_ops" in
|
case "$_ops" in
|
||||||
Y | y)
|
Y | y)
|
||||||
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"
|
||||||
else
|
else
|
||||||
|
@ -271,18 +283,6 @@ pkg_optional() {
|
||||||
;;
|
;;
|
||||||
esac
|
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__() {
|
__stow__() {
|
||||||
|
@ -294,6 +294,7 @@ main() {
|
||||||
get_packager
|
get_packager
|
||||||
|
|
||||||
__validate__
|
__validate__
|
||||||
|
__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): "
|
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" ] &&
|
[ "$__optional__" -eq "true" ] &&
|
||||||
pkg_optional
|
pkg_optional
|
||||||
|
|
||||||
_monitors
|
__monitors__
|
||||||
|
echo_note "found resolution ${res}"
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue