summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan <dylan.araps@gmail.com>2020-08-04 11:25:31 +0300
committerGitHub <noreply@github.com>2020-08-04 11:25:31 +0300
commit919ea7533a4214ec9a829f8e3d1711439fb0e12c (patch)
treec1750f63d019e99cdf3a899e07e82c2ca2dc185d
parent7fae8d23f5b7b8a58694025c0a952a27b6a1ffcd (diff)
parentc3faf0e1cf4600551f9fe979d265b04ee7cef62d (diff)
Merge pull request #539 from threadreaper/plasma-support-0.2
Plasma support 0.2
-rw-r--r--pywal/export.py1
-rw-r--r--pywal/templates/colors-nqq.css31
-rw-r--r--pywal/wallpaper.py17
3 files changed, 45 insertions, 4 deletions
diff --git a/pywal/export.py b/pywal/export.py
index 8f581b9..1250528 100644
--- a/pywal/export.py
+++ b/pywal/export.py
@@ -92,6 +92,7 @@ def get_export_type(export_type):
"json": "colors.json",
"konsole": "colors-konsole.colorscheme",
"kitty": "colors-kitty.conf",
+ "nqq": "colors-nqq.css",
"plain": "colors",
"putty": "colors-putty.reg",
"rofi": "colors-rofi.Xresources",
diff --git a/pywal/templates/colors-nqq.css b/pywal/templates/colors-nqq.css
new file mode 100644
index 0000000..9396cdb
--- /dev/null
+++ b/pywal/templates/colors-nqq.css
@@ -0,0 +1,31 @@
+/*
+ * pywal theme template for notepadqq by threadreaper
+ * 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}); }}
diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py
index 3eecb10..7d6ae5f 100644
--- a/pywal/wallpaper.py
+++ b/pywal/wallpaper.py
@@ -7,7 +7,7 @@ import shutil
import subprocess
import urllib.parse
-from .settings import CACHE_DIR, HOME, OS
+from .settings import HOME, OS, CACHE_DIR
from . import util
@@ -67,7 +67,7 @@ def set_wm_wallpaper(img):
elif shutil.which("hsetroot"):
util.disown(["hsetroot", "-fill", img])
-
+
elif shutil.which("nitrogen"):
util.disown(["nitrogen", "--set-zoom-fill", img])
@@ -115,8 +115,17 @@ 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 = """
+ var allDesktops = desktops();for (i=0;i<allDesktops.length;i++){
+ d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";
+ 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])
else:
set_wm_wallpaper(img)