소스 검색

custom dynamic theme

custom dynamic theme
Milan Jurkulak 2 년 전
부모
커밋
a992e8eeba

+ 2 - 1
src/main/kotlin/eu/mjdev/desktop/Main.kt

@@ -20,7 +20,8 @@ fun main(
     DisposableEffect(Unit) {
         println("App started with args: $args")
         Shell {
-            autoStartApps()
+            // todo
+//            autoStartApps()
         }
         onDispose {
             println("App ended.")

+ 11 - 4
src/main/kotlin/eu/mjdev/desktop/data/User.kt

@@ -51,12 +51,19 @@ class User(
     companion object {
         val Nobody = User(":x:-1:-1:::")
 
-        fun isLoggedIn(un: String): Boolean =
-            Shell.executeAndRead("whoami").trim().contentEquals(un)
+        fun isLoggedIn(
+            un: String
+        ): Boolean = Shell.executeAndRead("whoami").trim().contentEquals(un)
 
-        fun loadPicture(home: String, pic: String): File? = loadPicture(File(home), pic)
+        fun loadPicture(
+            home: String,
+            pic: String
+        ): File? = loadPicture(File(home), pic)
 
-        fun loadPicture(homeDir: File, picName: String): File? = File(homeDir, picName).let {
+        fun loadPicture(
+            homeDir: File,
+            picName: String
+        ): File? = File(homeDir, picName).let {
             if(it.exists()) it else null
         }
 

+ 4 - 0
src/main/kotlin/eu/mjdev/desktop/extensions/Compose.kt

@@ -60,6 +60,8 @@ object Compose {
         return String.format("#%02x%02x%02x", red, green, blue)
     }
 
+    val Color.hexRgb get() = rgbToHex()
+
     fun Color.rgbaToHex(): String {
         val alpha: Int = (alpha * 255).toInt()
         val red = (red * 255).toInt()
@@ -68,6 +70,8 @@ object Compose {
         return String.format("#%02x%02x%02x%02x", alpha, red, green, blue)
     }
 
+    val Color.hexRgba get() = rgbaToHex()
+
     val PaddingValues.width: Dp
         get() = calculateLeftPadding(LayoutDirection.Ltr) + calculateRightPadding(LayoutDirection.Ltr)
 

+ 16 - 4
src/main/kotlin/eu/mjdev/desktop/extensions/Custom.kt

@@ -19,12 +19,23 @@ import kotlin.jvm.optionals.getOrNull
 
 @Suppress("FunctionName", "MemberVisibilityCanBePrivate", "unused")
 object Custom {
-    val ProcessHandle.command :String
+    val Process.handle: ProcessHandle
+        get() = toHandle()
+
+    val ProcessHandle.command: String
         get() = info().command().getOrNull().orEmpty()
 
-    val ProcessHandle.commandLine :String
+    val ProcessHandle.commandLine: String
         get() = info().commandLine().getOrNull().orEmpty()
 
+    val Process.consoleOutput: String
+        get() {
+            val sj = StringJoiner(System.lineSeparator())
+            val bfr = BufferedReader(inputReader())
+            bfr.lines().iterator().forEachRemaining { s: String? -> sj.add(s) }
+            return sj.toString()
+        }
+
     fun BufferedReader.readAvailable(): String = StringBuilder().apply {
         var ch = read()
         while (ch != -1) {
@@ -33,8 +44,9 @@ object Custom {
         }
     }.toString()
 
-    inline fun <reified T> Any?.orElse(block: () -> T) =
-        if (this == null) block() else this as T
+    inline fun <reified T> Any?.orElse(
+        block: () -> T
+    ) = if (this == null) block() else this as T
 
     fun ParsedList(
         value: String?,

+ 6 - 5
src/main/kotlin/eu/mjdev/desktop/helpers/internal/Palette.kt

@@ -16,7 +16,7 @@ import eu.mjdev.desktop.provider.DesktopProvider
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.launch
 
-@Suppress("CanBeParameter", "MemberVisibilityCanBePrivate")
+@Suppress("CanBeParameter", "MemberVisibilityCanBePrivate", "unused")
 class Palette(
     val api: DesktopProvider,
     val gnome: GnomeManager = api.gnome,
@@ -52,10 +52,11 @@ class Palette(
         get() = backgroundColor
 
     val selectedBgColor
-        get() = textColor
+        get() = iconsTintColor
 
+    // todo
     val selectedFgColor
-        get() = iconsTintColor
+        get() = if (selectedBgColor.isLightColor) textColor else backgroundColor
 
     val tooltipBgColor
         get() = backgroundColor
@@ -86,8 +87,8 @@ class Palette(
             textColorState.value = text
         }
         createFromPalette()
-        setGtkTheme(THEME_MJDEV)
-        setSoundTheme(THEME_MJDEV)
+//        setGtkTheme(THEME_MJDEV)
+//        setSoundTheme(THEME_MJDEV)
     }
 
     fun createFromPalette() =

+ 77 - 0
src/main/kotlin/eu/mjdev/desktop/icons/checkbox/CheckboxFocusedLight.kt

@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.checkbox
+
+import androidx.compose.ui.graphics.*
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+import kotlin.Suppress
+
+@Suppress("unused")
+val Icons.CheckboxFocusedLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "CheckboxFocusedLight",
+        defaultWidth = 24.dp,
+        defaultHeight = 24.dp,
+        viewportWidth = 24f,
+        viewportHeight = 24f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF444C44)),
+            stroke = SolidColor(Color(0xFF666C66)),
+            strokeLineWidth = 2f,
+            strokeLineJoin = StrokeJoin.Round,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveTo(4.385f, 1f)
+            lineTo(19.615f, 1f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 23f, 4.385f
+            )
+            lineTo(23f, 19.615f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 19.615f, 23f
+            )
+            lineTo(4.385f, 23f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 1f, 19.615f
+            )
+            lineTo(1f, 4.385f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 4.385f, 1f
+            )
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFFFFFFFF)),
+            strokeLineWidth = 0.5f,
+            strokeLineCap = StrokeCap.Square,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveToRelative(17.471f, 6.776f)
+            lineToRelative(1.571f, 1.571f)
+            lineToRelative(-8.861f, 8.861f)
+            lineToRelative(-5.33f, -5.332f)
+            lineToRelative(1.571f, -1.571f)
+            lineToRelative(3.759f, 3.759f)
+            close()
+        }
+    }.build()
+}
+

+ 72 - 0
src/main/kotlin/eu/mjdev/desktop/icons/checkbox/CheckboxLight.kt

@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.checkbox
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.PathFillType
+import androidx.compose.ui.graphics.SolidColor
+import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.graphics.StrokeJoin
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+
+@Suppress("unused")
+val Icons.CheckboxLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "CheckboxLight",
+        defaultWidth = 24.dp,
+        defaultHeight = 24.dp,
+        viewportWidth = 24f,
+        viewportHeight = 24f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF444C44)),
+            stroke = SolidColor(Color(0xFF666C66)),
+            strokeLineWidth = 1f,
+            strokeLineJoin = StrokeJoin.Round,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveTo(4.731f, 1.5f)
+            lineTo(19.269f, 1.5f)
+            arcTo(3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 22.5f, 4.731f)
+            lineTo(22.5f, 19.269f)
+            arcTo(3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 19.269f, 22.5f)
+            lineTo(4.731f, 22.5f)
+            arcTo(3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 1.5f, 19.269f)
+            lineTo(1.5f, 4.731f)
+            arcTo(3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 4.731f, 1.5f)
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFFFFFFFF)),
+            strokeLineWidth = 0.5f,
+            strokeLineCap = StrokeCap.Square,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveToRelative(17.471f, 6.776f)
+            lineToRelative(1.571f, 1.571f)
+            lineToRelative(-8.861f, 8.861f)
+            lineToRelative(-5.33f, -5.332f)
+            lineToRelative(1.571f, -1.571f)
+            lineToRelative(3.759f, 3.759f)
+            close()
+        }
+    }.build()
+}
+

+ 65 - 0
src/main/kotlin/eu/mjdev/desktop/icons/checkbox/CheckboxOffFocusedLight.kt

@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.checkbox
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.PathFillType
+import androidx.compose.ui.graphics.SolidColor
+import androidx.compose.ui.graphics.StrokeJoin
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+
+@Suppress("unused")
+val Icons.CheckboxOffFocusedLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "CheckboxOffFocusedLight",
+        defaultWidth = 24.dp,
+        defaultHeight = 24.dp,
+        viewportWidth = 24f,
+        viewportHeight = 24f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF666C66)),
+            stroke = SolidColor(Color(0xFF444C44)),
+            strokeLineWidth = 2f,
+            strokeLineJoin = StrokeJoin.Round,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveTo(4.385f, 1f)
+            lineTo(19.615f, 1f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 23f, 4.385f
+            )
+            lineTo(23f, 19.615f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 19.615f, 23f
+            )
+            lineTo(4.385f, 23f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 1f, 19.615f
+            )
+            lineTo(1f, 4.385f)
+            arcTo(
+                3.385f, 3.385f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 4.385f, 1f
+            )
+            close()
+        }
+    }.build()
+}
+

+ 66 - 0
src/main/kotlin/eu/mjdev/desktop/icons/checkbox/CheckboxOffLight.kt

@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.checkbox
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.PathFillType
+import androidx.compose.ui.graphics.SolidColor
+import androidx.compose.ui.graphics.StrokeJoin
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+import kotlin.Suppress
+
+@Suppress("unused")
+val Icons.CheckboxOffLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "CheckboxOffLight",
+        defaultWidth = 24.dp,
+        defaultHeight = 24.dp,
+        viewportWidth = 24f,
+        viewportHeight = 24f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF666C66)),
+            stroke = SolidColor(Color(0xFF444C44)),
+            strokeLineWidth = 1f,
+            strokeLineJoin = StrokeJoin.Round,
+            pathFillType = PathFillType.EvenOdd
+        ) {
+            moveTo(4.731f, 1.5f)
+            lineTo(19.269f, 1.5f)
+            arcTo(
+                3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 22.5f, 4.731f
+            )
+            lineTo(22.5f, 19.269f)
+            arcTo(
+                3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 19.269f, 22.5f
+            )
+            lineTo(4.731f, 22.5f)
+            arcTo(
+                3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 1.5f, 19.269f
+            )
+            lineTo(1.5f, 4.731f)
+            arcTo(
+                3.231f, 3.231f, 0f,
+                isMoreThanHalf = false,
+                isPositiveArc = true, 4.731f, 1.5f
+            )
+            close()
+        }
+    }.build()
+}
+

