forked from Shinonome/dots-hyprland
fix swww query (#270)
This commit is contained in:
@@ -11,7 +11,7 @@ colorstrings=''
|
|||||||
colorlist=()
|
colorlist=()
|
||||||
colorvalues=()
|
colorvalues=()
|
||||||
|
|
||||||
# wallpath=$(swww query | awk -F 'image: ' '{print $2}')
|
# wallpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}')
|
||||||
# wallpath_png="$HOME"'/.cache/ags/user/generated/hypr/lockscreen.png'
|
# wallpath_png="$HOME"'/.cache/ags/user/generated/hypr/lockscreen.png'
|
||||||
# convert "$wallpath" "$wallpath_png"
|
# convert "$wallpath" "$wallpath_png"
|
||||||
# wallpath_png=$(echo "$wallpath_png" | sed 's/\//\\\//g')
|
# wallpath_png=$(echo "$wallpath_png" | sed 's/\//\\\//g')
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ elif len(sys.argv) > 1 and sys.argv[1] == '--color':
|
|||||||
else:
|
else:
|
||||||
# try:
|
# 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 = subprocess.check_output("swww query | head -1 | awk -F 'image: ' '{print $2}'", shell=True)
|
||||||
imagePath = imagePath[:-1].decode("utf-8")
|
imagePath = imagePath[:-1].decode("utf-8")
|
||||||
img = Image.open(imagePath)
|
img = Image.open(imagePath)
|
||||||
basewidth = 64
|
basewidth = 64
|
||||||
wpercent = (basewidth/float(img.size[0]))
|
wpercent = (basewidth/float(img.size[0]))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$1" == "--noswitch" ]; then
|
if [ "$1" == "--noswitch" ]; then
|
||||||
imgpath=$(swww query | awk -F 'image: ' '{print $2}'| head -n 1)
|
imgpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}')
|
||||||
# imgpath=$(ags run-js 'wallpaper.get(0)')
|
# imgpath=$(ags run-js 'wallpaper.get(0)')
|
||||||
else
|
else
|
||||||
# Select and set image (hyprland)
|
# Select and set image (hyprland)
|
||||||
|
|||||||
Reference in New Issue
Block a user