Adding quickshell configuration script

This commit is contained in:
pika 2025-06-08 09:47:26 +02:00
parent 5fbb3ffcc3
commit 3e5b4a6268

46
.scripts/quickshell Executable file
View file

@ -0,0 +1,46 @@
#!/usr/bin/env bash
# ─< Check if the given command exists silently >─────────────────────────────────────────
command-exists() {
command -v "$@" >/dev/null 2>&1
}
check-env() {
local dir bin
bin=quickshell
dir="$HOME/.config/quickshell"
if command-exists $bin; then
return 0
else
return 69
fi
if [ -d "${dir}" ]; then
return 0
else
return 69
fi
}
check-env
init-quickshell() {
local modules
local dir="$HOME/.config/quickshell"
modules=(
"activate-linux"
)
for mod in "${modules[@]}"; do
module="${dir}/${mod}.qml"
if [ -f "$module" ]; then
quickshell -p "$module" &
fi
done
}
init-quickshell