+ 179 - 140
src/main/kotlin/eu/mjdev/desktop/icons/custom/Mjdev.kt

@@ -15,149 +15,188 @@ import androidx.compose.ui.graphics.SolidColor
 import androidx.compose.ui.graphics.vector.ImageVector
 import androidx.compose.ui.graphics.vector.path
 import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
 import kotlin.Suppress
 
 @Suppress("unused")
-val Mjdev: ImageVector
-    get() {
-        if (_Mjdev != null) {
-            return _Mjdev!!
+val Icons.Mjdev: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "Mjdev",
+        defaultWidth = 47.dp,
+        defaultHeight = 26.dp,
+        viewportWidth = 268f,
+        viewportHeight = 150f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF666C66))
+        ) {
+            moveTo(173.82f, 12.61f)
+            lineTo(173.82f, 12.61f)
+            arcTo(
+                25.19f,
+                25.1f,
+                105f,
+                isMoreThanHalf = false,
+                isPositiveArc = false,
+                164.6f,
+                47.01f
+            )
+            lineTo(211.3f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 245.59f, 137.39f
+            )
+            lineTo(245.59f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 254.81f, 102.99f
+            )
+            lineTo(208.11f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 173.82f, 12.61f
+            )
+            close()
         }
-        _Mjdev = ImageVector.Builder(
-            name = "Mjdev",
-            defaultWidth = 47.dp,
-            defaultHeight = 26.dp,
-            viewportWidth = 268f,
-            viewportHeight = 150f
-        ).apply {
-            path(
-                fill = SolidColor(Color(0xFF666CFF))) {
-                moveTo(173.82f, 12.61f)
-                lineTo(173.82f, 12.61f)
-                arcTo(
-                    25.19f,
-                    25.1f,
-                    105f,
-                    isMoreThanHalf = false,
-                    isPositiveArc = false,
-                    164.6f,
-                    47.01f
-                )
-                lineTo(211.3f, 128.2f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 245.59f, 137.39f)
-                lineTo(245.59f, 137.39f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 254.81f, 102.99f)
-                lineTo(208.11f, 21.8f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 173.82f, 12.61f)
-                close()
-            }
-            path(
-                fill = Brush.linearGradient(
-                    colorStops = arrayOf(
-                        0f to Color(0xFF000000),
-                        1f to Color(0x00000000)
-                    ),
-                    start = Offset(174.33f, 12.61f),
-                    end = Offset(246.1f, 137.39f)
+        path(
+            fill = Brush.linearGradient(
+                colorStops = arrayOf(
+                    0f to Color(0xFF000000),
+                    1f to Color(0x00000000)
                 ),
-                fillAlpha = 0.4f
-            ) {
-                moveTo(174.33f, 12.61f)
-                lineTo(174.33f, 12.61f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 165.11f, 47.01f)
-                lineTo(211.81f, 128.2f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 246.1f, 137.39f)
-                lineTo(246.1f, 137.39f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 255.32f, 102.99f)
-                lineTo(208.62f, 21.8f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 174.33f, 12.61f)
-                close()
-            }
-            path(fill = SolidColor(Color(0xFF666CFF))) {
-                moveTo(194.9f, 12.61f)
-                lineTo(194.9f, 12.61f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 204.12f, 47.01f)
-                lineTo(157.42f, 128.2f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 123.13f, 137.39f)
-                lineTo(123.13f, 137.39f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 113.91f, 102.99f)
-                lineTo(160.61f, 21.8f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 194.9f, 12.61f)
-                close()
-            }
-            path(fill = SolidColor(Color(0xFF666CFF))) {
-                moveTo(72.44f, 12.61f)
-                lineTo(72.44f, 12.61f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 63.22f, 47.01f)
-                lineTo(109.92f, 128.2f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 144.22f, 137.39f)
-                lineTo(144.22f, 137.39f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 153.43f, 102.99f)
-                lineTo(106.73f, 21.8f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 72.44f, 12.61f)
-                close()
-            }
-            path(
-                fill = Brush.linearGradient(
-                    colorStops = arrayOf(
-                        0f to Color(0xFF000000),
-                        1f to Color(0x00000000)
-                    ),
-                    start = Offset(72.44f, 12.61f),
-                    end = Offset(144.22f, 137.39f)
+                start = Offset(174.33f, 12.61f),
+                end = Offset(246.1f, 137.39f)
+            ),
+            fillAlpha = 0.4f
+        ) {
+            moveTo(174.33f, 12.61f)
+            lineTo(174.33f, 12.61f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 165.11f, 47.01f
+            )
+            lineTo(211.81f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 246.1f, 137.39f
+            )
+            lineTo(246.1f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 255.32f, 102.99f
+            )
+            lineTo(208.62f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 174.33f, 12.61f
+            )
+            close()
+        }
+        path(fill = SolidColor(Color(0xFF666C66))) {
+            moveTo(194.9f, 12.61f)
+            lineTo(194.9f, 12.61f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 204.12f, 47.01f
+            )
+            lineTo(157.42f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 123.13f, 137.39f
+            )
+            lineTo(123.13f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 113.91f, 102.99f
+            )
+            lineTo(160.61f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 194.9f, 12.61f
+            )
+            close()
+        }
+        path(fill = SolidColor(Color(0xFF666C66))) {
+            moveTo(72.44f, 12.61f)
+            lineTo(72.44f, 12.61f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 63.22f, 47.01f
+            )
+            lineTo(109.92f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 144.22f, 137.39f
+            )
+            lineTo(144.22f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 153.43f, 102.99f
+            )
+            lineTo(106.73f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 72.44f, 12.61f
+            )
+            close()
+        }
+        path(
+            fill = Brush.linearGradient(
+                colorStops = arrayOf(
+                    0f to Color(0xFF000000),
+                    1f to Color(0x00000000)
                 ),
-                fillAlpha = 0.4f
-            ) {
-                moveTo(72.44f, 12.61f)
-                lineTo(72.44f, 12.61f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 63.22f, 47.01f)
-                lineTo(109.92f, 128.2f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 144.22f, 137.39f)
-                lineTo(144.22f, 137.39f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 153.43f, 102.99f)
-                lineTo(106.73f, 21.8f)
-                arcTo(25.19f, 25.1f, 105f,
-                    isMoreThanHalf = false, isPositiveArc = false, 72.44f, 12.61f)
-                close()
-            }
-            path(fill = SolidColor(Color(0xFF666CFF))) {
-                moveTo(93.53f, 12.61f)
-                lineTo(93.53f, 12.61f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 102.75f, 47.01f)
-                lineTo(56.05f, 128.2f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 21.75f, 137.39f)
-                lineTo(21.75f, 137.39f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 12.54f, 102.99f)
-                lineTo(59.24f, 21.8f)
-                arcTo(25.19f, 25.1f, 75f,
-                    isMoreThanHalf = false, isPositiveArc = true, 93.53f, 12.61f)
-                close()
-            }
-        }.build()
-
-        return _Mjdev!!
-    }
-
-@Suppress("ObjectPropertyName")
-private var _Mjdev: ImageVector? = null
+                start = Offset(72.44f, 12.61f),
+                end = Offset(144.22f, 137.39f)
+            ),
+            fillAlpha = 0.4f
+        ) {
+            moveTo(72.44f, 12.61f)
+            lineTo(72.44f, 12.61f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 63.22f, 47.01f
+            )
+            lineTo(109.92f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 144.22f, 137.39f
+            )
+            lineTo(144.22f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 153.43f, 102.99f
+            )
+            lineTo(106.73f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 105f,
+                isMoreThanHalf = false, isPositiveArc = false, 72.44f, 12.61f
+            )
+            close()
+        }
+        path(fill = SolidColor(Color(0xFF666C66))) {
+            moveTo(93.53f, 12.61f)
+            lineTo(93.53f, 12.61f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 102.75f, 47.01f
+            )
+            lineTo(56.05f, 128.2f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 21.75f, 137.39f
+            )
+            lineTo(21.75f, 137.39f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 12.54f, 102.99f
+            )
+            lineTo(59.24f, 21.8f)
+            arcTo(
+                25.19f, 25.1f, 75f,
+                isMoreThanHalf = false, isPositiveArc = true, 93.53f, 12.61f
+            )
+            close()
+        }
+    }.build()
+}

+ 67 - 0
src/main/kotlin/eu/mjdev/desktop/icons/indicator/RunningIndicator.kt

@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.indicator
+
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+import kotlin.Suppress
+
+@Suppress("unused")
+val Icons.RunningIndicator: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "RunningIndicator",
+        defaultWidth = 119.98.dp,
+        defaultHeight = 119.98.dp,
+        viewportWidth = 119.98f,
+        viewportHeight = 119.98f
+    ).apply {
+        path(
+            fill = Brush.radialGradient(
+                colorStops = arrayOf(
+                    0f to Color(0xFFFFFFFF),
+                    1f to Color(0x00FFFFFF),
+                    0f to Color(0xFFFFFFFF),
+                    1f to Color(0x00FFFFFF)
+                ),
+                center = Offset(59.3f, 113.65f),
+                radius = 60.68f
+            ),
+            fillAlpha = 0.372f,
+            strokeAlpha = 0.372f
+        ) {
+            moveTo(8.19f, 2.59f)
+            lineTo(112.27f, 2.59f)
+            arcTo(
+                5.61f, 5.61f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 117.88f, 8.2f
+            )
+            lineTo(117.88f, 112.28f)
+            arcTo(
+                5.61f, 5.61f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 112.27f, 117.89f
+            )
+            lineTo(8.19f, 117.89f)
+            arcTo(
+                5.61f, 5.61f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 2.58f, 112.28f
+            )
+            lineTo(2.58f, 8.2f)
+            arcTo(
+                5.61f, 5.61f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 8.19f, 2.59f
+            )
+            close()
+        }
+    }.build()
+}

+ 114 - 0
src/main/kotlin/eu/mjdev/desktop/icons/toggle/ToggleOffLight.kt

@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.toggle
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.SolidColor
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+import kotlin.Suppress
+
+@Suppress("unused")
+val Icons.ToggleOffLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "ToggleOffLight",
+        defaultWidth = 46.dp,
+        defaultHeight = 26.dp,
+        viewportWidth = 46f,
+        viewportHeight = 26f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFFBABABA)),
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(33.542f, 0f)
+            lineTo(12.458f, 0f)
+            arcTo(
+                13f, 12.458f, 90f,
+                isMoreThanHalf = false, isPositiveArc = false, 0f, 13f
+            )
+            lineTo(0f, 13f)
+            arcTo(
+                13f, 12.458f, 90f,
+                isMoreThanHalf = false, isPositiveArc = false, 12.458f, 26f
+            )
+            lineTo(33.542f, 26f)
+            arcTo(
+                13f, 12.458f, 90f,
+                isMoreThanHalf = false, isPositiveArc = false, 46f, 13f
+            )
+            lineTo(46f, 13f)
+            arcTo(
+                13f, 12.458f, 90f,
+                isMoreThanHalf = false, isPositiveArc = false, 33.542f, 0f
+            )
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFF000000)),
+            fillAlpha = 0.2f,
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(13f, 4f)
+            lineTo(13f, 4f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 3f, 14f
+            )
+            lineTo(3f, 14f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 13f, 24f
+            )
+            lineTo(13f, 24f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 23f, 14f
+            )
+            lineTo(23f, 14f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 13f, 4f
+            )
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFFF8F7F7)),
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(13f, 3f)
+            lineTo(13f, 3f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 3f, 13f
+            )
+            lineTo(3f, 13f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 13f, 23f
+            )
+            lineTo(13f, 23f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 23f, 13f
+            )
+            lineTo(23f, 13f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = false, 13f, 3f
+            )
+            close()
+        }
+    }.build()
+}

+ 113 - 0
src/main/kotlin/eu/mjdev/desktop/icons/toggle/ToggleOnLight.kt

@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) Milan Jurkulák 2024.
+ *  Contact:
+ *  e: mimoccc@gmail.com
+ *  e: mj@mjdev.org
+ *  w: https://mjdev.org
+ */
+
+package eu.mjdev.desktop.icons.toggle
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.SolidColor
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.graphics.vector.path
+import androidx.compose.ui.unit.dp
+import eu.mjdev.desktop.icons.Icons
+
+val Icons.ToggleOnLight: ImageVector by lazy {
+    ImageVector.Builder(
+        name = "ToggleOnLight",
+        defaultWidth = 46.dp,
+        defaultHeight = 26.dp,
+        viewportWidth = 46f,
+        viewportHeight = 26f
+    ).apply {
+        path(
+            fill = SolidColor(Color(0xFF666C66)),
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(12.458f, 0f)
+            lineTo(33.542f, 0f)
+            arcTo(
+                12.458f, 13f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 46f, 13f
+            )
+            lineTo(46f, 13f)
+            arcTo(
+                12.458f, 13f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 33.542f, 26f
+            )
+            lineTo(12.458f, 26f)
+            arcTo(
+                12.458f, 13f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 0f, 13f
+            )
+            lineTo(0f, 13f)
+            arcTo(
+                12.458f, 13f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 12.458f, 0f
+            )
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFF000000)),
+            fillAlpha = 0.2f,
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(33f, 4f)
+            lineTo(33f, 4f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 43f, 14f
+            )
+            lineTo(43f, 14f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 33f, 24f
+            )
+            lineTo(33f, 24f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 23f, 14f
+            )
+            lineTo(23f, 14f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 33f, 4f
+            )
+            close()
+        }
+        path(
+            fill = SolidColor(Color(0xFFFFFFFF)),
+            stroke = SolidColor(Color(0x00000000)),
+            strokeLineWidth = 1f
+        ) {
+            moveTo(33f, 3f)
+            lineTo(33f, 3f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 43f, 13f
+            )
+            lineTo(43f, 13f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 33f, 23f
+            )
+            lineTo(33f, 23f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 23f, 13f
+            )
+            lineTo(23f, 13f)
+            arcTo(
+                10f, 10f, 0f,
+                isMoreThanHalf = false, isPositiveArc = true, 33f, 3f
+            )
+            close()
+        }
+    }.build()
+}
+

+ 13 - 12
src/main/kotlin/eu/mjdev/desktop/managers/GnomeManager.kt

@@ -35,18 +35,15 @@ class GnomeManager {
         )
     }
 
