Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 919ea75

Browse files
authored
Merge pull request #539 from threadreaper/plasma-support-0.2
Plasma support 0.2
2 parents 7fae8d2 + c3faf0e commit 919ea75

File tree

3 files changed

+45
-4
lines changed

3 files changed

+45
-4
lines changed

pywal/export.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def get_export_type(export_type):
9292
"json": "colors.json",
9393
"konsole": "colors-konsole.colorscheme",
9494
"kitty": "colors-kitty.conf",
95+
"nqq": "colors-nqq.css",
9596
"plain": "colors",
9697
"putty": "colors-putty.reg",
9798
"rofi": "colors-rofi.Xresources",

pywal/templates/colors-nqq.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* pywal theme template for notepadqq by threadreaper
3+
* https://github.com/threadreaper
4+
*/
5+
6+
.cm-s-nqqwal .CodeMirror-gutters {{ background: {background} !important; }}
7+
.cm-s-nqqwal .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded {{ color: {foreground}; }}
8+
.cm-s-nqqwal .CodeMirror-cursor {{ border-left: 1px solid {foreground}; background-color: rgba({color6.rgb},0.4)}}
9+
.cm-s-nqqwal {{ background-color: {background}; color: {foreground}; }}
10+
.cm-s-nqqwal span.cm-builtin {{ color: {color2}; font-weight: bold; }}
11+
.cm-s-nqqwal span.cm-comment {{ color: {color8}; }}
12+
.cm-s-nqqwal span.cm-keyword {{ color: {color3}; font-weight: bold; }}
13+
.cm-s-nqqwal span.cm-atom {{ color: {color4}; }}
14+
.cm-s-nqqwal span.cm-def {{ color: {color5}; }}
15+
.cm-s-nqqwal span.cm-variable {{ color: {color6}; }}
16+
.cm-s-nqqwal span.cm-variable-2 {{ color: {color5}; }}
17+
.cm-s-nqqwal span.cm-string {{ color: {color2}; }}
18+
.cm-s-nqqwal span.cm-string-2 {{ color: {color2}; }}
19+
.cm-s-nqqwal span.cm-number {{ color: {color5}; }}
20+
.cm-s-nqqwal span.cm-tag {{ color: {color3}; }}
21+
.cm-s-nqqwal span.cm-property {{ color: {color6}; }}
22+
.cm-s-nqqwal span.cm-attribute {{ color: {color6}; }}
23+
.cm-s-nqqwal span.cm-qualifier {{ color: {color4}; }}
24+
.cm-s-nqqwal span.cm-meta {{ color: {color5}; }}
25+
.cm-s-nqqwal span.cm-header {{ color: {color3}; }}
26+
.cm-s-nqqwal span.cm-operator {{ color: {color3}; }}
27+
.cm-s-nqqwal span.CodeMirror-matchingbracket {{ box-sizing: border-box; background: transparent; border-bottom: 1px solid; }}
28+
.cm-s-nqqwal span.CodeMirror-nonmatchingbracket {{ border-bottom: 1px solid; background: none; }}
29+
.cm-s-nqqwal .CodeMirror-activeline-background {{ background: rgba({color5.rgb},0.4); }}
30+
.cm-s-nqqwal div.CodeMirror-selected {{ background: {color3}; }}
31+
.cm-s-nqqwal .CodeMirror-focused div.CodeMirror-selected {{ background: {color0}); }}

pywal/wallpaper.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import subprocess
88
import urllib.parse
99

10-
from .settings import CACHE_DIR, HOME, OS
10+
from .settings import HOME, OS, CACHE_DIR
1111
from . import util
1212

1313

@@ -67,7 +67,7 @@ def set_wm_wallpaper(img):
6767

6868
elif shutil.which("hsetroot"):
6969
util.disown(["hsetroot", "-fill", img])
70-
70+
7171
elif shutil.which("nitrogen"):
7272
util.disown(["nitrogen", "--set-zoom-fill", img])
7373

@@ -115,8 +115,17 @@ def set_desktop_wallpaper(desktop, img):
115115
elif "awesome" in desktop:
116116
util.disown(["awesome-client",
117117
"require('gears').wallpaper.maximized('{img}')"
118-
.format(**locals())])
119-
118+
.format(**locals())])
119+
120+
elif "kde" in desktop:
121+
string = """
122+
var allDesktops = desktops();for (i=0;i<allDesktops.length;i++){
123+
d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";
124+
d.currentConfigGroup = Array("Wallpaper", "org.kde.image",
125+
"General");d.writeConfig("Image", "%s")};
126+
"""
127+
util.disown(["qdbus", "org.kde.plasmashell", "/PlasmaShell",
128+
"org.kde.PlasmaShell.evaluateScript", string % img])
120129
else:
121130
set_wm_wallpaper(img)
122131

0 commit comments

Comments
 (0)