-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset_wallpapers_auto.sh
More file actions
executable file
·60 lines (55 loc) · 2.51 KB
/
set_wallpapers_auto.sh
File metadata and controls
executable file
·60 lines (55 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Automatically set wallpapers for Konsole color schemes
KONSOLE_DIR="$HOME/.local/share/konsole"
IMAGES_DIR="$HOME/Pictures/konsole_forests"
echo "Setting wallpapers for Konsole color schemes..."
echo "================================================"
# Function to set wallpaper for a color scheme
set_wallpaper() {
local colorscheme="$1"
local wallpaper="$2"
local colorscheme_file="$KONSOLE_DIR/${colorscheme}.colorscheme"
if [ -f "$colorscheme_file" ]; then
# Add wallpaper setting to colorscheme
if grep -q "^\[General\]" "$colorscheme_file"; then
# Update existing [General] section
sed -i "/^\[General\]/a Wallpaper=$wallpaper" "$colorscheme_file"
# Remove duplicate Wallpaper lines (keep only first)
awk '!seen[$0]++ || !/^Wallpaper=/' "$colorscheme_file" > "${colorscheme_file}.tmp"
mv "${colorscheme_file}.tmp" "$colorscheme_file"
fi
echo "✓ Set wallpaper for $colorscheme"
else
echo "✗ Color scheme file not found: $colorscheme_file"
fi
}
# Note: Konsole doesn't directly support wallpapers in colorschemes
# Wallpapers need to be set manually per profile
echo ""
echo "NOTE: Konsole requires wallpapers to be set manually for each profile"
echo " These cannot be set programmatically via color schemes"
echo ""
echo "To set wallpapers:"
echo "1. Open Konsole"
echo "2. Settings > Edit Current Profile > Appearance"
echo "3. Click 'Edit...' next to the Color Scheme"
echo "4. Go to the 'Background' tab"
echo "5. Select 'Image' and choose the corresponding forest image"
echo ""
echo "Profile to Image Mapping:"
echo "========================="
echo ""
echo "Forest_MistyMorning -> $IMAGES_DIR/01_misty_morning.png"
echo "Forest_DarkEvergreen -> $IMAGES_DIR/02_dark_evergreen.png"
echo "Forest_AutumnGlow -> $IMAGES_DIR/03_autumn_glow.png"
echo "Forest_BambooZen -> $IMAGES_DIR/04_bamboo_zen.png"
echo "Forest_SnowyPines -> $IMAGES_DIR/05_snowy_pines.png"
echo "Forest_TropicalRainforest -> $IMAGES_DIR/06_tropical_rainforest.png"
echo "Forest_SunsetCanopy -> $IMAGES_DIR/07_sunset_canopy.png"
echo "Forest_MossyGrove -> $IMAGES_DIR/08_mossy_grove.png"
echo "Forest_BirchMinimal -> $IMAGES_DIR/09_birch_minimal.png"
echo "Forest_NightForest -> $IMAGES_DIR/10_night_forest.png"
echo ""
echo "================================================"
echo "Profiles are ready to use in Konsole!"
echo "================================================"