-    @Suppress("UNUSED_PARAMETER")
     fun setGTKTheme(
         themeName: String = THEME_YARU
-    ) {
-//        Shell.executeAndRead(
-//            "gsettings",
-//            "set",
-//            "org.gnome.desktop.interface",
-//            "gtk-theme",
-//            themeName
-//        )
-    }
+    ) = Shell.executeAndRead(
+        "gsettings",
+        "set",
+        "org.gnome.desktop.interface",
+        "gtk-theme",
+        themeName
+    )
 
     fun getGTKTheme(): String = Shell.executeAndRead(
         "gsettings",
@@ -75,8 +72,8 @@ class GnomeManager {
         themeName
     )
 
-//    fun setDarkColorScheme() =
-//        setColorScheme(COLOR_SCHEME_PREFER_DARK)
+    fun setDarkColorScheme() =
+        setColorScheme(COLOR_SCHEME_PREFER_DARK)
 
 //    fun recursiveVariantValue(variant: Variant<*>): Any {
 //        val value = variant.value
@@ -95,9 +92,13 @@ class GnomeManager {
         const val COLOR_SCHEME_MJDEV = "mjdev"
 
         const val THEME_YARU = "Yaru"
+
         const val THEME_ADWAITA = "Adwaita"
         const val THEME_ADWAITA_DARK = "Adwaita-dark"
+
         const val THEME_MJDEV = "Mjdev"
+
+        const val THEME_CURSOR_BLOOM = "bloom"
     }
 
 }

+ 175 - 37
src/main/kotlin/eu/mjdev/desktop/theme/gtk/GtkThemeHelper.kt

@@ -3,14 +3,18 @@ package eu.mjdev.desktop.theme.gtk
 import androidx.compose.ui.graphics.Color
 import eu.mjdev.desktop.data.DesktopFile
 import eu.mjdev.desktop.data.DesktopFile.Companion.desktopFile
+import eu.mjdev.desktop.extensions.ColorUtils.isLightColor
 import eu.mjdev.desktop.extensions.Compose.SuperDarkGray
-import eu.mjdev.desktop.extensions.Compose.rgbToHex
+import eu.mjdev.desktop.extensions.Compose.hexRgb
 import eu.mjdev.desktop.helpers.internal.Palette
 import eu.mjdev.desktop.managers.GnomeManager.Companion.THEME_ADWAITA_DARK
+import eu.mjdev.desktop.managers.GnomeManager.Companion.THEME_CURSOR_BLOOM
 import eu.mjdev.desktop.managers.GnomeManager.Companion.THEME_MJDEV
 import eu.mjdev.desktop.provider.DesktopProvider
 import java.io.File
 
+
+// global theme : ~/.config/gtk-2.0 and ~/.config/gtk-3.0 and ~/.config/gtk-4.0
 @Suppress("unused", "MemberVisibilityCanBePrivate")
 class GtkThemeHelper(
     private val api: DesktopProvider,
@@ -39,13 +43,13 @@ class GtkThemeHelper(
                 Type = DesktopFile.DesktopFileType.Theme
                 Name = THEME_MJDEV
                 Comment = "dynamic system theme"
-                Encoding = "UTF-8" // todo
+                Encoding = Charsets.UTF_8.name()
             }
             themeSection {
                 GtkTheme = THEME_MJDEV
                 MetacityTheme = THEME_ADWAITA_DARK
                 IconTheme = THEME_ADWAITA_DARK
-                CursorTheme = "DMZ-White" // todo
+                CursorTheme = THEME_CURSOR_BLOOM
                 ButtonLayout = "close,minimize,maximize:"
                 UseOverlayScrollbars = true
             }
@@ -56,15 +60,48 @@ class GtkThemeHelper(
     private fun createCssFile(file: File) = theme(file) {
         bgColor = palette.backgroundColor
         fgColor = palette.textColor
+
         baseColor = palette.baseColor
         textColor = palette.textColor
+
         selectedBgColor = palette.selectedBgColor
         selectedFgColor = palette.selectedFgColor
+
         tooltipBgColor = palette.tooltipBgColor
         tooltipFgColor = palette.tooltipFgColor
+
+        // todo
+        buttonBgColor = palette.iconsTintColor
+        // if (palette.backgroundColor.isLightColor) palette.textColor else palette.iconsTintColor
+
+        // todo
+        buttonFgColor = if (palette.iconsTintColor.isLightColor) Color.Black else Color.White
+        // if (palette.backgroundColor.isLightColor) palette.iconsTintColor else palette.textColor
+
         write()
     }
 
+    /*
+    @define-color accent_color #ffb49e;
+    @define-color accent_bg_color #ffb49e;
+    @define-color accent_fg_color #5e1703;
+    @define-color destructive_color #ffb4a9;
+    @define-color destructive_bg_color #930006;
+    @define-color destructive_fg_color #680003;
+    @define-color success_color #d9c58d;
+    @define-color success_bg_color #534619;
+    @define-color success_fg_color #f6e1a6;
+    @define-color warning_color #e7bdb2;
+    @define-color warning_bg_color #5d4038;
+    @define-color warning_fg_color #ffdacf;
+    @define-color error_color #ffb4a9;
+    @define-color error_bg_color #930006;
+    @define-color error_fg_color #680003;
+    @define-color shade_color rgba(0, 0, 0, 0.36);
+    @define-color scrollbar_outline_color rgba(160, 140, 135, 0.5);
+ */
+    // ~/.config/gtk-3.0/gtk.css
+    // ~/.config/gtk-4.0/gtk.css
     class Theme(val file: File) {
         var bgColor: Color = Color.SuperDarkGray
         var fgColor: Color = Color.SuperDarkGray
@@ -87,31 +124,49 @@ class GtkThemeHelper(
         var infoBgColor: Color = Color.White
         var osdFgColor: Color = Color.Black
         var osdBgColor: Color = Color.SuperDarkGray
+        var buttonBgColor: Color = Color.SuperDarkGray
+        var buttonFgColor: Color = Color.White
 
         override fun toString() = """
-            @define-color bg_color ${bgColor.rgbToHex()};
-            @define-color fg_color ${fgColor.rgbToHex()};
-            @define-color base_color ${baseColor.rgbToHex()};
-            @define-color text_color ${textColor.rgbToHex()};
-            @define-color selected_bg_color ${selectedBgColor.rgbToHex()};
-            @define-color selected_fg_color ${selectedFgColor.rgbToHex()};
-            @define-color tooltip_bg_color ${tooltipBgColor.rgbToHex()};
-            @define-color tooltip_fg_color ${tooltipFgColor.rgbToHex()};
-            @define-color info_fg_color ${infoFgColor.rgbToHex()};
-            @define-color info_bg_color ${infoBgColor.rgbToHex()};
-            @define-color warning_fg_color ${warningFgColor.rgbToHex()};
-            @define-color warning_bg_color ${warningBgColor.rgbToHex()};
-            @define-color question_fg_color ${questionFgColor.rgbToHex()};
-            @define-color question_bg_color ${questionBgColor.rgbToHex()};
-            @define-color error_fg_color ${errorFgColor.rgbToHex()};
-            @define-color error_bg_color ${errorBgColor.rgbToHex()};
-            @define-color success_color ${successBgColor.rgbToHex()};
-            @define-color error_color ${errorBgColor.rgbToHex()};
-            @define-color dark_bg_color${bgColor.rgbToHex()};
-            @define-color dark_fg_color ${fgColor.rgbToHex()};
-            @define-color osd_fg_color ${osdFgColor.rgbToHex()};
-            @define-color osd_bg_color ${osdBgColor.rgbToHex()};
-            @define-color osd_border_color ${borderColor.rgbToHex()};
+            @define-color bg_color ${bgColor.hexRgb};
+            @define-color fg_color ${fgColor.hexRgb};
+            @define-color base_color ${baseColor.hexRgb};
+            @define-color text_color ${textColor.hexRgb};
+            @define-color selected_bg_color ${selectedBgColor.hexRgb};
+            @define-color selected_fg_color ${selectedFgColor.hexRgb};
+            @define-color tooltip_bg_color ${tooltipBgColor.hexRgb};
+            @define-color tooltip_fg_color ${tooltipFgColor.hexRgb};
+            @define-color info_fg_color ${infoFgColor.hexRgb};
+            @define-color info_bg_color ${infoBgColor.hexRgb};
+            @define-color warning_fg_color ${warningFgColor.hexRgb};
+            @define-color warning_bg_color ${warningBgColor.hexRgb};
+            @define-color question_fg_color ${questionFgColor.hexRgb};
+            @define-color question_bg_color ${questionBgColor.hexRgb};
+            @define-color error_fg_color ${errorFgColor.hexRgb};
+            @define-color error_bg_color ${errorBgColor.hexRgb};
+            @define-color success_color ${successBgColor.hexRgb};
+            @define-color error_color ${errorBgColor.hexRgb};
+            @define-color dark_bg_color ${bgColor.hexRgb};
+            @define-color dark_fg_color ${fgColor.hexRgb};
+            @define-color window_bg_color ${bgColor.hexRgb};
+            @define-color window_fg_color ${fgColor.hexRgb};
+            @define-color view_bg_color ${bgColor.hexRgb};
+            @define-color view_fg_color ${textColor.hexRgb};
+            @define-color headerbar_bg_color ${bgColor.hexRgb};
+            @define-color headerbar_fg_color ${fgColor.hexRgb};
+            @define-color headerbar_border_color ${borderColor.hexRgb};
+            @define-color headerbar_backdrop_color ${bgColor.hexRgb};
+            @define-color headerbar_shade_color ${borderColor.hexRgb};
+            @define-color card_bg_color ${bgColor.hexRgb};
+            @define-color card_fg_color ${fgColor.hexRgb};
+            @define-color card_shade_color ${borderColor.hexRgb};
+            @define-color osd_fg_color ${osdFgColor.hexRgb};
+            @define-color osd_bg_color ${osdBgColor.hexRgb};
+            @define-color osd_border_color ${borderColor.hexRgb};
+            @define-color dialog_bg_color ${bgColor.hexRgb};
+            @define-color dialog_fg_color ${fgColor.hexRgb};
+            @define-color popover_bg_color ${bgColor.hexRgb};
+            @define-color popover_fg_color ${fgColor.hexRgb};
             @define-color link_color @selected_bg_color;
             @define-color button_bg_color shade (@bg_color, 1.02);
             @define-color notebook_button_bg_color shade (@bg_color, 1.02);
@@ -125,34 +180,117 @@ class GtkThemeHelper(
             @define-color focus_color alpha (@selected_bg_color, 0.5);
             @define-color focus_bg_color alpha (@selected_bg_color, 0.1);
             @define-color shadow_color alpha(black, 0.5);
+            @define-color blue_1 #99c1f1;
+            @define-color blue_2 #62a0ea;
+            @define-color blue_3 #3584e4;
+            @define-color blue_4 #1c71d8;
+            @define-color blue_5 #1a5fb4;
+            @define-color green_1 #8ff0a4;
+            @define-color green_2 #57e389;
+            @define-color green_3 #33d17a;
+            @define-color green_4 #2ec27e;
+            @define-color green_5 #26a269;
+            @define-color yellow_1 #f9f06b;
+            @define-color yellow_2 #f8e45c;
+            @define-color yellow_3 #f6d32d;
+            @define-color yellow_4 #f5c211;
+            @define-color yellow_5 #e5a50a;
+            @define-color orange_1 #ffbe6f;
+            @define-color orange_2 #ffa348;
+            @define-color orange_3 #ff7800;
+            @define-color orange_4 #e66100;
+            @define-color orange_5 #c64600;
+            @define-color red_1 #f66151;
+            @define-color red_2 #ed333b;
+            @define-color red_3 #e01b24;
+            @define-color red_4 #c01c28;
+            @define-color red_5 #a51d2d;
+            @define-color purple_1 #dc8add;
+            @define-color purple_2 #c061cb;
+            @define-color purple_3 #9141ac;
+            @define-color purple_4 #813d9c;
+            @define-color purple_5 #613583;
+            @define-color brown_1 #cdab8f;
+            @define-color brown_2 #b5835a;
+            @define-color brown_3 #986a44;
+            @define-color brown_4 #865e3c;
+            @define-color brown_5 #63452c;
+            @define-color light_1 #ffffff;
+            @define-color light_2 #f6f5f4;
+            @define-color light_3 #deddda;
+            @define-color light_4 #c0bfbc;
+            @define-color light_5 #9a9996;
+            @define-color dark_1 #77767b;
+            @define-color dark_2 #5e5c64;
+            @define-color dark_3 #3d3846;
+            @define-color dark_4 #241f31;
+            @define-color dark_5 #000000;
             
             window {
-                background-color: ${bgColor.rgbToHex()};
+                background-image: none;
+                background-color: ${bgColor.hexRgb};
             	border-radius: 8px;
             	border-bottom-left-radius: 8px;
             	border-bottom-right-radius: 8px;
-            	box-shadow: 0px 0px 0px 1px ${textColor.rgbToHex()};
-            	border: 1px solid ${textColor.rgbToHex()};
+                border-top-right-radius: 8px;
+                border-top-left-radius: 8px;
+            	box-shadow: 0px 0px 0px 1px ${textColor.hexRgb};
+            	border: 1px solid ${borderColor.hexRgb};
             	border-top: none;
+                box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
             }
             
             decoration {
-            	background-color: ${bgColor.rgbToHex()};
+                background-image: none;
+            	background-color: ${bgColor.hexRgb};
             	border-radius: 8px;
             	border-bottom-left-radius: 8px;
             	border-bottom-right-radius: 8px;
-            	box-shadow: 0px 0px 0px 1px ${textColor.rgbToHex()};
-            	border: 1px solid ${textColor.rgbToHex()};
+            	box-shadow: 0px 0px 0px 1px ${textColor.hexRgb};
             	border-top: none;
             }
             
-            headerbar {
-                background-color: ${bgColor.rgbToHex()};
-            	border-bottom: 1px solid ${textColor.rgbToHex()};
-            	box-shadow: 0px 1px 0px 0px ${textColor.rgbToHex()};
-            	border-top: 1px solid ${textColor.rgbToHex()};
+            .titlebar, headerbar {
+                background-image: none;
+                background-color: ${bgColor.hexRgb};
+                border-top: 1px solid ${borderColor.hexRgb};
+                border-bottom: 1px solid ${buttonBgColor.hexRgb};
+            }
+
+            .titlebar:backdrop, headerbar:backdrop  {
+                background: ${bgColor.hexRgb};
+                color: ${textColor.hexRgb};
+            }
+            
+            /* all buttons */
+            button {
+                background: ${buttonBgColor.hexRgb};
+                opacity: 0.7;
+                margin: 2px;
+                padding: 4px;
+                min-width: 24px;
+                min-height: 24px;
+                text-shadow: none;
+                color:  ${buttonFgColor.hexRgb};
+                border-radius: 8px;
             }
             
+            /* window buttons */
+            button.minimize,
+            button.maximize,
+            button.close,
+            button.maximize:hover,
+            button.minimize:hover,
+            button.close:hover {
+                opacity: 0.7;
+            }
+
+            button:hover,
+            button.maximize:hover,
+            button.minimize:hover,
+            button.close:hover {
+                opacity: 1;
+            }
         """.trimIndent()
     }