From c41022ff7fad62821f620d3e2ee22ada5e2faa38 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 28 Feb 2019 18:27:19 -0700 Subject: [PATCH 1/4] Issue #330: MacOS Mojave Dock Crash --- pywal/wallpaper.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index e648d5a..3ab38af 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -109,7 +109,18 @@ def set_mac_wallpaper(img): """Set the wallpaper on macOS.""" db_file = "Library/Application Support/Dock/desktoppicture.db" db_path = os.path.join(HOME, db_file) - subprocess.call(["sqlite3", db_path, "update data set value = '%s'" % img]) + img_dir, _ = os.path.split(img); + + #Clear the existing picture data and write the image paths + sql = "delete from data; " + sql += "insert into data values(\"%s\"); " % img_dir + sql += "insert into data values(\"%s\"); " % img + + #Set all monitors/workspaces to the selected image + sql += "update preferences set data_id=2 where key=1 or key=2 or key=3; " + sql += "update preferences set data_id=1 where key=10 or key=20 or key=30;" + + subprocess.call(["sqlite3", db_path, sql]) # Kill the dock to fix issues with cached wallpapers. # macOS caches wallpapers and if a wallpaper is set that shares From 59929df445c8b198bf055ee0fa10fc49466c1d91 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 28 Feb 2019 18:44:42 -0700 Subject: [PATCH 2/4] pylint check --- pywal/wallpaper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index 3ab38af..32573df 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -109,10 +109,10 @@ def set_mac_wallpaper(img): """Set the wallpaper on macOS.""" db_file = "Library/Application Support/Dock/desktoppicture.db" db_path = os.path.join(HOME, db_file) - img_dir, _ = os.path.split(img); + img_dir, _ = os.path.split(img) #Clear the existing picture data and write the image paths - sql = "delete from data; " + sql = "delete from data; " sql += "insert into data values(\"%s\"); " % img_dir sql += "insert into data values(\"%s\"); " % img From f538f55ea3e3e8a62c7134b582eb5e00e8eb69f8 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 28 Feb 2019 18:47:58 -0700 Subject: [PATCH 3/4] comment spacing --- pywal/wallpaper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index 32573df..e711713 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -111,12 +111,12 @@ def set_mac_wallpaper(img): db_path = os.path.join(HOME, db_file) img_dir, _ = os.path.split(img) - #Clear the existing picture data and write the image paths + # Clear the existing picture data and write the image paths sql = "delete from data; " sql += "insert into data values(\"%s\"); " % img_dir sql += "insert into data values(\"%s\"); " % img - #Set all monitors/workspaces to the selected image + # Set all monitors/workspaces to the selected image sql += "update preferences set data_id=2 where key=1 or key=2 or key=3; " sql += "update preferences set data_id=1 where key=10 or key=20 or key=30;" From e2cea2808c46cb85e3f5fb51b607a09addacb9bc Mon Sep 17 00:00:00 2001 From: rob Date: Wed, 6 Mar 2019 22:19:28 -0700 Subject: [PATCH 4/4] Issue #382 - transparent iTerm2 cursor --- pywal/sequences.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pywal/sequences.py b/pywal/sequences.py index b42c3b7..b5028bc 100644 --- a/pywal/sequences.py +++ b/pywal/sequences.py @@ -11,7 +11,7 @@ from . import util def set_special(index, color, iterm_name="h", alpha=100): """Convert a hex color to a special sequence.""" - if OS == "Darwin": + if OS == "Darwin" and iterm_name: return "\033]P%s%s\033\\" % (iterm_name, color.strip("#")) if index in [11, 708] and alpha != "100": @@ -51,16 +51,16 @@ def create_sequences(colors, vte_fix=False): set_special(10, colors["special"]["foreground"], "g"), set_special(11, colors["special"]["background"], "h", alpha), set_special(12, colors["special"]["cursor"], "l"), - set_special(13, colors["special"]["foreground"], "l"), - set_special(17, colors["special"]["foreground"], "l"), - set_special(19, colors["special"]["background"], "l"), + set_special(13, colors["special"]["foreground"], "j"), + set_special(17, colors["special"]["foreground"], "k"), + set_special(19, colors["special"]["background"], "m"), set_color(232, colors["special"]["background"]), set_color(256, colors["special"]["foreground"]) ]) if not vte_fix: sequences.extend( - set_special(708, colors["special"]["background"], "l", alpha) + set_special(708, colors["special"]["background"], "", alpha) ) if OS == "Darwin":