wip
This commit is contained in:
parent
e7a2286a18
commit
a870475f69
1 changed files with 105 additions and 105 deletions
210
hyprland.sh
210
hyprland.sh
|
@ -40,26 +40,26 @@ askThings() {
|
||||||
echo_note "Do you want to install hyprland? (y/N)"
|
echo_note "Do you want to install hyprland? (y/N)"
|
||||||
read -r askHyprland </dev/tty
|
read -r askHyprland </dev/tty
|
||||||
case "$askHyprland" in
|
case "$askHyprland" in
|
||||||
[yY]) askHyprland="true" ;;
|
[yY]) askHyprland="true" ;;
|
||||||
*)
|
*)
|
||||||
echo_error "Aborting now!"
|
echo_error "Aborting now!"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if ! command_exists waybar && ! command_exists hyprpanel && ! command_exists gBar; then
|
if ! command_exists waybar && ! command_exists hyprpanel && ! command_exists gBar; then
|
||||||
echo_note "What bar do you want to install? (available: [w]aybar, [h]yprpanel, [g]Bar)"
|
echo_note "What bar do you want to install? (available: [w]aybar, [h]yprpanel, [g]Bar)"
|
||||||
read -r askBar </dev/tty
|
read -r askBar </dev/tty
|
||||||
case "$askBar" in
|
case "$askBar" in
|
||||||
[Ww] | waybar)
|
[Ww] | waybar)
|
||||||
bar="waybar"
|
bar="waybar"
|
||||||
;;
|
;;
|
||||||
[Hh] | hyprpanel)
|
[Hh] | hyprpanel)
|
||||||
bar="hyprpanel"
|
bar="hyprpanel"
|
||||||
;;
|
;;
|
||||||
[Gg] | gBar | gbar)
|
[Gg] | gBar | gbar)
|
||||||
bar="gBar"
|
bar="gBar"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo_info "Set bar to $bar"
|
echo_info "Set bar to $bar"
|
||||||
fi
|
fi
|
||||||
|
@ -68,15 +68,15 @@ askThings() {
|
||||||
echo_note "Do you want to install [r]ofi or [t]ofi?: "
|
echo_note "Do you want to install [r]ofi or [t]ofi?: "
|
||||||
read -r askRofi </dev/tty
|
read -r askRofi </dev/tty
|
||||||
case "$askRofi" in
|
case "$askRofi" in
|
||||||
[tT] | tofi)
|
[tT] | tofi)
|
||||||
menu="tofi"
|
menu="tofi"
|
||||||
;;
|
;;
|
||||||
[rR] | rofi)
|
[rR] | rofi)
|
||||||
menu="rofi"
|
menu="rofi"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu="rofi"
|
menu="rofi"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo_info "Set menu to $menu"
|
echo_info "Set menu to $menu"
|
||||||
fi
|
fi
|
||||||
|
@ -84,21 +84,21 @@ askThings() {
|
||||||
echo_note "What terminal to you want to install? [a]lacritty, [f]oot, [k]itty, [w]ezterm"
|
echo_note "What terminal to you want to install? [a]lacritty, [f]oot, [k]itty, [w]ezterm"
|
||||||
read -r askTerminal </dev/tty
|
read -r askTerminal </dev/tty
|
||||||
case "$askTerminal" in
|
case "$askTerminal" in
|
||||||
[aA] | alacritty)
|
[aA] | alacritty)
|
||||||
terminal="alacritty"
|
terminal="alacritty"
|
||||||
;;
|
;;
|
||||||
[fF] | foot)
|
[fF] | foot)
|
||||||
terminal="foot"
|
terminal="foot"
|
||||||
;;
|
;;
|
||||||
[kK] | kitty)
|
[kK] | kitty)
|
||||||
terminal="kitty"
|
terminal="kitty"
|
||||||
;;
|
;;
|
||||||
[wW] | wezterm)
|
[wW] | wezterm)
|
||||||
terminal="wezterm"
|
terminal="wezterm"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
terminal="foot"
|
terminal="foot"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo_info "Set terminal to $terminal"
|
echo_info "Set terminal to $terminal"
|
||||||
|
|
||||||
|
@ -111,19 +111,19 @@ askThings() {
|
||||||
|
|
||||||
instCustom() {
|
instCustom() {
|
||||||
case $bar in
|
case $bar in
|
||||||
waybar) checkAndInstall waybar ;;
|
waybar) checkAndInstall waybar ;;
|
||||||
hyprpanel)
|
hyprpanel)
|
||||||
case $distro in
|
case $distro in
|
||||||
arch) run _install ags-hyprpanel-git ;;
|
arch) run _install ags-hyprpanel-git ;;
|
||||||
*) echo_error "Hyprpanel cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
*) echo_error "Hyprpanel cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
gBar)
|
gBar)
|
||||||
case $distro in
|
case $distro in
|
||||||
arch) run _install gbar-git ;;
|
arch) run _install gbar-git ;;
|
||||||
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,26 +131,26 @@ cloneDotfiles() {
|
||||||
echo_info "Which dotfiles do you want to clone? ([p]ika's config, or just type the link to your own repo)"
|
echo_info "Which dotfiles do you want to clone? ([p]ika's config, or just type the link to your own repo)"
|
||||||
read -r askDotfiles2 </dev/tty
|
read -r askDotfiles2 </dev/tty
|
||||||
case "$askDotfiles2" in
|
case "$askDotfiles2" in
|
||||||
[pP])
|
[pP])
|
||||||
echo_info "Cloning pika's config..."
|
echo_info "Cloning pika's config..."
|
||||||
run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/git/hyprdots" || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/git/hyprdots" || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||||
|
|
||||||
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||||
|
|
||||||
echo_info "Installing dotfiles..."
|
echo_info "Installing dotfiles..."
|
||||||
make </dev/tty || { echo_error "Failed to install dotfiles!" && exit 1; }
|
make </dev/tty || { echo_error "Failed to install dotfiles!" && exit 1; }
|
||||||
|
|
||||||
echo_info "Dotfiles installed successfully!"
|
echo_info "Dotfiles installed successfully!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo_info "Cloning dotfiles from $askDotfiles2..."
|
echo_info "Cloning dotfiles from $askDotfiles2..."
|
||||||
git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots
|
git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots
|
||||||
|
|
||||||
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||||
|
|
||||||
echo_info "Your dotfiles have been saved to $HOME/git/hyprdots"
|
echo_info "Your dotfiles have been saved to $HOME/git/hyprdots"
|
||||||
echo_info "You can now install your dotfiles how you want to!"
|
echo_info "You can now install your dotfiles how you want to!"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,13 +162,13 @@ checkConfig() {
|
||||||
echo_note "Do you want to clone some dotfiles? (y/N)"
|
echo_note "Do you want to clone some dotfiles? (y/N)"
|
||||||
read -r askDotfiles </dev/tty
|
read -r askDotfiles </dev/tty
|
||||||
case "$askDotfiles" in
|
case "$askDotfiles" in
|
||||||
[yY])
|
[yY])
|
||||||
echo_info "Cloning dotfiles..."
|
echo_info "Cloning dotfiles..."
|
||||||
cloneDotfiles
|
cloneDotfiles
|
||||||
;;
|
;;
|
||||||
[nN])
|
[nN])
|
||||||
echo_note "Skipping dotfiles installation..."
|
echo_note "Skipping dotfiles installation..."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -176,46 +176,46 @@ checkConfig() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
arch)
|
arch)
|
||||||
local deps=(
|
local deps=(
|
||||||
hyprland
|
hyprland
|
||||||
hypridle
|
hypridle
|
||||||
hyprpolkitagent
|
hyprpolkitagent
|
||||||
hyprland-protocols
|
hyprland-protocols
|
||||||
wayland-utils
|
wayland-utils
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
)
|
)
|
||||||
checkAndInstall "${deps[@]}"
|
checkAndInstall "${deps[@]}"
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
local deps=(
|
local deps=(
|
||||||
hyprland-dev
|
hyprland-dev
|
||||||
hyprland-protocols
|
hyprland-protocols
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
kitty
|
kitty
|
||||||
)
|
)
|
||||||
checkAndInstall "${deps[@]}"
|
checkAndInstall "${deps[@]}"
|
||||||
*)
|
;;
|
||||||
echo "$distro is not supported by this script!"
|
*)
|
||||||
exit 1
|
echo "$distro is not supported by this script!"
|
||||||
;;
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if getImports; then
|
if getImports; then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--silent | -s)
|
--silent | -s)
|
||||||
echo_info "Executing main silently.."
|
echo_info "Executing main silently.."
|
||||||
silent=true
|
silent=true
|
||||||
;;
|
;;
|
||||||
*) silent=false ;;
|
*) silent=false ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
askThings
|
askThings
|
||||||
instCustom
|
instCustom
|
||||||
main
|
main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue