feat: add wallust and lutgen auto-installer to install.sh and fix hardcoded paths in Theme.qml
This commit is contained in:
parent
e3d496502a
commit
15f655d020
49
install.sh
49
install.sh
@ -186,7 +186,53 @@ install_quickshell() {
|
|||||||
success "QuickShell built and installed from source!"
|
success "QuickShell built and installed from source!"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 4. Copying and Linking Configurations
|
# 4. Wallust & Lutgen Binary Check / Installation
|
||||||
|
install_wallust_lutgen() {
|
||||||
|
info "Checking wallust and lutgen installation..."
|
||||||
|
|
||||||
|
ensure_cargo() {
|
||||||
|
if ! command -v cargo &>/dev/null && [ ! -f "$HOME/.cargo/bin/cargo" ]; then
|
||||||
|
info "Installing Cargo package manager for Rust tools..."
|
||||||
|
case "$PM" in
|
||||||
|
dnf) sudo dnf install -y cargo rust || true ;;
|
||||||
|
pacman) sudo pacman -S --needed --noconfirm rust cargo || true ;;
|
||||||
|
apt) sudo apt-get install -y cargo rustc || true ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install wallust
|
||||||
|
if command -v wallust &>/dev/null || [ -f "$HOME/.cargo/bin/wallust" ]; then
|
||||||
|
success "wallust binary found!"
|
||||||
|
else
|
||||||
|
info "Installing wallust..."
|
||||||
|
if [ "$PM" = "pacman" ] && command -v yay &>/dev/null; then
|
||||||
|
yay -S --needed --noconfirm wallust || { ensure_cargo; cargo install wallust; } || warn "Could not install wallust"
|
||||||
|
elif [ "$PM" = "pacman" ] && command -v paru &>/dev/null; then
|
||||||
|
paru -S --needed --noconfirm wallust || { ensure_cargo; cargo install wallust; } || warn "Could not install wallust"
|
||||||
|
else
|
||||||
|
ensure_cargo
|
||||||
|
cargo install wallust || warn "Could not install wallust"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install lutgen
|
||||||
|
if command -v lutgen &>/dev/null || [ -f "$HOME/.cargo/bin/lutgen" ] || command -v lutgen-cli &>/dev/null; then
|
||||||
|
success "lutgen binary found!"
|
||||||
|
else
|
||||||
|
info "Installing lutgen..."
|
||||||
|
if [ "$PM" = "pacman" ] && command -v yay &>/dev/null; then
|
||||||
|
yay -S --needed --noconfirm lutgen-cli || { ensure_cargo; cargo install lutgen; } || warn "Could not install lutgen"
|
||||||
|
elif [ "$PM" = "pacman" ] && command -v paru &>/dev/null; then
|
||||||
|
paru -S --needed --noconfirm lutgen-cli || { ensure_cargo; cargo install lutgen; } || warn "Could not install lutgen"
|
||||||
|
else
|
||||||
|
ensure_cargo
|
||||||
|
cargo install lutgen || warn "Could not install lutgen"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 5. Copying and Linking Configurations
|
||||||
deploy_configs() {
|
deploy_configs() {
|
||||||
info "Deploying QuickShell configuration to ${TARGET_CONFIG_DIR}..."
|
info "Deploying QuickShell configuration to ${TARGET_CONFIG_DIR}..."
|
||||||
mkdir -p "${TARGET_CONFIG_DIR}"
|
mkdir -p "${TARGET_CONFIG_DIR}"
|
||||||
@ -278,6 +324,7 @@ run_initial_sync() {
|
|||||||
# Execution Flow
|
# Execution Flow
|
||||||
install_dependencies
|
install_dependencies
|
||||||
install_quickshell
|
install_quickshell
|
||||||
|
install_wallust_lutgen
|
||||||
deploy_configs
|
deploy_configs
|
||||||
setup_bashrc
|
setup_bashrc
|
||||||
setup_systemd_service
|
setup_systemd_service
|
||||||
|
|||||||
@ -8,7 +8,7 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string currentVariant: "Pro"
|
property string currentVariant: "Pro"
|
||||||
property string wallpaperPath: "file:///home/sho/Pictures/Wallpapers/Pro/lutgen_Pro_wallhaven.png"
|
property string wallpaperPath: "file://" + Quickshell.env("HOME") + "/Pictures/Wallpapers/Pro/lutgen_Pro_wallhaven.png"
|
||||||
|
|
||||||
readonly property var themeCategories: [
|
readonly property var themeCategories: [
|
||||||
"All", "Zoey Pink", "Dracula Pro", "Gruvbox", "Rosé Pine", "Catppuccin", "Everforest", "Tokyo Night", "Nord", "Solarized", "One Theme", "Monokai", "Cyberpunk"
|
"All", "Zoey Pink", "Dracula Pro", "Gruvbox", "Rosé Pine", "Catppuccin", "Everforest", "Tokyo Night", "Nord", "Solarized", "One Theme", "Monokai", "Cyberpunk"
|
||||||
@ -168,7 +168,7 @@ Item {
|
|||||||
wallpaperPath = imgPath.startsWith("file://") ? imgPath : "file://" + imgPath
|
wallpaperPath = imgPath.startsWith("file://") ? imgPath : "file://" + imgPath
|
||||||
let rawPath = imgPath.replace("file://", "")
|
let rawPath = imgPath.replace("file://", "")
|
||||||
Quickshell.execDetached(["plasma-apply-wallpaperimage", rawPath])
|
Quickshell.execDetached(["plasma-apply-wallpaperimage", rawPath])
|
||||||
Quickshell.execDetached(["/home/sho/.cargo/bin/wallust", "run", rawPath])
|
Quickshell.execDetached(["sh", "-c", "wallust run '" + rawPath + "' || ~/.cargo/bin/wallust run '" + rawPath + "' 2>/dev/null || true"])
|
||||||
|
|
||||||
// Persist selected theme variant to disk
|
// Persist selected theme variant to disk
|
||||||
Quickshell.execDetached(["sh", "-c", "echo '" + v.name + "' > ~/.config/quickshell_current_theme.txt"])
|
Quickshell.execDetached(["sh", "-c", "echo '" + v.name + "' > ~/.config/quickshell_current_theme.txt"])
|
||||||
@ -202,7 +202,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "/home/sho/Pictures/Wallpapers/" + varName + "/wallhaven-yqg6r7_1920x1080.png"
|
return Quickshell.env("HOME") + "/Pictures/Wallpapers/" + varName + "/wallhaven-yqg6r7_1920x1080.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
function cycleVariant() {
|
function cycleVariant() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user