Skip to content
This repository has been archived by the owner on Dec 28, 2018. It is now read-only.

Commit

Permalink
fix wallpaper that doesn't change
Browse files Browse the repository at this point in the history
  • Loading branch information
reorr committed Nov 9, 2017
1 parent f80768d commit d5ee2dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ done
cp "$ASSETS_DIR"/* "$ASSETS_DIR20"/
cp "$ASSETS_DIR"/* "$ASSETS_DIR22"/

echo Appliying theme
echo Applying theme
xfconf-query -c xfwm4 -p /general/theme -s "adwaita"
xfconf-query -c xfwm4 -p /general/theme -s "xfcolorize"
xfconf-query -c xsettings -p /Net/ThemeName -s "adwaita"
Expand Down
3 changes: 2 additions & 1 deletion wallpaper.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
wallpaper=/home/lemone/Pictures/bg/solidbg/1502226399429.png&&properties=$(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$") && for property in $properties; do xfconf-query -c xfce4-desktop -p $property -s "$wallpaper"; done
echo Applying wallpaper
wallpaper=/home/lemone/Pictures/bg/renders_in_shape/touka3.png&&properties=$(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$") && for property in $properties; do xfconf-query -c xfce4-desktop -p $property -s "$wallpaper"; done
8 changes: 4 additions & 4 deletions xfcolorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def rgb_to_hex(rgb):
return '%02x%02x%02x' % rgb

if args.image[0]:
wallpaperpaper=(args.image[0])
wallpaper=(args.image[0])
print ("Generating palette color")
color_thief = ColorThief(args.image[0])
#dominant_color = color_thief.get_color(quality=1)
Expand All @@ -31,9 +31,9 @@ def rgb_to_hex(rgb):
print("Color can't be same")
else :
init_file = open( 'wallpaper.sh', 'w' )
init_file.writelines( [ '#!/bin/bash\n', 'wallpaper=' + args.image[0] + '&&'] )
init_file.writelines( [ '#!/bin/bash\n', 'echo ', 'Applying ', 'wallpaper\n', 'wallpaper=' + args.image[0] + '&&'] )
init_file.writelines( [ 'properties=$(xfconf-query ', '-c ', 'xfce4-desktop ', '-p ', '/backdrop ', '-l ', '| ', 'grep ', '-e ', '"screen.*/monitor.*image-path$" ', '-e ', '"screen.*/monitor.*/last-image$") ', '&& '])
init_file.writelines( [ 'for ', 'property ', 'in ', '$properties; ', 'do ', 'xfconf-query ', '-c ', 'xfce4-desktop ', '-p ', '$property ', '-s ', '"$wallpaperpaper"; ', 'done'])
init_file.writelines( [ 'for ', 'property ', 'in ', '$properties; ', 'do ', 'xfconf-query ', '-c ', 'xfce4-desktop ', '-p ', '$property ', '-s ', '"$wallpaper"; ', 'done'])
init_file.close()
subprocess.Popen( [ 'chmod', '+x', './color.sh' ] )
subprocess.Popen( [ 'chmod', '+x', './wallpaper.sh' ] )
Expand All @@ -47,7 +47,7 @@ def rgb_to_hex(rgb):
else :
#print(new_palette)
init_file = open( 'wallpaper.sh', 'w' )
init_file.writelines( [ '#!/bin/bash\n', 'wallpaper=' + args.image[0] + '&&'] )
init_file.writelines( [ '#!/bin/bash\n', 'echo ', 'Applying ', 'wallpaper\n', 'wallpaper=' + args.image[0] + '&&'] )
init_file.writelines( [ 'properties=$(xfconf-query ', '-c ', 'xfce4-desktop ', '-p ', '/backdrop ', '-l ', '| ', 'grep ', '-e ', '"screen.*/monitor.*image-path$" ', '-e ', '"screen.*/monitor.*/last-image$") ', '&& '])
init_file.writelines( [ 'for ', 'property ', 'in ', '$properties; ', 'do ', 'xfconf-query ', '-c ', 'xfce4-desktop ', '-p ', '$property ', '-s ', '"$wallpaper"; ', 'done'])
init_file.close()
Expand Down

0 comments on commit d5ee2dd

Please sign in to comment.