mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-09 05:05:27 +00:00
Fuzzel: creates config if not existing
This commit is contained in:
+12
-6
@@ -106,9 +106,18 @@ EOF
|
|||||||
fuzzel)
|
fuzzel)
|
||||||
echo "🎨 Applying 'noctalia' theme to fuzzel..."
|
echo "🎨 Applying 'noctalia' theme to fuzzel..."
|
||||||
CONFIG_FILE="$HOME/.config/fuzzel/fuzzel.ini"
|
CONFIG_FILE="$HOME/.config/fuzzel/fuzzel.ini"
|
||||||
|
|
||||||
# Check if the config file exists.
|
# Check if the config file exists, create it if it doesn't.
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
if [ ! -f "$CONFIG_FILE" ]; then
|
||||||
|
echo "Config file not found, creating $CONFIG_FILE..."
|
||||||
|
# Create the config directory if it doesn't exist
|
||||||
|
mkdir -p "$(dirname "$CONFIG_FILE")"
|
||||||
|
# Create the config file with the noctalia theme
|
||||||
|
cat > "$CONFIG_FILE" << 'EOF'
|
||||||
|
include=~/.config/fuzzel/themes/noctalia
|
||||||
|
EOF
|
||||||
|
echo "Created new config file with noctalia theme."
|
||||||
|
else
|
||||||
# Check if theme is already set to noctalia
|
# Check if theme is already set to noctalia
|
||||||
if grep -q "include=~/.config/fuzzel/themes/noctalia" "$CONFIG_FILE"; then
|
if grep -q "include=~/.config/fuzzel/themes/noctalia" "$CONFIG_FILE"; then
|
||||||
echo "Theme already set to noctalia, skipping modification."
|
echo "Theme already set to noctalia, skipping modification."
|
||||||
@@ -118,9 +127,6 @@ EOF
|
|||||||
# Add the new theme include line.
|
# Add the new theme include line.
|
||||||
echo "include=~/.config/fuzzel/themes/noctalia" >> "$CONFIG_FILE"
|
echo "include=~/.config/fuzzel/themes/noctalia" >> "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Error: fuzzel config file not found at $CONFIG_FILE" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user