mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
fix swww query (#270)
This commit is contained in:
parent
9e9a300b01
commit
f6e9f4b6dc
3 changed files with 4 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ colorstrings=''
|
|||
colorlist=()
|
||||
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'
|
||||
# convert "$wallpath" "$wallpath_png"
|
||||
# wallpath_png=$(echo "$wallpath_png" | sed 's/\//\\\//g')
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ elif len(sys.argv) > 1 and sys.argv[1] == '--color':
|
|||
else:
|
||||
# try:
|
||||
# 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")
|
||||
imagePath = subprocess.check_output("swww query | head -1 | awk -F 'image: ' '{print $2}'", shell=True)
|
||||
imagePath = imagePath[:-1].decode("utf-8")
|
||||
img = Image.open(imagePath)
|
||||
basewidth = 64
|
||||
wpercent = (basewidth/float(img.size[0]))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
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)')
|
||||
else
|
||||
# Select and set image (hyprland)
|
||||
|
|
|
|||
Loading…
Reference in a new issue