Update .config/sway/config
Remove .config/sway/scripts/wallpaper_rotate.py Add .config/sway/scripts/wallpaper_rotate.py
This commit is contained in:
parent
10a37f0fd1
commit
72a39566ac
3 changed files with 25 additions and 2 deletions
|
|
@ -42,8 +42,8 @@ bindsym XF86AudioPrev exec playerctl previous
|
|||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
#output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
output * bg $wallpaper fill
|
||||
exec_always matugen image $wallpaper --mode "dark"
|
||||
#output * bg $wallpaper fill
|
||||
|
||||
|
||||
#
|
||||
# Example configuration:
|
||||
|
|
@ -265,9 +265,12 @@ bar {
|
|||
#}
|
||||
}
|
||||
|
||||
exec python3 ~/.config/sway/scripts/wallpaper_rotate.py
|
||||
exec mako
|
||||
exec steam
|
||||
exec ticktick
|
||||
exec vesktop -m
|
||||
exec firefox
|
||||
exec feishin
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
|
|
|||
20
private_dot_config/sway/scripts/wallpaper_rotate.py
Normal file
20
private_dot_config/sway/scripts/wallpaper_rotate.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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))
|
||||
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"])
|
||||
|
||||
time.sleep(300)
|
||||
Loading…
Reference in a new issue