mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 10:19:02 +05:30
feat(theme): add base16 theme support
This commit is contained in:
@@ -44,7 +44,7 @@ shell.qml Entry point: Scope { Bar {}; Notification {} }
|
|||||||
│ ├── Cava.qml Spawns `cava`, parses stdout into `values[]`
|
│ ├── Cava.qml Spawns `cava`, parses stdout into `values[]`
|
||||||
│ └── Notifications.qml NotificationServer: popups, DND flag, history
|
│ └── Notifications.qml NotificationServer: popups, DND flag, history
|
||||||
├── config/ QML Singletons for configuration/theming
|
├── config/ QML Singletons for configuration/theming
|
||||||
│ ├── Theme.qml colors, font, margin/radius/spacing/padding/duration, per-widget sizes
|
│ ├── Theme.qml base16 palettes (Theme.colors.base00-0F + semantic aliases), font, margin/radius/spacing/padding/duration, per-widget sizes
|
||||||
│ └── BarLayout.qml Which widgets go in left/center/right bar sections
|
│ └── BarLayout.qml Which widgets go in left/center/right bar sections
|
||||||
├── ui/ Shared reusable primitives
|
├── ui/ Shared reusable primitives
|
||||||
│ ├── BarButton.qml Themed button used by bar widgets
|
│ ├── BarButton.qml Themed button used by bar widgets
|
||||||
|
|||||||
109
config/Theme.qml
109
config/Theme.qml
@@ -7,38 +7,114 @@ import Quickshell
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property string name: "poimandres"
|
||||||
|
|
||||||
|
readonly property Base16 scheme: {
|
||||||
|
switch (root.name) {
|
||||||
|
case "poimandres":
|
||||||
|
return poimandres;
|
||||||
|
default:
|
||||||
|
return gruvbox;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
component Base16: QtObject {
|
||||||
|
property color base00
|
||||||
|
property color base01
|
||||||
|
property color base02
|
||||||
|
property color base03
|
||||||
|
property color base04
|
||||||
|
property color base05
|
||||||
|
property color base06
|
||||||
|
property color base07
|
||||||
|
property color base08
|
||||||
|
property color base09
|
||||||
|
property color base0A
|
||||||
|
property color base0B
|
||||||
|
property color base0C
|
||||||
|
property color base0D
|
||||||
|
property color base0E
|
||||||
|
property color base0F
|
||||||
|
}
|
||||||
|
|
||||||
|
Base16 {
|
||||||
|
id: poimandres
|
||||||
|
|
||||||
|
base00: "#1b1e28"
|
||||||
|
base01: "#2b3040"
|
||||||
|
base02: "#32384a"
|
||||||
|
base03: "#3b4258"
|
||||||
|
base04: "#5d678a"
|
||||||
|
base05: "#E4F0FB"
|
||||||
|
base06: "#b6d7f4"
|
||||||
|
base07: "#ffffff"
|
||||||
|
base08: "#D0679D"
|
||||||
|
base09: "#91B4D5"
|
||||||
|
base0A: "#FFFAC2"
|
||||||
|
base0B: "#5FB3A1"
|
||||||
|
base0C: "#5DE4C7"
|
||||||
|
base0D: "#89DDFF"
|
||||||
|
base0E: "#A6ACCD"
|
||||||
|
base0F: "#FCC5E9"
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly property QtObject colors: QtObject {
|
||||||
|
readonly property color base00: root.scheme.base00
|
||||||
|
readonly property color base01: root.scheme.base01
|
||||||
|
readonly property color base02: root.scheme.base02
|
||||||
|
readonly property color base03: root.scheme.base03
|
||||||
|
readonly property color base04: root.scheme.base04
|
||||||
|
readonly property color base05: root.scheme.base05
|
||||||
|
readonly property color base06: root.scheme.base06
|
||||||
|
readonly property color base07: root.scheme.base07
|
||||||
|
readonly property color base08: root.scheme.base08
|
||||||
|
readonly property color base09: root.scheme.base09
|
||||||
|
readonly property color base0A: root.scheme.base0A
|
||||||
|
readonly property color base0B: root.scheme.base0B
|
||||||
|
readonly property color base0C: root.scheme.base0C
|
||||||
|
readonly property color base0D: root.scheme.base0D
|
||||||
|
readonly property color base0E: root.scheme.base0E
|
||||||
|
readonly property color base0F: root.scheme.base0F
|
||||||
|
|
||||||
|
readonly property color accent: base0D
|
||||||
|
readonly property color foreground: base05
|
||||||
|
readonly property color background: base00
|
||||||
|
readonly property color inActive: base01
|
||||||
|
readonly property color hover: base02
|
||||||
|
readonly property color border: base03
|
||||||
|
readonly property color secondaryForeground: base04
|
||||||
|
readonly property color error: base08
|
||||||
|
readonly property color warning: base0A
|
||||||
|
readonly property color success: base0B
|
||||||
|
readonly property color info: base0C
|
||||||
|
}
|
||||||
|
|
||||||
property int margin: 8
|
property int margin: 8
|
||||||
property int radius: 8
|
property int radius: 8
|
||||||
property int spacing: 8
|
property int spacing: 8
|
||||||
property int padding: 8
|
property int padding: 8
|
||||||
property int duration: 150
|
property int duration: 150
|
||||||
|
property int borderWidth: 1
|
||||||
|
|
||||||
font: QtObject {
|
property QtObject font: QtObject {
|
||||||
property string family: "FiraCode Nerd Font Mono SemBd"
|
property string family: "FiraCode Nerd Font Mono SemBd"
|
||||||
property int pointSize: 9
|
property int pointSize: 9
|
||||||
readonly property int body: pointSize - 1
|
readonly property int body: pointSize - 1
|
||||||
readonly property int caption: pointSize - 2
|
readonly property int caption: pointSize - 2
|
||||||
}
|
}
|
||||||
|
|
||||||
colors: QtObject {
|
property QtObject bar: QtObject {
|
||||||
property color accent: "#6791c9"
|
|
||||||
property color foreground: "#ffffff"
|
|
||||||
property color background: "#101213"
|
|
||||||
property color inActive: "#1b1d1e"
|
|
||||||
}
|
|
||||||
|
|
||||||
bar: QtObject {
|
|
||||||
property int thickness: 10
|
property int thickness: 10
|
||||||
property int height: 50
|
property int height: 50
|
||||||
}
|
}
|
||||||
|
|
||||||
workspaces: QtObject {
|
property QtObject workspaces: QtObject {
|
||||||
property int height: 15
|
property int height: 15
|
||||||
property int radius: 1000
|
property int radius: 1000
|
||||||
property real activeWidthRatio: 2.3
|
property real activeWidthRatio: 2.3
|
||||||
}
|
}
|
||||||
|
|
||||||
cava: QtObject {
|
property QtObject cava: QtObject {
|
||||||
property int width: 96
|
property int width: 96
|
||||||
property int height: 32
|
property int height: 32
|
||||||
property int innerMargin: 8
|
property int innerMargin: 8
|
||||||
@@ -46,14 +122,19 @@ Singleton {
|
|||||||
property int barMinHeight: 2
|
property int barMinHeight: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
tray: QtObject {
|
property QtObject button: QtObject {
|
||||||
|
property int iconSize: 14
|
||||||
|
property int verticalPadding: 4
|
||||||
|
property int borderWidth: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
property QtObject tray: QtObject {
|
||||||
property int iconSize: 16
|
property int iconSize: 16
|
||||||
}
|
}
|
||||||
|
|
||||||
notification: QtObject {
|
property QtObject notification: QtObject {
|
||||||
property int width: 420
|
property int width: 420
|
||||||
property int iconSize: 40
|
property int iconSize: 40
|
||||||
property int borderWidth: 1
|
|
||||||
property int textSpacing: 2
|
property int textSpacing: 2
|
||||||
property real bodyOpacity: 0.8
|
property real bodyOpacity: 0.8
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user