Commit 537a4209 authored by phob1an's avatar phob1an 🎧
Browse files

lightmode

parent 63adfc34
......@@ -51,6 +51,7 @@ def notify_user(message):
pass
def color_triplet(h, l, s):
"""Return color triplet to use in colorschemes"""
r, g, b = colorsys.hls_to_rgb(h, l, s)
if r > 1.0:
......@@ -68,10 +69,21 @@ def color_triplet(h, l, s):
return ','.join([str(r), str(g), str(b)])
def theme_mode():
"""User chooses light or dark"""
try:
q = subprocess.run(['kdialog', '--radiolist', 'Mode', '1', 'Dark',
'on', '2', 'Light', 'off'], capture_output=True)
mode = q.stdout.decode().strip()
except:
mode = 1
return mode
# ---- CullaX ----
# User chooses light or dark
mode = theme_mode()
# Try sending a notification to show we're working
notify_user("CullaX - Beautifying Desktop ;) ")
......@@ -154,15 +166,26 @@ if s < 0.011:
s = 0.0
h = 0.0
#l_midlight = (1.0 - l) / 4.0 + l
panel_background = color_triplet(hb, 0.15, 0.1)
panel_header = color_triplet(hb, 0.3, 0.2)
#button_foreground = color_triplet(h, 0.85, s)
foreground = "252,252,252"
#foreground = color_triplet(h, 0.98, 1)
button_foreground = "252,252,252"
highlight_color = color_triplet(h, 0.88, 1)
midlight = color_triplet(h, 0.5, 0.5)
if mode == '1':
panel_background = color_triplet(hb, 0.15, 0.1)
panel_header = color_triplet(hb, 0.3, 0.2)
#button_foreground = color_triplet(h, 0.85, s)
foreground = "252,252,252"
#foreground = color_triplet(h, 0.98, 1)
button_foreground = "252,252,252"
highlight_color = color_triplet(h, 0.88, 1)
midlight = color_triplet(h, 0.5, 0.5)
elif mode == '2':
panel_background = color_triplet(hb, 0.97, 0.5)
panel_header = color_triplet(hb, 1, 0.83)
#button_foreground = color_triplet(h, 0.85, s)
foreground = "96,96,96"
#foreground = color_triplet(h, 0.98, 1)
button_foreground = "112,112,112"
highlight_color = color_triplet(h, 0.5, 0.95)
midlight = color_triplet(h, 0.67, 0.85)
else:
sys.exit("Well that didn't go well.")
print(panel_background)
......
## CullaX
CullaX will generate a dark Plasma theme based on your current wallpaper. It uses [colorgram.py](https://github.com/obskyr/colorgram.py)
### Installation
#### Requirements
Firstly, install colorgram.py.
```
sudo pip install colorgram.py
```
To allow light mode chooser, install kdialog.
### Installation
To install, just run ```./install.sh``` which will install the Plasma theme, a menu entry and the CullaX script. The menu entry should appear under the Settings submenu.
*Note: you need to set your own wallpaper before using CullaX.*
If there's any interest, I'll add a light theme, a window decoration and maybe a settings panel.
\ No newline at end of file
[Colors:Window]
ForegroundNormal=252,252,252
BackgroundNormal=34,39,42
ForegroundNormal=96,96,96
BackgroundNormal=243,249,251
ForegroundNegative=212,84,0
[Colors:Selection]
BackgroundNormal=254,193,203
BackgroundNormal=6,188,248
[Colors:Complimentary]
BackgroundNormal=255,0,0
ForegroundNormal=0,255,0
[Colors:Button]
ForegroundNormal=252,252,252
BackgroundNormal=191,63,84
DecorationFocus=254,193,203
ForegroundNormal=112,112,112
BackgroundNormal=99,207,242
DecorationFocus=6,188,248
DecorationHover=0,255,0
[Colors:View]
ForegroundNormal=252,252,252
BackgroundNormal=61,80,91
DecorationHover=254,193,203
\ No newline at end of file
ForegroundNormal=96,96,96
BackgroundNormal=255,255,255
DecorationHover=6,188,248
\ No newline at end of file
......@@ -61,9 +61,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.4630234"
inkscape:cx="165.40458"
inkscape:cy="114.59419"
inkscape:zoom="18.926047"
inkscape:cx="317.2873"
inkscape:cy="55.410216"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -141,8 +141,8 @@
id="rect1073"
style="opacity:0.5;fill:none;fill-opacity:0.17808222;stroke:none;stroke-width:1.52267909;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" />
<path
style="opacity:1;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:0.99126619;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
d="M 96.427305,33.816253 V 117.20581"
style="opacity:1;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:0.98441476;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
d="M 96.427305,33.809425 V 116.05022"
id="path1075"
inkscape:connector-curvature="0"
class="ColorScheme-ViewHover" />
......@@ -155,16 +155,10 @@
style="opacity:1;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
</g>
<g
id="ClockFace">
id="ClockFace"
transform="matrix(0.96,0,0,0.96,-8.0312646,5.2802827)">
<circle
style="opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:0.60778677;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none"
class="ColorScheme-ViewBackground"
id="circle944"
cx="-100.78162"
cy="32.007069"
r="103" />
<circle
r="101"
r="100"
cy="32.007069"
cx="-100.78162"
id="dial"
......
......@@ -24,7 +24,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.4"
inkscape:cx="45.482246"
inkscape:cx="55.294463"
inkscape:cy="40.697134"
inkscape:document-units="px"
inkscape:current-layer="layer1"
......@@ -121,12 +121,12 @@
width="18"
id="plain-center"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<g
id="plain-right"
transform="translate(-11.375,0.3125)">
<rect
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
class="ColorScheme-ViewHover"
id="rect832"
width="18"
......@@ -141,7 +141,7 @@
height="1"
width="18"
id="rect826"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41421342;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
</g>
<g
......@@ -155,10 +155,10 @@
width="18"
id="rect849"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<rect
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41421342;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
id="rect851"
width="18"
height="1"
......@@ -177,10 +177,10 @@
width="18"
id="rect855"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<rect
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41421342;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
id="rect857"
width="18"
height="1"
......@@ -192,7 +192,7 @@
id="plain-bottom"
transform="matrix(0,1,1,0,-1176.8143,1165.7518)">
<rect
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
class="ColorScheme-ViewHover"
id="rect861"
width="18"
......@@ -207,14 +207,14 @@
height="1"
width="18"
id="rect863"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41421342;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
</g>
<g
id="plain-topright"
transform="translate(-3.6607133,2.8571394)">
<rect
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
class="ColorScheme-ViewHover"
id="rect869"
width="6"
......@@ -223,7 +223,7 @@
y="398.07324" />
<path
inkscape:connector-curvature="0"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
id="rect867"
d="m -748.53569,398.07325 v 1 h 5 v 5 h 1 v -6 z"
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
......@@ -238,12 +238,12 @@
width="6"
id="rect902"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<path
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
d="m -748.53569,398.07325 v 1 h 5 v 5 h 1 v -6 z"
id="path904"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
inkscape:connector-curvature="0" />
</g>
<g
......@@ -256,12 +256,12 @@
width="6"
id="rect908"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<path
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
d="m -748.53569,398.07325 v 1 h 5 v 5 h 1 v -6 z"
id="path910"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
inkscape:connector-curvature="0" />
</g>
<g
......@@ -274,12 +274,12 @@
width="6"
id="rect914"
class="ColorScheme-ViewHover"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal" />
<path
style="opacity:0.6;fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66666663;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.8;paint-order:normal"
d="m -748.53569,398.07325 v 1 h 5 v 5 h 1 v -6 z"
id="path916"
class="ColorScheme-Text"
class="ColorScheme-ButtonBackground"
inkscape:connector-curvature="0" />
</g>
</g>
......
......@@ -59,9 +59,9 @@
inkscape:window-height="480"
id="namedview76"
showgrid="false"
inkscape:zoom="27.731088"
inkscape:cx="88.872294"
inkscape:cy="22.286343"
inkscape:zoom="6.932772"
inkscape:cx="40.949516"
inkscape:cy="40.312898"
inkscape:current-layer="svg986"
inkscape:pagecheckerboard="true" />
<metadata
......@@ -77,14 +77,14 @@
</rdf:RDF>
</metadata>
<rect
style="fill:#000000;fill-rule:evenodd;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;fill-opacity:1;opacity:0.05"
height="16"
width="32"
y="14.000025"
x="13"
id="base-center" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.05"
height="4"
width="32"
y="-34.000023"
......@@ -92,7 +92,7 @@
transform="scale(1,-1)"
id="base-bottom" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.05"
height="4"
width="16"
y="-49"
......@@ -100,7 +100,7 @@
transform="matrix(0,-1,-1,0,0,0)"
id="base-right" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.05"
height="4"
width="16"
y="9"
......@@ -108,14 +108,14 @@
transform="rotate(-90)"
id="base-left" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.80000001;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.80000001;fill-opacity:1;opacity:0.05"
height="4"
width="4"
y="30.000027"
x="45"
id="base-bottomright" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.80000001;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.80000001;fill-opacity:1;opacity:0.05"
height="4"
width="4"
y="30.000027"
......@@ -123,14 +123,14 @@
transform="scale(-1,1)"
id="base-bottomleft" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.73029679;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.73029679;fill-opacity:1;opacity:0.05"
height="4"
width="4"
y="10.000025"
x="45"
id="base-topright" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:0.73029679;fill-opacity:1;opacity:0.1"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.73029679;fill-opacity:1;opacity:0.05"
height="4"
width="4"
y="10.000025"
......@@ -168,7 +168,7 @@
transform="rotate(90)"
id="base-hint-right-margin" />
<rect
style="fill:#000000;fill-rule:evenodd;fill-opacity:1;opacity:0.2"
style="fill:none;fill-rule:evenodd;fill-opacity:1;opacity:0.2"
height="16"
width="32"
y="49.599998"
......@@ -223,7 +223,7 @@
y="-14.000025"
width="32"
height="4"
style="fill:#000000;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.1" />
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:0.89442718;fill-opacity:1;opacity:0.05" />
<g
id="focus-bottom"
transform="matrix(1,0,0,-1,-24.900848,98.631813)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment