style(install-script)

This commit is contained in:
TheK4n 2023-05-09 22:13:04 +03:00
parent 6f7fde1eba
commit 7935d87e7d
2 changed files with 16 additions and 16 deletions

View File

@ -32,31 +32,31 @@ cmd_edit() {
chmod u+x "$LAYOUTS_DIR/$1.sh"
}
cmd_load() {
if [ -z "$1" ]; then
"$LAYOUTS_DIR/default.sh"
return 0
fi
"$LAYOUTS_DIR/$1.sh"
}
cmd_wallpaper() {
local wallpapers="$HOME/.wallpaper"
feh --no-fehbg --bg-scale "$wallpapers/$(ls "$wallpapers" | shuf -n 1)"
}
cmd_load() {
if [ -z "$1" ]; then
"$LAYOUTS_DIR/default.sh"
else
"$LAYOUTS_DIR/$1.sh"
fi
cmd_wallpaper
}
cmd_help () {
echo "slm (ls|add|load|wallpaper)" >&2
}
case "$1" in
ls) shift; cmd_list "$@" ;;
add|edit) shift; cmd_edit "$@" ;;
load) shift; cmd_load "$@" ;;
wallpaper) shift; cmd_wallpaper "$@" ;;
*) shift; cmd_help "$@" ;;
ls) shift; cmd_list "$@" ;;
add|edit) shift; cmd_edit "$@" ;;
load) shift; cmd_load "$@" ;;
wallpaper) shift; cmd_wallpaper "$@" ;;
*) shift; cmd_help "$@" ;;
esac
exit 0

View File

@ -225,7 +225,7 @@ cmd_install() {
termux) shift; cmd_termux "$@" ;;
arch) shift; cmd_arch "$@" ;;
psql) shift; cmd_psql "$@" ;;
docker) shift; cmd_docker "$@" ;;
docker) shift; cmd_docker "$@" ;;
*) shift; cmd_no_target "$@" ;;
esac
done
@ -243,7 +243,7 @@ case "$1" in
install) shift; cmd_install "$@" ;;
unlink) shift; cmd_unlink "$@" ;;
help) shift; cmd_help "$@" ;;
*) shift; cmd_help "$@" ;;
*) shift; cmd_help "$@" ;;
esac
exit 0