changeset 32:40f51ad1e9ba

bing4desktop-0.240208-2
author prymula <prymula76@outlook.com>
date Thu, 08 Feb 2024 18:29:07 +0100
parents c1061f0721d7
children 1d063d3bf7ff
files bing4desktop/Changelog.txt bing4desktop/bing4desktop.py
diffstat 2 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/bing4desktop/Changelog.txt	Thu Feb 08 16:14:36 2024 +0100
+++ b/bing4desktop/Changelog.txt	Thu Feb 08 18:29:07 2024 +0100
@@ -1,3 +1,4 @@
+0.240208-2 - Dostosowanie skryptu do LXQT (Lubuntu)
 0.240208-1 - Roszady z Makefile
 0.240208-0 - Ograniczylem zależności dla budowy pakietów, dla Debiana
 0.240207-4 - Próby zbudowania pakietu dla Debiana - nie udane
--- a/bing4desktop/bing4desktop.py	Thu Feb 08 16:14:36 2024 +0100
+++ b/bing4desktop/bing4desktop.py	Thu Feb 08 18:29:07 2024 +0100
@@ -154,8 +154,10 @@
                 # command found at http://blackboxwm.sourceforge.net/BlackboxDocumentation/BlackboxBackground
                 args = ["bsetbg", "-full", file_loc]
                 subprocess.Popen(args)
-            elif desktop_env=="lxde":
-                args = "pcmanfm --set-wallpaper %s --wallpaper-mode=scaled" % file_loc
+            elif desktop_env in ['xqt', 'Lubuntu']:
+                #args = "pcmanfm --set-wallpaper %s --wallpaper-mode=scaled" % file_loc
+                args = "pcmanfm-qt --set-wallpaper=" + file_loc + " --wallpaper-mode=fit"
+                print ("ALOCHA: "+args)
                 subprocess.Popen(args,shell=True)
             elif desktop_env=="WindowMaker":
                 # From http://www.commandlinefu.com/commands/view/3857/set-wallpaper-on-windowmaker-in-one-line
@@ -238,13 +240,13 @@
                 exit
             
             # Wszystko pięknie tylko metoda 'show', zmienia nazwę pliku przechowywanego w TMP
-            # Pozatym nie ubija a nie znalazłem nic lepszego
-            print ("GLOB: ", glob.glob( os.path.join('/tmp', '*.PNG')))
-            for infile in glob.glob( os.path.join('/tmp', '*.PNG')):
-                print ("INFILE: ", infile)
-                viewer = subprocess.Popen(['/usr/bin/eom', infile])
-                viewer.terminate()
-                viewer.kill()  # make sure the viewer is gone; not needed on Windows  
+            ## Pozatym nie ubija a nie znalazłem nic lepszego
+            #print ("GLOB: ", glob.glob( os.path.join('/tmp', '*.PNG')))
+            #for infile in glob.glob( os.path.join('/tmp', '*.PNG')):
+            #    print ("INFILE: ", infile)
+            #    viewer = subprocess.Popen(['/usr/bin/eom', infile])
+            #    viewer.terminate()
+            #    viewer.kill()  # make sure the viewer is gone; not needed on Windows  
                 
             img = Image.open(full_path) #.convert('RGBA')  # PIL solution
             self.tmp = img.resize((600, 400), None, None, 3.0)