mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-06-08 00:33:43 +02:00
feat: function for stow and unstow
This commit is contained in:
parent
5c957e7016
commit
f642f3f3d0
1 changed files with 27 additions and 2 deletions
29
stow.sh
29
stow.sh
|
@ -1,11 +1,36 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
display_help() {
|
||||||
|
echo "Usage: [-s | -u] [-h]"
|
||||||
|
echo " -s Stow dotfiles"
|
||||||
|
echo " -u Unstow dotfiles"
|
||||||
|
echo " -h Display this help message"
|
||||||
|
}
|
||||||
|
|
||||||
stow_dotfiles() {
|
stow_dotfiles() {
|
||||||
stow dots
|
stow dots
|
||||||
stow -d dots -S zsh -t ~/
|
stow -d dots -S zsh -t ~/
|
||||||
stow hyprland
|
stow hyprland
|
||||||
|
|
||||||
echo "Dotfiles stowed successfully!"
|
echo "Dotfiles stowed successfully!"
|
||||||
}
|
}
|
||||||
|
|
||||||
stow_dotfiles
|
unstow_dotfiles() {
|
||||||
|
stow -D dots
|
||||||
|
stow -D -d dots -t ~/ zsh
|
||||||
|
stow -D hyprland
|
||||||
|
echo "Dotfiles unstowed successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts ":suh" opt; do
|
||||||
|
case $opt in
|
||||||
|
s)
|
||||||
|
stow_dotfiles
|
||||||
|
;;
|
||||||
|
u)
|
||||||
|
unstow_dotfiles
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
display_help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue