added: battery indicator onto bar

This commit is contained in:
2025-12-27 00:22:53 +00:00
parent df756281ae
commit 75ef6f9085
17 changed files with 173 additions and 96 deletions

View File

@@ -37,6 +37,7 @@ in
configs = true; configs = true;
}; };
plugins = { plugins = {
todo-comments.enable = true;
lsp-status.enable = true; lsp-status.enable = true;
lsp = { lsp = {
enable = true; enable = true;

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M480-420q-41.92 0-70.96-29.04Q380-478.08 380-520v-240q0-41.92 29.04-70.96Q438.08-860 480-860q41.92 0 70.96 29.04Q580-801.92 580-760v240q0 41.92-29.04 70.96Q521.92-420 480-420Zm-30 290v-131.85q-99-11.31-164.5-84.92Q220-420.39 220-520h60q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h60q0 99.61-65.5 173.23Q609-273.16 510-261.85V-130h-60Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M479.93-379q-56.47 0-95.94-40.01-39.47-40.02-39.47-96.47v-232.04q0-56.45 39.53-95.97Q423.59-883 480.07-883q56.47 0 95.94 39.51 39.47 39.52 39.47 95.97v232.04q0 56.45-39.53 96.47Q536.41-379 479.93-379ZM434.02-93.52v-124.76q-111.11-14.13-183.26-99.16-72.15-85.03-72.15-198.04h92.52q0 87.09 61.13 147.98 61.13 60.89 147.85 60.89 86.73 0 147.75-61.09 61.01-61.1 61.01-147.78h92.52q0 113.24-72.15 198.16-72.15 84.91-183.26 99.04v124.76h-91.96Z"/></svg>

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 563 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="m710-362-58-58q14-23 21-48t7-52h80q0 44-13 83.5T710-362ZM592-482 360-714v-46q0-50 35-85t85-35q50 0 85 35t35 85v240q0 11-2.5 20t-5.5 18ZM440-120v-124q-104-14-172-92.5T200-520h80q0 83 58.5 141.5T480-320q34 0 64.5-10.5T600-360l57 57q-29 23-63.5 38.5T520-244v124h-80Zm352 64L56-792l56-56 736 736-56 56Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="m735.55-357.02-68.57-68.7q11.17-19.04 16.48-41.43 5.3-22.39 5.3-48.33h91.96q0 42.93-11.12 83.44-11.12 40.52-34.05 75.02ZM610.07-482.37 348.93-744v-31.22q7.35-44.11 43.99-75.94Q429.57-883 479.33-883q56.54 0 96.29 39.47 39.75 39.46 39.75 96.01v232.04q0 8.87-1.43 17.87-1.44 9-3.87 15.24ZM433.35-93.52v-124.7q-111.11-14.13-183.26-99.02-72.16-84.9-72.16-198.24h92.53q0 87.09 61.01 147.98 61.01 60.89 147.86 60.89 39.08 0 74.11-13.59 35.02-13.59 62.28-37.58l67 67q-31.89 29.15-71.76 47.9-39.87 18.74-85.66 24.83v124.53h-91.95Zm351.82 20.5-723.5-723.5 57.66-57.65 723 723-57.16 58.15Z"/></svg>

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 703 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="M792-56 671-177q-25 16-53 27.5T560-131v-82q14-5 27.5-10t25.5-12L480-368v208L280-360H120v-240h128L56-792l56-56 736 736-56 56Zm-8-232-58-58q17-31 25.5-65t8.5-70q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 53-14.5 102T784-288ZM650-422l-90-90v-130q47 22 73.5 66t26.5 96q0 15-2.5 29.5T650-422ZM480-592 376-696l104-104v208Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M790.15-48.91 666.02-174.17q-20.24 12.24-43.19 21.57-22.96 9.34-48.2 14.71v-86.61q7.98-2.8 15.49-5.61 7.51-2.8 15.12-6.54L499.63-343.39v215.17L281.06-346.78h-166.3v-266.44h120.13l-187.61-191 58.65-58.65 743.44 754.74-59.22 59.22Zm-.3-238.87-60.72-61.85q17-29.44 25.75-62.4 8.75-32.97 8.75-68.47 0-88.43-52.56-158.65-52.57-70.22-136.44-97.35v-86.61q119.89 28.57 196.47 123.89 76.58 95.33 76.58 218.72 0 53.76-15.1 102.14t-42.73 90.58ZM669.41-409.91l-94.78-95.92v-137.95q48.76 22.13 79.9 65.79 31.15 43.66 31.15 97.99 0 19.2-4.07 36.61t-12.2 33.48ZM499.63-582.52 376.41-708.57l123.22-123.21v249.26Z"/></svg>

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 721 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M561.54-155.62v-62q86.54-27.53 139.42-100 52.89-72.46 52.89-163.38t-52.89-163.38q-52.88-72.47-139.42-100v-62q111.69 29.92 182 119.92 70.3 90 70.3 205.46 0 115.46-70.3 205.46-70.31 90-182 119.92ZM146.16-380v-200h148.46l171.53-171.53v543.06L294.62-380H146.16Zm415.38 46.15v-294.3q40.46 22 62.54 61.96 22.07 39.96 22.07 86.19 0 45.61-22.27 84.88-22.27 39.27-62.34 61.27Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M565.7-158.89v-79.61q80.43-24.13 130.71-90.85 50.29-66.72 50.29-150.15t-50.79-149.15q-50.78-65.72-130.21-92.85v-79.61q111.89 25.57 184.18 115.64 72.3 90.08 72.3 204.97t-71.8 205.47q-71.79 90.57-184.68 116.14ZM137.82-371.78v-218.44h150.31L498.7-800.78v639.56L288.13-371.78H137.82Zm427.88 44.56v-306.56q46.76 20.69 76.62 61.07 29.86 40.38 29.86 91.71 0 51.83-29.86 92.24t-76.62 61.54Z"/></svg>

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 507 B

2
modules/quickshell/quickshell/assets/bar/V2/mic.svg Normal file → Executable file
View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M479.97-389q-53.8 0-91.43-37.65-37.63-37.65-37.63-91.44v-238.32q0-53.79 37.66-91.44t91.46-37.65q53.8 0 91.43 37.65 37.63 37.65 37.63 91.44v238.32q0 53.79-37.66 91.44T479.97-389Zm-43.56 283.59v-123.96q-108.06-14.48-178.45-96.85-70.4-82.38-70.4-191.87h87.42q0 85.16 59.98 145.09 59.98 59.93 145.09 59.93 85.1 0 145.04-59.96 59.93-59.97 59.93-145.06h87.42q0 109.55-70.4 191.89-70.39 82.35-178.45 96.83v123.96h-87.18Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M479.93-379q-56.47 0-95.94-40.01-39.47-40.02-39.47-96.47v-232.04q0-56.45 39.53-95.97Q423.59-883 480.07-883q56.47 0 95.94 39.51 39.47 39.52 39.47 95.97v232.04q0 56.45-39.53 96.47Q536.41-379 479.93-379ZM434.02-93.52v-124.76q-111.11-14.13-183.26-99.16-72.15-85.03-72.15-198.04h92.52q0 87.09 61.13 147.98 61.13 60.89 147.85 60.89 86.73 0 147.75-61.09 61.01-61.1 61.01-147.78h92.52q0 113.24-72.15 198.16-72.15 84.91-183.26 99.04v124.76h-91.96Z"/></svg>

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 563 B

2
modules/quickshell/quickshell/assets/bar/V2/micOff.svg Normal file → Executable file
View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="m715.83-357.41-58.74-58.74q9.8-19.81 15.58-40.99 5.79-21.19 5.79-44.95h79.17q0 38-10.52 75.34t-31.28 69.34ZM605.24-467.52 354.26-718.5v-33.63q3.11-48.57 39.54-82.97 36.44-34.4 87.4-34.4 53.82 0 91.57 37.63 37.75 37.63 37.75 91.46v238.32q0 8.52-1.26 17.52t-4.02 17.05ZM441.61-129.41v-99.72q-103.07-12.48-169.96-90.45-66.89-77.96-66.89-182.51h79.41q0 82.16 57.44 139.59 57.43 57.43 139.59 57.43 36.15 0 68.56-14.19 32.41-14.2 59.37-38.11l57.5 57.5q-30.43 27.39-67.71 46.33-37.27 18.93-78.14 24.41v99.72h-79.17Zm325.19 37.5-678-679 53.4-53.39 678 679-53.4 53.39Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="m735.55-357.02-68.57-68.7q11.17-19.04 16.48-41.43 5.3-22.39 5.3-48.33h91.96q0 42.93-11.12 83.44-11.12 40.52-34.05 75.02ZM610.07-482.37 348.93-744v-31.22q7.35-44.11 43.99-75.94Q429.57-883 479.33-883q56.54 0 96.29 39.47 39.75 39.46 39.75 96.01v232.04q0 8.87-1.43 17.87-1.44 9-3.87 15.24ZM433.35-93.52v-124.7q-111.11-14.13-183.26-99.02-72.16-84.9-72.16-198.24h92.53q0 87.09 61.01 147.98 61.01 60.89 147.86 60.89 39.08 0 74.11-13.59 35.02-13.59 62.28-37.58l67 67q-31.89 29.15-71.76 47.9-39.87 18.74-85.66 24.83v124.53h-91.95Zm351.82 20.5-723.5-723.5 57.66-57.65 723 723-57.16 58.15Z"/></svg>

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 703 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M566.22-126.93V-213q89.76-26.48 144.88-100.36 55.12-73.88 55.12-167.64 0-93.76-55.12-167.64Q655.98-722.52 566.22-749v-86.07q125.43 28.24 204.51 126.94Q849.8-609.43 849.8-481t-79.07 227.13q-79.08 98.7-204.51 126.94ZM110.2-351.87v-256.26h164.78l211.24-211.24v678.74L274.98-351.87H110.2Zm456.02 34.74v-327.74q47.95 22.72 75.77 67.2Q669.8-533.2 669.8-480q0 52.2-27.81 96.29-27.82 44.1-75.77 66.58Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M565.7-158.89v-79.61q80.43-24.13 130.71-90.85 50.29-66.72 50.29-150.15t-50.79-149.15q-50.78-65.72-130.21-92.85v-79.61q111.89 25.57 184.18 115.64 72.3 90.08 72.3 204.97t-71.8 205.47q-71.79 90.57-184.68 116.14ZM137.82-371.78v-218.44h150.31L498.7-800.78v639.56L288.13-371.78H137.82Zm427.88 44.56v-306.56q46.76 20.69 76.62 61.07 29.86 40.38 29.86 91.71 0 51.83-29.86 92.24t-76.62 61.54Z"/></svg>

Before

Width:  |  Height:  |  Size: 518 B

After

Width:  |  Height:  |  Size: 507 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M794.39-48.35 672.91-170.3q-24.04 15.04-50.96 25.94-26.93 10.9-55.97 17.43V-213q12.09-4.28 23.79-8.57 11.71-4.28 22.27-10.32L485.98-358.43v217.8L274.74-351.87H109.96v-256.26h128.47l-190.56-192 58.39-58.39 746.76 751.54-58.63 58.63Zm-1.78-237.02-60.63-61.11q17-30.76 25.5-64.64 8.5-33.88 8.5-69.88 0-93.76-55.24-167.64Q655.5-722.52 565.98-749v-86.07q125.43 28.24 204.63 126.94Q849.8-609.43 849.8-481q0 53.96-14.85 103.43-14.86 49.48-42.34 92.2ZM658.85-419.85l-92.87-93.35v-131.67q47.95 22.48 75.89 67.08Q669.8-533.2 669.8-480q0 15.72-2.73 30.82-2.74 15.09-8.22 29.33ZM485.98-593.91 373.85-707.24l112.13-112.13v225.46Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M790.15-48.91 666.02-174.17q-20.24 12.24-43.19 21.57-22.96 9.34-48.2 14.71v-86.61q7.98-2.8 15.49-5.61 7.51-2.8 15.12-6.54L499.63-343.39v215.17L281.06-346.78h-166.3v-266.44h120.13l-187.61-191 58.65-58.65 743.44 754.74-59.22 59.22Zm-.3-238.87-60.72-61.85q17-29.44 25.75-62.4 8.75-32.97 8.75-68.47 0-88.43-52.56-158.65-52.57-70.22-136.44-97.35v-86.61q119.89 28.57 196.47 123.89 76.58 95.33 76.58 218.72 0 53.76-15.1 102.14t-42.73 90.58ZM669.41-409.91l-94.78-95.92v-137.95q48.76 22.13 79.9 65.79 31.15 43.66 31.15 97.99 0 19.2-4.07 36.61t-12.2 33.48ZM499.63-582.52 376.41-708.57l123.22-123.21v249.26Z"/></svg>

Before

Width:  |  Height:  |  Size: 741 B

After

Width:  |  Height:  |  Size: 721 B

View File

@@ -16,7 +16,7 @@ PanelWindow {
property var modelData property var modelData
screen: modelData.values[0] screen: modelData.values[0]
color: '#20ffffff' color: Common.Colors.colors.mainBackground
anchors { anchors {
top: true top: true
left: true left: true

View File

@@ -6,6 +6,8 @@ import Quickshell.Widgets
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
import QtQuick.VectorImage import QtQuick.VectorImage
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Shapes 1.10
import QtQuick.Effects
import "common" as Common import "common" as Common
Rectangle { Rectangle {
@@ -15,48 +17,42 @@ Rectangle {
PwObjectTracker { PwObjectTracker {
objects: [root.microphoneNode, root.speakerNode] objects: [root.microphoneNode, root.speakerNode]
} }
implicitWidth: itemContent.width + 4 implicitWidth: itemContent.width + 8
implicitHeight: 24 implicitHeight: 24
radius: 5.5 radius: 5.5
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
color: "#2a2a2a" // Define item color color: Common.Colors.colors.secondary // Define item color
// color: "#2a2a2a"
RowLayout { RowLayout {
id: itemContent id: itemContent
anchors.centerIn: parent
// spacing: 100
Repeater { Repeater {
model: [ model: [
{ {
on: "../../assets/bar/V2/speaker.svg", on: Common.Icons.audioIcons["speaker"],
off: "../../assets/bar/V2/speakerOff.svg", off: Common.Icons.audioIcons["speakerMuted"],
node: root.speakerNode node: root.speakerNode
}, },
{ {
on: "../../assets/bar/V2/mic.svg", on: Common.Icons.audioIcons["microphone"],
off: "../../assets/bar/V2/micOff.svg", off: Common.Icons.audioIcons["microphoneMuted"],
node: root.microphoneNode node: root.microphoneNode
}, },
] ]
Item { Item {
id: meow
implicitWidth: 24 implicitWidth: 24
Layout.alignment: Qt.AlignHCenter
implicitHeight: 24 implicitHeight: 24
// anchors.centerIn: parent Text {
VectorImage { id: textElement
id: svgImage anchors.centerIn: parent // Ensure the text fills the parent item
width: parent.width text: modelData.node.audio.muted ? modelData.off : modelData.on
height: parent.height font.pointSize: 18.25
source: modelData.node.audio.muted ? modelData.off : modelData.on font.weight: Font.DemiBold
visible: false color: modelData.node.audio.muted ? Common.Colors.colors.critial2 : Common.Colors.colors.primary
fillMode: Image.PreserveAspectFit // Adjusts the SVG while keeping the aspect ratio }
}
MultiEffect {
source: svgImage
width: parent.width
height: parent.height
// anchors.centerIn: parent
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
colorization: 1
brightness: 1
colorizationColor: modelData.node.audio.muted ? "#e53b3c" : "#b1b2b5"
}
} }
} }
} }

View File

@@ -10,62 +10,73 @@ import Quickshell.Services.UPower
import "common" as Common import "common" as Common
Rectangle { Rectangle {
// TODO eventually fix the alignment (it isnt centered horizentally)
id: root id: root
property int battPercent: 58 property int battPercent: 58
implicitWidth: itemContent.width + 4 implicitWidth: itemContent.width + 8
implicitHeight: 24 implicitHeight: 24
enabled: {
if (UPower.displayDevice != null) {
true
} else {
false
}
}
radius: 5.5 radius: 5.5
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
color: "#2a2a2a" // Define item color color: "#2a2a2a" // Define item color
Item { RowLayout {
id: itemContent id: itemContent
implicitWidth: 24 implicitWidth: 24
implicitHeight: 24 implicitHeight: 24
// anchors.centerIn: parent anchors.centerIn: parent
VectorImage { Text {
id: svgImage // anchors.centerIn: parent
width: parent.width text: "58%"
height: parent.height color: Common.Colors.colors.primary
source: "../../assets/bar/batt/" + root.getBatteryState(UPower.displayDevice.percentage) + ".svg" font.weight: Font.DemiBold
visible: false font.pointSize: 12
fillMode: Image.PreserveAspectFit // Adjusts the SVG while keeping the aspect ratio }
} Item {
MultiEffect { Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
source: svgImage Text {
width: parent.width anchors.centerIn: parent
height: parent.height text: root.getBatteryState(UPower.displayDevice.percentage, (UPower.displayDevice.changeRate > 0))
// anchors.centerIn: parent color: root.getBatteryColor(UPower.displayDevice.percentage)
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter font.weight: Font.DemiBold
// colorization: 1 font.pointSize: 24/1.4
brightness: 1 }
// colorizationColor: modelData.node.audio.muted ? "#e53b3c" : "#b1b2b5" }
}
} }
function getBatteryState(level) { function getBatteryState(level, isCharging) {
if (level === null) { if (level === null || level === 0) {
return 0; // Return the battery empty icon
} return isCharging ? Common.Icons.battery.charging["1"] : Common.Icons.battery["0"];
level = Math.max(0, Math.min(100, level));
if (level === 0)
return 0; // 0% exactly
if (level === 100)
return 7; // 100% exactly
if (level > 0 && level <= 16)
return 1;
if (level > 16 && level <= 32)
return 2;
if (level > 32 && level <= 48)
return 3;
if (level > 48 && level <= 64)
return 4;
if (level > 64 && level <= 80)
return 5;
if (level > 80 && level < 100)
return 6;
return 0;
} }
if (level === 100) {
// Return the battery full icon
return isCharging ? Common.Icons.battery.charging["10"] : Common.Icons.battery["10"];
}
// Calculate step as a value between 1 and 10 (divide level into 10 ranges)
let step = Math.ceil(level / 10); // Range mapping
if (step > 10) step = 10; // Clamp to 10 if it exceeds bounds
// Return the correct icon based on state
return isCharging ? Common.Icons.battery.charging[String(step)] : Common.Icons.battery[String(step)];
}
function getBatteryColor(level) {
if (level === null || level === 0) {
// Use critical color for empty battery
return Common.Colors.colors.critial2;
}
if (level > 0 && level <= 20) {
// Use critical color for low battery
return Common.Colors.colors.critial2;
}
// Default color if no specific condition is met
return Common.Colors.colors.primary;
}
} }

View File

@@ -11,7 +11,7 @@ Rectangle {
id: backgroundRect id: backgroundRect
implicitWidth: rowLayout.implicitWidth + 6 // Account for padding (2px left + 2px right) implicitWidth: rowLayout.implicitWidth + 6 // Account for padding (2px left + 2px right)
implicitHeight: rowLayout.implicitHeight + 4 // Account for padding (2px top + 2px bottom) implicitHeight: rowLayout.implicitHeight + 4 // Account for padding (2px top + 2px bottom)
color: "black" color: Common.Colors.colors.background
radius: 6.5 // Background rectangle with rounded corners radius: 6.5 // Background rectangle with rounded corners
// border.color: "gray" // border.color: "gray"
// border.width: 1 // border.width: 1
@@ -33,6 +33,7 @@ Rectangle {
Audio {} Audio {}
Battery {} Battery {}
Common.VerticalSeprator {}
Clock.Date {} Clock.Date {}
Clock.Clock {} Clock.Clock {}
} }

View File

@@ -6,7 +6,16 @@ import Quickshell.Io
Singleton { Singleton {
id: root id: root
// XX (alpha) XXXXXX (color)
// For oled screen that risk burn in, set up these colors as semi-transparent and have a rotating wallpaper (!!)
readonly property var colors: ({ readonly property var colors: ({
"primary": "", primary: "#59b1b2b5", // Icons & Text colors
secondary: "#BF2a2a2a", // Pill container colors
background: "#BF000000", // Background of containers
mainBackground: "#20ffffff", // Color of the main bar
warning: "#E9D502", // (i.e battery nearing low)
critial: "#e53b3c", // (i.e battery is low)
critial2: "#e53b3c", // (Speaker and Mic being off)
}) })
} }

View File

@@ -6,16 +6,41 @@ import Quickshell.Io
Singleton { Singleton {
id: root id: root
readonly property var svgs: ({ // readonly property var svgs: ({
micOff: "../../../assets/bar/V2/micOff.svg", // micOff: "../../../assets/bar/V2/micOff.svg",
mic: "../../../assets/bar/V2/mic.svg", // mic: "../../../assets/bar/V2/mic.svg",
speaker: "../../../assets/bar/V2/speaker.svg", // speaker: "../../../assets/bar/V2/speaker.svg",
speakerOff: "../../../assets/bar/V2/speakerOff.svg" // speakerOff: "../../../assets/bar/V2/speakerOff.svg"
}) // })
readonly property var battery: ({
"0": "󰂎",
"1": "󰁺",
"2": "󰁻",
"3": "󰁼",
"4": "󰁾",
"5": "󰁾",
"6": "󰁿",
"7": "󰂀",
"8": "󰂁",
"9": "󰂂",
"10": "󰁹",
charging: ({
"1": "󰢜",
"2": "󰂆",
"3": "󰂇",
"4": "󰂈",
"5": "󰢝",
"6": "󰂉",
"7": "󰢞",
"8": "󰂊",
"9": "󰂋",
"10": "󰂅",
})
})
readonly property var audioIcons: ({ readonly property var audioIcons: ({
microphone: "", microphone: "󰍬",
microphoneMuted: "", microphoneMuted: "󰍭",
speaker: "󰕾", speaker: "󰕾",
speakerMuted: "󰖁" speakerMuted: "󰖁"
}) })

View File

@@ -0,0 +1,30 @@
// ColorOverlayShader.qml
import QtQuick 2.15
Rectangle {
id: mainContent
anchors.fill: parent
color: "blue"
// Clip the rectangle to a shape
clip: true
Shape {
anchors.fill: parent
// Custom Path defined as a vector
Path {
PathSvg {
path: "M10,80 C40,10 65,10 95,80 S150,150 180,80" // Vector path
}
}
ShapePath {
strokeColor: "transparent" // No stroke, act only as the mask
fillColor: "blue"
fillGradient: Gradient {
GradientStop { position: 0.0; color: "yellow" }
GradientStop { position: 1.0; color: "orange" }
}
}
}
}

View File

@@ -2,12 +2,16 @@ import Quickshell
import QtQml import QtQml
import QtQuick import QtQuick
Rectangle { Item {
id: a id: root
anchors { anchors {
top: parent.top top: parent.top
bottom: parent.bottom bottom: parent.bottom
} }
width: 2 Rectangle {
color: "#8d8d8d" anchors.centerIn: root
implicitHeight: root.height - 4
width: 1
color: "#8d8d8d"
}
} }