Compare commits
2 Commits
d3b1789b99
...
e96ddbef65
| Author | SHA1 | Date | |
|---|---|---|---|
| e96ddbef65 | |||
| da1d44c3f7 |
32
Colors.qml
32
Colors.qml
@ -3,24 +3,24 @@ import QtQuick
|
|||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
// --- The Backgrounds (Darkest to Lightest) ---
|
// --- The Backgrounds (Darkest to Lightest) ---
|
||||||
readonly property string base00: "#1d1f21" // Default Background
|
readonly property string base00: "#1d2021" // Default Background
|
||||||
readonly property string base01: "#282a2e" // Lighter Background (Status bars, panels)
|
readonly property string base01: "#3c3836" // Lighter Background (Status bars, panels)
|
||||||
readonly property string base02: "#373b41" // Selection Background
|
readonly property string base02: "#504945" // Selection Background
|
||||||
readonly property string base03: "#969896" // Comments, Invisibles, line highlighting
|
readonly property string base03: "#665c54" // Comments, Invisibles, line highlighting
|
||||||
|
|
||||||
// --- The Foregrounds (Darkest to Lightest) ---
|
// --- The Foregrounds (Darkest to Lightest) ---
|
||||||
readonly property string base04: "#b4b7b4" // Dark Foreground (Used for status bars)
|
readonly property string base04: "#bdae93" // Dark Foreground (Used for status bars)
|
||||||
readonly property string base05: "#c5c8c6" // Default Foreground, Caret
|
readonly property string base05: "#d5c4a1" // Default Foreground, Caret
|
||||||
readonly property string base06: "#e0e0e0" // Light Foreground (Rarely used)
|
readonly property string base06: "#ebdbb2" // Light Foreground (Rarely used)
|
||||||
readonly property string base07: "#ffffff" // Lightest Foreground
|
readonly property string base07: "#fbf1c7" // Lightest Foreground
|
||||||
|
|
||||||
// --- The Accent Colors ---
|
// --- The Accent Colors ---
|
||||||
readonly property string base08: "#cc6666" // Red (Variables, errors)
|
readonly property string base08: "#fb4934" // Red (Variables, errors)
|
||||||
readonly property string base09: "#de935f" // Orange (Integers, booleans, constants)
|
readonly property string base09: "#fe8019" // Orange (Integers, booleans, constants)
|
||||||
readonly property string base0A: "#f0c674" // Yellow (Classes, search text bg, warnings)
|
readonly property string base0A: "#fabd2f" // Yellow (Classes, search text bg, warnings)
|
||||||
readonly property string base0B: "#b5bd68" // Green (Strings, success states)
|
readonly property string base0B: "#b8bb26" // Green (Strings, success states)
|
||||||
readonly property string base0C: "#8abeb7" // Cyan (Support, regex, escape chars)
|
readonly property string base0C: "#8ec07c" // Cyan (Support, regex, escape chars)
|
||||||
readonly property string base0D: "#81a2be" // Blue (Functions, methods, headings)
|
readonly property string base0D: "#83a598" // Blue (Functions, methods, headings)
|
||||||
readonly property string base0E: "#b294bb" // Purple/Mauve (Keywords, storage, selectors)
|
readonly property string base0E: "#d3869b" // Purple/Mauve (Keywords, storage, selectors)
|
||||||
readonly property string base0F: "#a3685a" // Brown/Flamingo (Deprecated, embedded tags)
|
readonly property string base0F: "#d65d0e" // Brown/Flamingo (Deprecated, embedded tags)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 4
|
radius: 4
|
||||||
verticalOffset: 2
|
verticalOffset: 2
|
||||||
horizontalOffset: 2
|
horizontalOffset: 2
|
||||||
|
|||||||
@ -15,7 +15,7 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 4
|
radius: 4
|
||||||
verticalOffset: 2
|
verticalOffset: 2
|
||||||
horizontalOffset: 2
|
horizontalOffset: 2
|
||||||
|
|||||||
@ -14,7 +14,7 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 4
|
radius: 4
|
||||||
verticalOffset: 2
|
verticalOffset: 2
|
||||||
horizontalOffset: 2
|
horizontalOffset: 2
|
||||||
|
|||||||
@ -14,7 +14,7 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 4
|
radius: 4
|
||||||
verticalOffset: 2
|
verticalOffset: 2
|
||||||
horizontalOffset: 2
|
horizontalOffset: 2
|
||||||
|
|||||||
@ -12,7 +12,7 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 4
|
radius: 4
|
||||||
verticalOffset: 2
|
verticalOffset: 2
|
||||||
horizontalOffset: 2
|
horizontalOffset: 2
|
||||||
|
|||||||
@ -31,10 +31,10 @@ WrapperRectangle {
|
|||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base01
|
color: "#111111"
|
||||||
radius: 8
|
radius: 0
|
||||||
verticalOffset: 1
|
verticalOffset: 2
|
||||||
horizontalOffset: 1
|
horizontalOffset: 2
|
||||||
samples: 16
|
samples: 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,26 +2,28 @@ import Quickshell
|
|||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
|
import Quickshell.Io
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
import qs.widgets
|
import qs.widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
implicitWidth: wrapper.width
|
property int gaps: 30
|
||||||
implicitHeight: wrapper.height
|
implicitWidth: wrapper.width + gaps
|
||||||
|
implicitHeight: wrapper.height + gaps
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
layer {
|
|
||||||
enabled: true
|
|
||||||
effect: DropShadow {
|
|
||||||
color: Colors.base00
|
|
||||||
horizontalOffset: 2
|
|
||||||
verticalOffset: 2
|
|
||||||
radius: 8
|
|
||||||
samples: 16
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id: wrapper
|
id: wrapper
|
||||||
|
layer {
|
||||||
|
enabled: true
|
||||||
|
effect: DropShadow {
|
||||||
|
color: "#111111"
|
||||||
|
horizontalOffset: 8
|
||||||
|
verticalOffset: 8
|
||||||
|
radius: 8
|
||||||
|
samples: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
SystemClock {
|
SystemClock {
|
||||||
id: clock
|
id: clock
|
||||||
precision: SystemClock.Minutes
|
precision: SystemClock.Minutes
|
||||||
@ -30,6 +32,7 @@ Item {
|
|||||||
radius: Settings.config.rounding
|
radius: Settings.config.rounding
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
margin: 10
|
margin: 10
|
||||||
|
rightMargin: 15
|
||||||
child: Column {
|
child: Column {
|
||||||
id: dataLayout
|
id: dataLayout
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|||||||
@ -11,21 +11,21 @@ import qs.widgets
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
color: Colors.base01
|
color: Colors.base00
|
||||||
radius: Settings.config.rounding
|
radius: Settings.config.rounding * 1.5
|
||||||
implicitWidth: 600
|
implicitWidth: 600
|
||||||
implicitHeight: 200
|
implicitHeight: 200
|
||||||
visible: getSpotify() != null
|
visible: getSpotify() != null
|
||||||
layer {
|
layer {
|
||||||
enabled: true
|
enabled: true
|
||||||
effect: DropShadow {
|
effect: DropShadow {
|
||||||
color: Colors.base00
|
color: "#111111"
|
||||||
horizontalOffset: 2
|
horizontalOffset: 8
|
||||||
verticalOffset: 2
|
verticalOffset: 8
|
||||||
radius: 8
|
radius: 8
|
||||||
samples: 16
|
samples: 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: hoverDetect
|
id: hoverDetect
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@ -53,149 +53,158 @@ Rectangle {
|
|||||||
anchors.margins: 10
|
anchors.margins: 10
|
||||||
margin: 0
|
margin: 0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "transparent"
|
color: Colors.base00
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: songLayout
|
id: songLayout
|
||||||
spacing: 0
|
spacing: 10
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
id: coverRounder
|
id: coverRounder
|
||||||
Layout.leftMargin: 10
|
Layout.fillWidth: true
|
||||||
radius: 16
|
Layout.fillHeight: true
|
||||||
|
Layout.maximumWidth: songCover.sourceSize.width
|
||||||
|
radius: Settings.config.rounding
|
||||||
Image {
|
Image {
|
||||||
id: songCover
|
id: songCover
|
||||||
source: root.art
|
source: root.art
|
||||||
sourceSize {
|
sourceSize {
|
||||||
width: 160
|
width: 180
|
||||||
height: 160
|
height: 180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
WrapperRectangle {
|
||||||
id: songInfo
|
color: Colors.base01
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.leftMargin: 20
|
radius: Settings.config.rounding
|
||||||
Layout.topMargin: 2
|
margin: 20
|
||||||
Item {
|
child: ColumnLayout {
|
||||||
id: titleContainer
|
id: songInfo
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
x: 0
|
Layout.fillHeight: true
|
||||||
implicitHeight: title.implicitHeight
|
Layout.leftMargin: 20
|
||||||
clip: true // Keeps the text inside this "window"
|
Layout.topMargin: 2
|
||||||
|
Item {
|
||||||
|
id: titleContainer
|
||||||
|
Layout.fillWidth: true
|
||||||
|
x: 0
|
||||||
|
implicitHeight: title.implicitHeight
|
||||||
|
clip: true // Keeps the text inside this "window"
|
||||||
|
|
||||||
|
CText {
|
||||||
|
id: title
|
||||||
|
Layout.maximumWidth: 300
|
||||||
|
text: root.title
|
||||||
|
font.pixelSize: 30
|
||||||
|
SequentialAnimation on x {
|
||||||
|
id: scrollAnimation
|
||||||
|
running: hoverDetect.containsMouse && title.width > titleContainer.width
|
||||||
|
loops: Animation.Infinite
|
||||||
|
|
||||||
|
// Scroll to the end
|
||||||
|
NumberAnimation {
|
||||||
|
to: titleContainer.width - title.width
|
||||||
|
duration: Math.max(2000, (title.width - titleContainer.width) * 30)
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scroll back to the start
|
||||||
|
NumberAnimation {
|
||||||
|
to: 0
|
||||||
|
duration: Math.max(2000, (title.width - titleContainer.width) * 30)
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
CText {
|
CText {
|
||||||
id: title
|
id: album
|
||||||
Layout.maximumWidth: 300
|
text: root.album + " - " + root.artist
|
||||||
text: root.title
|
opacity: 0.6
|
||||||
font.pixelSize: 30
|
Layout.maximumWidth: 250
|
||||||
SequentialAnimation on x {
|
elide: Text.ElideRight
|
||||||
id: scrollAnimation
|
}
|
||||||
running: hoverDetect.containsMouse && title.width > titleContainer.width
|
ProgressBar {
|
||||||
loops: Animation.Infinite
|
id: songProgress
|
||||||
|
FrameAnimation {
|
||||||
// Scroll to the end
|
// only emit the signal when the position is actually changing.
|
||||||
NumberAnimation {
|
running: root.spotify ? root.spotify.playbackState == MprisPlaybackState.Playing || root.visible : false
|
||||||
to: titleContainer.width - title.width
|
// emit the positionChanged signal every frame.
|
||||||
duration: Math.max(2000, (title.width - titleContainer.width) * 30)
|
onTriggered: root.spotify.positionChanged()
|
||||||
easing.type: Easing.InOutQuad
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scroll back to the start
|
|
||||||
NumberAnimation {
|
|
||||||
to: 0
|
|
||||||
duration: Math.max(2000, (title.width - titleContainer.width) * 30)
|
|
||||||
easing.type: Easing.InOutQuad
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
CText {
|
|
||||||
id: album
|
|
||||||
text: root.album + " - " + root.artist
|
|
||||||
opacity: 0.6
|
|
||||||
Layout.maximumWidth: 250
|
|
||||||
elide: Text.ElideRight
|
|
||||||
}
|
|
||||||
ProgressBar {
|
|
||||||
id: songProgress
|
|
||||||
FrameAnimation {
|
|
||||||
// only emit the signal when the position is actually changing.
|
|
||||||
running: root.spotify ? root.spotify.playbackState == MprisPlaybackState.Playing || root.visible : false
|
|
||||||
// emit the positionChanged signal every frame.
|
|
||||||
onTriggered: root.spotify.positionChanged()
|
|
||||||
}
|
|
||||||
implicitWidth: 200
|
|
||||||
implicitHeight: 10
|
|
||||||
from: 0
|
|
||||||
to: root.spotify != null ? root.spotify.length : 0
|
|
||||||
value: root.spotify != null ? root.spotify.position : 0
|
|
||||||
background: Rectangle {
|
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
implicitHeight: 6
|
implicitHeight: 10
|
||||||
color: Colors.base02
|
from: 0
|
||||||
radius: 32
|
to: root.spotify != null ? root.spotify.length : 0
|
||||||
}
|
value: root.spotify != null ? root.spotify.position : 0
|
||||||
contentItem: Item {
|
background: Rectangle {
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
implicitHeight: 4
|
implicitHeight: 6
|
||||||
|
color: Colors.base02
|
||||||
|
radius: Settings.config.rounding
|
||||||
|
}
|
||||||
|
contentItem: Item {
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: 4
|
||||||
|
|
||||||
// Progress indicator for determinate state.
|
// Progress indicator for determinate state.
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: songProgress.visualPosition * parent.width
|
width: songProgress.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
radius: 32
|
radius: Settings.config.rounding
|
||||||
color: Colors.base07
|
color: Colors.base07
|
||||||
visible: !songProgress.indeterminate
|
visible: !songProgress.indeterminate
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
id: playerControls
|
|
||||||
Layout.maximumWidth: 200
|
|
||||||
CIcon {
|
|
||||||
id: previous
|
|
||||||
text: "\ue045"
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
MouseArea {
|
|
||||||
id: prevHandler
|
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
root.spotify.previous();
|
|
||||||
title.x = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CIcon {
|
RowLayout {
|
||||||
id: pause
|
id: playerControls
|
||||||
text: root.spotify ? root.spotify.isPlaying ? "\ue034" : "\ue037" : ""
|
Layout.maximumWidth: 200
|
||||||
Layout.alignment: Qt.AlignHCenter
|
CIcon {
|
||||||
MouseArea {
|
id: previous
|
||||||
id: pauseHandler
|
text: "\ue045"
|
||||||
anchors.fill: parent
|
Layout.alignment: Qt.AlignLeft
|
||||||
acceptedButtons: Qt.LeftButton
|
MouseArea {
|
||||||
cursorShape: Qt.PointingHandCursor
|
id: prevHandler
|
||||||
onClicked: {
|
anchors.fill: parent
|
||||||
root.spotify.togglePlaying();
|
acceptedButtons: Qt.LeftButton
|
||||||
title.x = 0;
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
root.spotify.previous();
|
||||||
|
title.x = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
CIcon {
|
||||||
CIcon {
|
id: pause
|
||||||
id: next
|
text: root.spotify ? root.spotify.isPlaying ? "\ue034" : "\ue037" : ""
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: "\ue044"
|
MouseArea {
|
||||||
MouseArea {
|
id: pauseHandler
|
||||||
id: nextHandler
|
anchors.fill: parent
|
||||||
anchors.fill: parent
|
acceptedButtons: Qt.LeftButton
|
||||||
acceptedButtons: Qt.LeftButton
|
cursorShape: Qt.PointingHandCursor
|
||||||
cursorShape: Qt.PointingHandCursor
|
onClicked: {
|
||||||
onClicked: {
|
root.spotify.togglePlaying();
|
||||||
root.spotify.next();
|
title.x = 0;
|
||||||
title.x = 0;
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CIcon {
|
||||||
|
id: next
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
text: "\ue044"
|
||||||
|
MouseArea {
|
||||||
|
id: nextHandler
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
root.spotify.next();
|
||||||
|
title.x = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
"barHeight": 32,
|
"barHeight": 32,
|
||||||
"barSpacing": 10,
|
"barSpacing": 10,
|
||||||
"barmargins": 6,
|
"barmargins": 6,
|
||||||
"currentWall": "/home/lucy/.walls/frierensuff.png",
|
"currentWall": "/home/lucy/.walls/lance_of_longinus.png",
|
||||||
"floating": true,
|
"floating": true,
|
||||||
"font": "Lora",
|
"font": "Maple Mono",
|
||||||
"fontSize": 14,
|
"fontSize": 14,
|
||||||
"margins": 10,
|
"margins": 10,
|
||||||
"rounding": 26,
|
"rounding": 26,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user