added creation of random wallpaper
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
*.save
|
||||
*.log
|
||||
hyprlock.conf
|
||||
hyprpaper.conf
|
||||
@@ -1,7 +1,9 @@
|
||||
# Needs To start first
|
||||
exec-once = tmux new-session -d -s qs 'quickshell'
|
||||
exec-once = hypridle
|
||||
exec-once = hyprpaper
|
||||
# exec-once = hyprpaper
|
||||
# now via: systemctl --user enable --now hyprpaper.service
|
||||
exec-once = bash -c '~/.config/hypr/scripts/wallpapers/random_wallpaper.sh > ~/.config/hypr/scripts/wallpaper/random_wallpaper.log'
|
||||
exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
exec-once = tmux new-session -d -s keyring '/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg'
|
||||
# exec-once = sleep 1 && ~/.config/hypr/scripts/wallpapers/wallpaper.sh
|
||||
|
||||
+5
-5
@@ -15,7 +15,7 @@ background {
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%H:%M")"
|
||||
color = 0xFFcbcb77
|
||||
color = 0xFFa6d395
|
||||
font_size = 80
|
||||
font_family = JetBrains Mono ExtraBold
|
||||
position = 0, 140
|
||||
@@ -27,7 +27,7 @@ label {
|
||||
label {
|
||||
monitor =
|
||||
text = - PAIN IS REAL, BUT SO IS HOPE -
|
||||
color = 0xFFa4d0bd
|
||||
color = 0xFFa0cfd1
|
||||
font_size = 12
|
||||
font_family = JetBrains Mono ExtraLight
|
||||
position = 0, 80
|
||||
@@ -39,7 +39,7 @@ label {
|
||||
label {
|
||||
monitor =
|
||||
text = Heya $USER :3
|
||||
color = 0xFFcbcb77
|
||||
color = 0xFFa6d395
|
||||
font_size = 20
|
||||
font_family = JetBrains Mono Light
|
||||
position = 0, 0
|
||||
@@ -55,8 +55,8 @@ input-field {
|
||||
dots_size = 0.2
|
||||
dots_spacing = 0.4
|
||||
dots_center = true
|
||||
inner_color = 0xFF494900
|
||||
font_color = 0xFFcbcb77
|
||||
inner_color = 0xFF294f1f
|
||||
font_color = 0xFFa6d395
|
||||
fade_on_empty = false
|
||||
placeholder_text = unlock the magic...
|
||||
fail_color = 0xFFffb4ab
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
wallpaper {
|
||||
monitor = *
|
||||
path = /home/honney/Pictures/Wallpapers/forest_lake_stump.png
|
||||
path = /home/honney/Pictures/Wallpapers/countryside_river.png
|
||||
fit_mode = cover
|
||||
}
|
||||
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
wallpapers_dir="$HOME/Pictures/Wallpapers/"
|
||||
current_wallpaper=$(cat $wallpapers_dir"/Static/current")
|
||||
|
||||
# Pick a random wallpaper from the directory but not the current_wallpaper
|
||||
image=$(find "$wallpapers_dir" -maxdepth 1 -type f ! -name "$(basename "$current_wallpaper")" | shuf -n 1)
|
||||
|
||||
echo "Image $image"
|
||||
|
||||
# Check if an image was provided
|
||||
if [[ -z "$image" ]]; then
|
||||
echo "Usage: $0 /path/to/image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x "/usr/bin/swww-daemon" ]; then
|
||||
echo "swww-daemon exists and is executable"
|
||||
|
||||
# Check if swww daemon is running
|
||||
if ! pgrep -x "swww-daemon" > /dev/null; then
|
||||
echo "Starting swww daemon..."
|
||||
swww-daemon &
|
||||
|
||||
# Give the daemon a moment to start
|
||||
sleep 0.2
|
||||
echo "daemon started"
|
||||
fi
|
||||
|
||||
# Set the wallpaper
|
||||
echo "running"
|
||||
swww img "$image" -t grow --transition-duration 1
|
||||
|
||||
elif [ -x "/usr/bin/hyprpaper" ]; then
|
||||
echo "hyprpaper exists and is executable"
|
||||
|
||||
if ! pgrep -x "hyprpaper" > /dev/null; then
|
||||
echo "Starting hyprpaper daemon..."
|
||||
hyprpaper &
|
||||
|
||||
# Give the daemon a moment to start
|
||||
sleep 0.2
|
||||
echo "daemon started"
|
||||
fi
|
||||
sed -i "3s|path = .*|path = ${image}|" ~/.config/hypr/hyprpaper.conf
|
||||
hyprctl hyprpaper wallpaper ", $image"
|
||||
echo "set Wallpaper to $image with hyprpaper"
|
||||
fi
|
||||
|
||||
if [ -x "/usr/bin/matugen" ]; then
|
||||
matugen image $image --mode dark --source-color-index 0
|
||||
else
|
||||
cp $HOME/.config/quickshell/colors/example_colors.qml $HOME/.config/quickshell/colors/Colors.qml
|
||||
fi
|
||||
|
||||
### Blured Wallpaper for wlogout
|
||||
blur="50x30"
|
||||
static_wallpaper_dir="$HOME/Pictures/Wallpapers/Static"
|
||||
|
||||
if [ ! -d $static_wallpaper_dir ]; then
|
||||
mkdir -p $static_wallpaper_dir;
|
||||
fi
|
||||
|
||||
current_wallpaper="$static_wallpaper_dir/current"
|
||||
|
||||
echo "$image" > $current_wallpaper
|
||||
|
||||
blurred_wp="$static_wallpaper_dir/blurred.jpg"
|
||||
|
||||
if [ -x "/usr/bin/sddm" ]; then
|
||||
magick $image -blur $blur $blurred_wp
|
||||
else
|
||||
cp $image $blurred_wp
|
||||
fi
|
||||
if [ -x "/usr/bin/sddm" ] && [ -d "/usr/share/backgrounds" ]; then
|
||||
sddm_background="/usr/share/backgrounds/background.jpg"
|
||||
cp "$image" "$sddm_background"
|
||||
fi
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB |
Reference in New Issue
Block a user