mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-11-24 14:35:56 +00:00
Update background_selection.py
This commit is contained in:
parent
d76bfead73
commit
c51419c67d
@ -1,10 +1,10 @@
|
||||
import os
|
||||
import random
|
||||
|
||||
image_dir = '/home/bratwolf/Pictures/cyberpunk/wallhaven_alpha_wallhaven_cc_tag_376'
|
||||
install_dir = '/opt/cool-retro-term/'
|
||||
scale_perc = 0.18
|
||||
opacity_perc = 0.7
|
||||
image_dir = '/directory/to/image/folder' # path to the background image folder
|
||||
install_dir = '/opt/cool-retro-term/' # leave like this if you follow the install instructions
|
||||
scale_perc = 0.18 # downscale factor of background image (0.18 => 18% of original size) is used for pixellation
|
||||
opacity_perc = 0.7 # opacity of the background image, so you still see your desktop
|
||||
|
||||
scale_perc = int(scale_perc*100)
|
||||
if image_dir[-1] != '/':
|
||||
@ -16,4 +16,3 @@ if len(files) > 0:
|
||||
random.shuffle(files)
|
||||
os.system('convert -resize '+str(scale_perc)+'% '+image_dir+files[0]+' '+install_dir+'background.png')
|
||||
os.system('convert '+install_dir+'background.png -alpha set -background none -channel A -evaluate multiply '+str(round(opacity_perc,2))+' +channel '+install_dir+'background.png')
|
||||
copyfile(image_dir+files[0], '/opt/cool-retro-term/background.jpg')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user