mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-26 21:03:42 +02:00
51 lines
986 B
Bash
Executable file
51 lines
986 B
Bash
Executable file
#!/bin/bash
|
|
|
|
dots_dir="dots"
|
|
hyprland_dir="hyprland"
|
|
shortcuts_target_dir="$HOME/.local/share/applications"
|
|
|
|
display_help() {
|
|
echo "Usage: [-s | -u] [-h]"
|
|
echo " -s Stow dotfiles"
|
|
echo " -u Unstow dotfiles"
|
|
echo " -h Display this help message"
|
|
}
|
|
|
|
stow_shortcuts() {
|
|
mkdir -p $shortcuts_target_dir
|
|
stow -d $dots_dir -S shortcuts -t $shortcuts_target_dir
|
|
|
|
echo "Shortcuts stowed successfully!"
|
|
}
|
|
|
|
stow_dotfiles() {
|
|
stow $dots_dir
|
|
stow -d $dots_dir -S zsh -t ~/
|
|
stow $hyprland_dir
|
|
|
|
echo "Dotfiles stowed successfully!"
|
|
}
|
|
|
|
unstow_dotfiles() {
|
|
stow -D $dots_dir
|
|
stow -D -d $dots_dir -t ~/ zsh
|
|
stow -D -d $dots_dir -t $shortcuts_target_dir shortcuts
|
|
stow -D $hyprland_dir
|
|
|
|
echo "Dotfiles unstowed successfully!"
|
|
}
|
|
|
|
while getopts ":suh" opt; do
|
|
case $opt in
|
|
s)
|
|
stow_dotfiles
|
|
stow_shortcuts
|
|
;;
|
|
u)
|
|
unstow_dotfiles
|
|
;;
|
|
*)
|
|
display_help
|
|
;;
|
|
esac
|
|
done
|