]> git.phdru.name Git - xsetbg.git/blobdiff - xsetbg.py
Minor change in README
[xsetbg.git] / xsetbg.py
index 2658956c39fc39e78e36c84476ccb994254a4301..1aea77f28e2493885bdd24929ed0e9d79da47942 100644 (file)
--- a/xsetbg.py
+++ b/xsetbg.py
@@ -6,12 +6,6 @@ using xli program.
 
 """
 
-__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2015 PhiloSoft Design"
-__license__ = "GNU GPL"
-
-__all__ = ['change']
-
 from fcntl import flock, LOCK_EX, LOCK_UN, LOCK_NB
 from datetime import timedelta
 import os
@@ -24,6 +18,8 @@ from time import time
 from xsetbg_conf import xsetbg_dir, xsetbg_conf
 from xsetbg_db import xsetbg_db
 
+__all__ = ['change']
+
 
 def error(error_str):
     sys.exit("%s: Error: %s\n" % (sys.argv[0], error_str))
@@ -81,6 +77,7 @@ if xsetbg_db.select('last_shown IS NULL OR last_shown < %d' %
     error("No unshown images found. Run rescan_fs.py "
           "or decrease min_delay. Abort.")
 
+fs_encoding = xsetbg_conf.get("images", "fs_encoding")
 
 def change(force=False):
     # Use the program's file as the lock file:
@@ -121,7 +118,7 @@ def change(force=False):
 
         program_options = ["xli", "-border", random.choice(borders),
                            "-center", "-onroot", "-quiet", "-zoom", "auto",
-                           row.full_name]
+                           row.full_name.encode(fs_encoding)]
 
         rc = subprocess.call(program_options)
         if rc: