Merge pull request #539 from threadreaper/plasma-support-0.2

Plasma support 0.2
This commit is contained in:
dylan 2020-08-04 11:25:31 +03:00 committed by GitHub
commit 919ea7533a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 3 deletions

View File

@ -92,6 +92,7 @@ def get_export_type(export_type):
"json": "colors.json", "json": "colors.json",
"konsole": "colors-konsole.colorscheme", "konsole": "colors-konsole.colorscheme",
"kitty": "colors-kitty.conf", "kitty": "colors-kitty.conf",
"nqq": "colors-nqq.css",
"plain": "colors", "plain": "colors",
"putty": "colors-putty.reg", "putty": "colors-putty.reg",
"rofi": "colors-rofi.Xresources", "rofi": "colors-rofi.Xresources",

View File

@ -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}); }}

View File

@ -7,7 +7,7 @@ import shutil
import subprocess import subprocess
import urllib.parse import urllib.parse
from .settings import CACHE_DIR, HOME, OS from .settings import HOME, OS, CACHE_DIR
from . import util from . import util
@ -117,6 +117,15 @@ def set_desktop_wallpaper(desktop, img):
"require('gears').wallpaper.maximized('{img}')" "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: else:
set_wm_wallpaper(img) set_wm_wallpaper(img)