From 1da37318eb00ba4867261a7b87b56ef6ef3c72b6 Mon Sep 17 00:00:00 2001 From: threadreaper Date: Tue, 4 Aug 2020 03:30:23 -0500 Subject: [PATCH 1/4] Errors fixed. --- pywal/export.py | 6 ++++-- pywal/wallpaper.py | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pywal/export.py b/pywal/export.py index 12505288..24c0656c 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -58,14 +58,16 @@ def template(colors, input_file, output_file=None): # If the color was changed, replace with a unique identifier. if new_color is not colors[cname]: new_color = str(new_color) - new_color_clean = new_color.replace('[', '_').replace(']', '_').replace('.', '_') + new_color_clean = new_color.replace( + '[', '_').replace(']', '_').replace('.', '_') template_data[i] = l.replace(replace_str, "color" + new_color_clean) colors["color" + new_color_clean] = new_color try: template_data = "".join(template_data).format(**colors) except (ValueError, KeyError, AttributeError) as exc: - logging.error("Syntax error in template file '%s': %r.", input_file, exc) + logging.error("Syntax error in template file '%s': %r.", + input_file, exc) return util.save_file(template_data, output_file) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index f654187e..ac5496b8 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -115,7 +115,7 @@ def set_desktop_wallpaper(desktop, img): elif "awesome" in desktop: util.disown(["awesome-client", "require('gears').wallpaper.maximized('{img}')" - .format(**locals())]) + .format(**locals())]) elif "kde" in desktop: string = """ @@ -124,8 +124,9 @@ def set_desktop_wallpaper(desktop, img): d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General"); d.writeConfig("Image", "%s")}; """ - util.disown(["qdbus", "org.kde.plasmashell", "/PlasmaShell", "org.kde.PlasmaShell.evaluateScript", - string % img]) + util.disown(["qdbus", "org.kde.plasmashell", "/PlasmaShell", + "org.kde.PlasmaShell.evaluateScript", string % img]) + else: set_wm_wallpaper(img) From 477ff3a08144bcaf4f6d820cd21591b8293dd09f Mon Sep 17 00:00:00 2001 From: threadreaper Date: Tue, 4 Aug 2020 03:43:15 -0500 Subject: [PATCH 2/4] Ok, I'm new at this, last one, srsly! --- pywal/wallpaper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index ac5496b8..eb177886 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -121,8 +121,8 @@ def set_desktop_wallpaper(desktop, img): string = """ var allDesktops = desktops();for (i=0;i Date: Tue, 4 Aug 2020 22:24:37 -0500 Subject: [PATCH 3/4] Some tweaks and a minor corrections to the Notepadqq template. --- pywal/templates/colors-nqq.css | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pywal/templates/colors-nqq.css b/pywal/templates/colors-nqq.css index 9396cdb5..be3aa3bf 100644 --- a/pywal/templates/colors-nqq.css +++ b/pywal/templates/colors-nqq.css @@ -3,29 +3,29 @@ * https://github.com/threadreaper */ -.cm-s-nqqwal .CodeMirror-gutters {{ background: {background} !important; }} -.cm-s-nqqwal .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded {{ color: {foreground}; }} -.cm-s-nqqwal .CodeMirror-cursor {{ border-left: 1px solid {foreground}; background-color: rgba({color6.rgb},0.4)}} -.cm-s-nqqwal {{ background-color: {background}; color: {foreground}; }} -.cm-s-nqqwal span.cm-builtin {{ color: {color2}; font-weight: bold; }} -.cm-s-nqqwal span.cm-comment {{ color: {color8}; }} -.cm-s-nqqwal span.cm-keyword {{ color: {color3}; font-weight: bold; }} -.cm-s-nqqwal span.cm-atom {{ color: {color4}; }} -.cm-s-nqqwal span.cm-def {{ color: {color5}; }} -.cm-s-nqqwal span.cm-variable {{ color: {color6}; }} -.cm-s-nqqwal span.cm-variable-2 {{ color: {color5}; }} -.cm-s-nqqwal span.cm-string {{ color: {color2}; }} -.cm-s-nqqwal span.cm-string-2 {{ color: {color2}; }} -.cm-s-nqqwal span.cm-number {{ color: {color5}; }} -.cm-s-nqqwal span.cm-tag {{ color: {color3}; }} -.cm-s-nqqwal span.cm-property {{ color: {color6}; }} -.cm-s-nqqwal span.cm-attribute {{ color: {color6}; }} -.cm-s-nqqwal span.cm-qualifier {{ color: {color4}; }} -.cm-s-nqqwal span.cm-meta {{ color: {color5}; }} -.cm-s-nqqwal span.cm-header {{ color: {color3}; }} -.cm-s-nqqwal span.cm-operator {{ color: {color3}; }} -.cm-s-nqqwal span.CodeMirror-matchingbracket {{ box-sizing: border-box; background: transparent; border-bottom: 1px solid; }} -.cm-s-nqqwal span.CodeMirror-nonmatchingbracket {{ border-bottom: 1px solid; background: none; }} -.cm-s-nqqwal .CodeMirror-activeline-background {{ background: rgba({color5.rgb},0.4); }} -.cm-s-nqqwal div.CodeMirror-selected {{ background: {color3}; }} -.cm-s-nqqwal .CodeMirror-focused div.CodeMirror-selected {{ background: {color0}); }} +.cm-s-colors-nqq.css .CodeMirror-gutters {{ background: {background} !important; }} +.cm-s-colors-nqq.css .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded {{ color: {foreground}; }} +.cm-s-colors-nqq.css .CodeMirror-cursor {{ border-left: 1px solid {foreground}; background-color: rgba({color6.rgb},0.4)}} +.cm-s-colors-nqq.css {{ background-color: {background}; color: {foreground}; }} +.cm-s-colors-nqq.css span.cm-builtin {{ color: {color2}; font-weight: bold; }} +.cm-s-colors-nqq.css span.cm-comment {{ color: {color8}; }} +.cm-s-colors-nqq.css span.cm-keyword {{ color: {color3}; font-weight: bold; }} +.cm-s-colors-nqq.css span.cm-atom {{ color: {color4}; }} +.cm-s-colors-nqq.css span.cm-def {{ color: {color5}; }} +.cm-s-colors-nqq.css span.cm-variable {{ color: {color6}; }} +.cm-s-colors-nqq.css span.cm-variable-2 {{ color: {color5}; }} +.cm-s-colors-nqq.css span.cm-string {{ color: {color2}; }} +.cm-s-colors-nqq.css span.cm-string-2 {{ color: {color2}; }} +.cm-s-colors-nqq.css span.cm-number {{ color: {color5}; }} +.cm-s-colors-nqq.css span.cm-tag {{ color: {color3}; }} +.cm-s-colors-nqq.css span.cm-property {{ color: {color6}; }} +.cm-s-colors-nqq.css span.cm-attribute {{ color: {color6}; }} +.cm-s-colors-nqq.css span.cm-qualifier {{ color: {color4}; }} +.cm-s-colors-nqq.css span.cm-meta {{ color: {color5}; }} +.cm-s-colors-nqq.css span.cm-header {{ color: {color3}; }} +.cm-s-colors-nqq.css span.cm-operator {{ color: {color3}; }} +.cm-s-colors-nqq.css span.CodeMirror-matchingbracket {{ box-sizing: border-box; background: transparent; border-bottom: 1px solid; }} +.cm-s-colors-nqq.css span.CodeMirror-nonmatchingbracket {{ border-bottom: 1px solid; background: none; }} +.cm-s-colors-nqq.css .CodeMirror-activeline-background {{ background: rgba({color5.rgb},0.4); }} +.cm-s-colors-nqq.css div.CodeMirror-selected {{ background: {color3}; }} +.cm-s-colors-nqq.css .CodeMirror-focused div.CodeMirror-selected {{ background: {color0}); }} From 8480e830028c3e3d04afbc24f2e9ef3c54667a19 Mon Sep 17 00:00:00 2001 From: threadreaper Date: Tue, 4 Aug 2020 22:34:05 -0500 Subject: [PATCH 4/4] Typo. --- pywal/templates/colors-nqq.css | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pywal/templates/colors-nqq.css b/pywal/templates/colors-nqq.css index be3aa3bf..fc6f3e9b 100644 --- a/pywal/templates/colors-nqq.css +++ b/pywal/templates/colors-nqq.css @@ -3,29 +3,29 @@ * https://github.com/threadreaper */ -.cm-s-colors-nqq.css .CodeMirror-gutters {{ background: {background} !important; }} -.cm-s-colors-nqq.css .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded {{ color: {foreground}; }} -.cm-s-colors-nqq.css .CodeMirror-cursor {{ border-left: 1px solid {foreground}; background-color: rgba({color6.rgb},0.4)}} -.cm-s-colors-nqq.css {{ background-color: {background}; color: {foreground}; }} -.cm-s-colors-nqq.css span.cm-builtin {{ color: {color2}; font-weight: bold; }} -.cm-s-colors-nqq.css span.cm-comment {{ color: {color8}; }} -.cm-s-colors-nqq.css span.cm-keyword {{ color: {color3}; font-weight: bold; }} -.cm-s-colors-nqq.css span.cm-atom {{ color: {color4}; }} -.cm-s-colors-nqq.css span.cm-def {{ color: {color5}; }} -.cm-s-colors-nqq.css span.cm-variable {{ color: {color6}; }} -.cm-s-colors-nqq.css span.cm-variable-2 {{ color: {color5}; }} -.cm-s-colors-nqq.css span.cm-string {{ color: {color2}; }} -.cm-s-colors-nqq.css span.cm-string-2 {{ color: {color2}; }} -.cm-s-colors-nqq.css span.cm-number {{ color: {color5}; }} -.cm-s-colors-nqq.css span.cm-tag {{ color: {color3}; }} -.cm-s-colors-nqq.css span.cm-property {{ color: {color6}; }} -.cm-s-colors-nqq.css span.cm-attribute {{ color: {color6}; }} -.cm-s-colors-nqq.css span.cm-qualifier {{ color: {color4}; }} -.cm-s-colors-nqq.css span.cm-meta {{ color: {color5}; }} -.cm-s-colors-nqq.css span.cm-header {{ color: {color3}; }} -.cm-s-colors-nqq.css span.cm-operator {{ color: {color3}; }} -.cm-s-colors-nqq.css span.CodeMirror-matchingbracket {{ box-sizing: border-box; background: transparent; border-bottom: 1px solid; }} -.cm-s-colors-nqq.css span.CodeMirror-nonmatchingbracket {{ border-bottom: 1px solid; background: none; }} -.cm-s-colors-nqq.css .CodeMirror-activeline-background {{ background: rgba({color5.rgb},0.4); }} -.cm-s-colors-nqq.css div.CodeMirror-selected {{ background: {color3}; }} -.cm-s-colors-nqq.css .CodeMirror-focused div.CodeMirror-selected {{ background: {color0}); }} +.cm-s-colors-nqq .CodeMirror-gutters {{ background: {background} !important; }} +.cm-s-colors-nqq .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded {{ color: {foreground}; }} +.cm-s-colors-nqq .CodeMirror-cursor {{ border-left: 1px solid {foreground}; background-color: rgba({color6.rgb},0.4)}} +.cm-s-colors-nqq {{ background-color: {background}; color: {foreground}; }} +.cm-s-colors-nqq span.cm-builtin {{ color: {color2}; font-weight: bold; }} +.cm-s-colors-nqq span.cm-comment {{ color: {color8}; }} +.cm-s-colors-nqq span.cm-keyword {{ color: {color3}; font-weight: bold; }} +.cm-s-colors-nqq span.cm-atom {{ color: {color4}; }} +.cm-s-colors-nqq span.cm-def {{ color: {color5}; }} +.cm-s-colors-nqq span.cm-variable {{ color: {color6}; }} +.cm-s-colors-nqq span.cm-variable-2 {{ color: {color5}; }} +.cm-s-colors-nqq span.cm-string {{ color: {color2}; }} +.cm-s-colors-nqq span.cm-string-2 {{ color: {color2}; }} +.cm-s-colors-nqq span.cm-number {{ color: {color5}; }} +.cm-s-colors-nqq span.cm-tag {{ color: {color3}; }} +.cm-s-colors-nqq span.cm-property {{ color: {color6}; }} +.cm-s-colors-nqq span.cm-attribute {{ color: {color6}; }} +.cm-s-colors-nqq span.cm-qualifier {{ color: {color4}; }} +.cm-s-colors-nqq span.cm-meta {{ color: {color5}; }} +.cm-s-colors-nqq span.cm-header {{ color: {color3}; }} +.cm-s-colors-nqq span.cm-operator {{ color: {color3}; }} +.cm-s-colors-nqq span.CodeMirror-matchingbracket {{ box-sizing: border-box; background: transparent; border-bottom: 1px solid; }} +.cm-s-colors-nqq span.CodeMirror-nonmatchingbracket {{ border-bottom: 1px solid; background: none; }} +.cm-s-colors-nqq .CodeMirror-activeline-background {{ background: rgba({color5.rgb},0.4); }} +.cm-s-colors-nqq div.CodeMirror-selected {{ background: {color3}; }} +.cm-s-colors-nqq .CodeMirror-focused div.CodeMirror-selected {{ background: {color0}); }}