back to swww (for performance)

This commit is contained in:
end-4
2024-01-23 12:00:37 +07:00
parent 63d471c3df
commit b8991d3893
3 changed files with 6 additions and 4 deletions
@@ -34,7 +34,8 @@ elif len(sys.argv) > 1 and sys.argv[1] == '--color':
newtheme = themeFromSourceColor(argbFromHex(colorstr))
else:
# try:
imagePath = subprocess.check_output("ags run-js 'wallpaper.get(0)'", shell=True)
# imagePath = subprocess.check_output("ags run-js 'wallpaper.get(0)'", shell=True)
imagePath = subprocess.check_output("swww query | awk -F 'image: ' '{print $2}'", shell=True)
imagePath = imagePath[:-1].decode("utf-8")
img = Image.open(imagePath)
basewidth = 64
@@ -1,7 +1,8 @@
#!/usr/bin/bash
if [ "$1" == "--noswitch" ]; then
imgpath=$(ags run-js 'wallpaper.get(0)')
imgpath=$(swww query | awk -F 'image: ' '{print $2}')
# imgpath=$(ags run-js 'wallpaper.get(0)')
else
# Select and set image (hyprland)
cd "$HOME/Pictures"