Name: sl-blue-dms-theme Version: 1.0.2 Release: 100.1%{?dist} Summary: Sl's blue theme for DankMaterialShell License: MIT URL: https://slsrepo.com BuildArch: noarch Requires: jq Requires: DankMaterialShell %description Sl's theme for DankMaterialShell with blue colors. The package script installs the theme into the first normal user's DankMaterialShell config, matching the Arch package behavior. %prep # No external source. Theme is generated by scriptlet, matching the Arch install file. %build # Scriptlet-only package. %install install -Dm644 /dev/null %{buildroot}%{_datadir}/sl-blue-dms-theme/.keep %post -p /bin/bash # Find the actual human user REAL_USER=${SUDO_USER:-$(awk -v val=1000 -F ":" '$3 >= val {print $1; exit}' /etc/passwd)} if [ -n "$REAL_USER" ] && [ "$REAL_USER" != "root" ]; then USER_HOME="/home/$REAL_USER" DMS_DIR="$USER_HOME/.config/DankMaterialShell" DMS_CONFIG="$DMS_DIR/settings.json" THEME_DEST="$DMS_DIR/themes/sl-blue.json" LOGO_DEST="$DMS_DIR/apple-logo.svg" echo "-> Generating SL Blue theme in $DMS_DIR/themes, applying Apple logo, and updating layout preferences..." # 1. Create the config and themes directories if they don't exist mkdir -p "$DMS_DIR/themes" # 2. Write the full JSON theme DIRECTLY to the themes folder cat << 'EOF' > "$THEME_DEST" { "dark": { "name": "Sl Blue Dark", "primary": "#6ea8fe", "secondary": "#92bfff", "primaryText": "#1f1f24", "primaryContainer": "#101521", "surfaceTint": "#6ea8fe", "surface": "#23242b", "surfaceText": "#ffffff", "surfaceVariant": "#23242b", "surfaceVariantText": "#9ca0b0", "background": "#1f1f24", "backgroundText": "#ffffff", "outline": "#5d82a1", "surfaceContainer": "#252731", "surfaceContainerHigh": "#32343f", "surfaceContainerHighest": "#414959", "error": "#f2b8b5", "warning": "#ff9800", "info": "#2196f3", "success": "#4caf50" }, "light": { "name": "Sl Blue Light", "primary": "#0074b8", "secondary": "#2f7ecb", "primaryText": "#ffffff", "primaryContainer": "#d4e4f7", "surfaceTint": "#0074b8", "surface": "#d4e4f7", "surfaceText": "#ffffff", "surfaceVariant": "#6b7e92", "surfaceVariantText": "#dddfe6", "background": "#f0f4f8", "backgroundText": "#dddfe6", "outline": "#a6cbea", "surfaceContainer": "#a2b5c9", "surfaceContainerHigh": "#8496a8", "surfaceContainerHighest": "#6b7e92", "error": "#f2b8b5", "warning": "#ff9800", "info": "#2196f3", "success": "#4caf50" } } EOF # 3. Write the Apple Logo svg to the user's home folder cat << 'EOF' > "$LOGO_DEST" EOF # Give the user ownership of their new files chown -R "$REAL_USER:$REAL_USER" "$DMS_DIR" # 4. Update settings.json to use the newly created files and layout preferences if [ -f "$DMS_CONFIG" ]; then BACKUP_FILE="${DMS_CONFIG}.bak-$(date +%%Y%%m%%d%%H%%M%%S)" echo "-> Backing up existing settings.json to $(basename "$BACKUP_FILE")" cp "$DMS_CONFIG" "$BACKUP_FILE" chown "$REAL_USER:$REAL_USER" "$BACKUP_FILE" jq --arg theme "$THEME_DEST" --arg logo "$LOGO_DEST" ' .currentThemeName = "custom" | .customThemeFile = $theme | .launcherLogoMode = "custom" | .launcherLogoCustomPath = $logo | .launcherLogoColorOverride = "" | .launcherLogoColorInvertOnMode = false | .launcherLogoBrightness = 0.5 | .launcherLogoContrast = 1 | .launcherLogoSizeOffset = -5 | .cornerRadius = 12 | .fontScale = 1.2 | .controlCenterShowNetworkIcon = true | .controlCenterShowBluetoothIcon = true | .controlCenterShowAudioIcon = true | .controlCenterShowAudioPercent = false | .controlCenterShowVpnIcon = true | .controlCenterShowBrightnessIcon = true | .controlCenterShowBrightnessPercent = false | .controlCenterShowMicIcon = false | .controlCenterShowMicPercent = false | .controlCenterShowBatteryIcon = false | .controlCenterShowPrinterIcon = true | .controlCenterShowScreenSharingIcon = true | .showDock = true | .dockPosition = 1 | .dockSpacing = 12 | .dockBottomGap = -25 | .dockMargin = 5 | .dockIconSize = 32 | .dockIndicatorStyle = "circle" | .dockBorderEnabled = true | .dockBorderColor = "surfaceText" | .dockBorderOpacity = 0.15 | .dockBorderThickness = 1 | ' "$DMS_CONFIG" > "${DMS_CONFIG}.tmp" && mv "${DMS_CONFIG}.tmp" "$DMS_CONFIG" else # Fallback if no settings.json exists cat << EOF > "$DMS_CONFIG" { "currentThemeName": "custom", "customThemeFile": "$THEME_DEST", "launcherLogoMode": "custom", "launcherLogoCustomPath": "$LOGO_DEST", "launcherLogoColorOverride": "", "launcherLogoColorInvertOnMode": false, "launcherLogoBrightness": 0.5, "launcherLogoContrast": 1, "launcherLogoSizeOffset": -5, "cornerRadius": 12, "fontScale": 1.2, "controlCenterShowNetworkIcon": true, "controlCenterShowBluetoothIcon": true, "controlCenterShowAudioIcon": true, "controlCenterShowAudioPercent": false, "controlCenterShowVpnIcon": true, "controlCenterShowBrightnessIcon": true, "controlCenterShowBrightnessPercent": false, "controlCenterShowMicIcon": false, "controlCenterShowMicPercent": false, "controlCenterShowBatteryIcon": false, "controlCenterShowPrinterIcon": true, "controlCenterShowScreenSharingIcon": true, "showDock": true, "dockPosition": 1, "dockSpacing": 12, "dockBottomGap": -25, "dockMargin": 5, "dockTransparency": 0.20, "dockIconSize": 32, "dockIndicatorStyle": "circle", "dockBorderEnabled": true, "dockBorderColor": "surfaceText", "dockBorderOpacity": 0.15, "dockBorderThickness": 1 } EOF fi # Ensure the user owns the config file chown "$REAL_USER:$REAL_USER" "$DMS_CONFIG" fi %postun -p /bin/bash REAL_USER=${SUDO_USER:-$(awk -v val=1000 -F ":" '$3 >= val {print $1; exit}' /etc/passwd)} if [ -n "$REAL_USER" ] && [ "$REAL_USER" != "root" ]; then THEME_DEST="/home/$REAL_USER/.config/DankMaterialShell/themes/sl-blue.json" LOGO_DEST="/home/$REAL_USER/.config/DankMaterialShell/apple-logo.svg" if [ -f "$THEME_DEST" ]; then echo "-> Removing SL Blue theme from user's config..." rm -f "$THEME_DEST" fi if [ -f "$LOGO_DEST" ]; then echo "-> Removing apple-logo.svg from user's config..." rm -f "$LOGO_DEST" fi fi %files %dir %{_datadir}/sl-blue-dms-theme %{_datadir}/sl-blue-dms-theme/.keep %changelog * Sat Jun 20 2026 Sl (Shahaf Levi) - 1.0.2-1 - Initial COPR package for Slash