Update .config/alacritty/colors.toml Update .config/btop/btop.conf Update .config/btop/themes/matugen.theme Update .config/cava/themes/matugen_theme Update .config/matugen/config.toml Update .config/sway/config Update .config/sway/scripts/wallpaper_rotate.py Update .config/waybar/modules.jsonc Update .config/waybar/style.css
24 lines
No EOL
759 B
Python
24 lines
No EOL
759 B
Python
import subprocess
|
|
import os
|
|
import random
|
|
import time
|
|
|
|
wallpaper_location = "/home/yarne/Pictures/Wallpapers"
|
|
|
|
unused_wallpapers = os.listdir(wallpaper_location)
|
|
used_wallpapers = []
|
|
|
|
while True:
|
|
random_wallpaper_index = random.randint(0,len(unused_wallpapers) - 1)
|
|
random_wallpaper = unused_wallpapers.pop(random_wallpaper_index)
|
|
used_wallpapers.append(random_wallpaper)
|
|
random_wallpaper_location = f'{wallpaper_location}/{random_wallpaper}'
|
|
|
|
#matugen image $wallpaper --mode "dark"
|
|
wallpaper_rotate_command = subprocess.call(["matugen","image",random_wallpaper_location,"--mode","dark"])
|
|
|
|
if len(unused_wallpapers) == 0:
|
|
unused_wallpapers = os.listdir(wallpaper_location)
|
|
used_wallpapers = []
|
|
|
|
time.sleep(300) |