forked from Shinonome/dots-hyprland
init waffles
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<title>ic_fluent_speaker_0_24_regular</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="🔍-Product-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="ic_fluent_speaker_0_24_regular" fill="#212121" fill-rule="nonzero">
|
||||
<path d="M14.7041458,3.44083881 C14.8951735,3.66654944 15,3.95267225 15,4.24836951 L15,19.75 C15,20.4403559 14.4403559,21 13.75,21 C13.4542072,21 13.1679984,20.8951059 12.9422573,20.7039663 L7.97512872,16.4981973 L4.25,16.4981973 C3.00735931,16.4981973 2,15.490838 2,14.2481973 L2,9.74819733 C2,8.50555664 3.00735931,7.49819733 4.25,7.49819733 L7.97522325,7.49819733 L12.9424693,3.29422373 C13.4694295,2.84823684 14.2581589,2.91387865 14.7041458,3.44083881 Z M13.5,4.78747232 L8.52477675,8.99819733 L4.25,8.99819733 C3.83578644,8.99819733 3.5,9.33398377 3.5,9.74819733 L3.5,14.2481973 C3.5,14.6624109 3.83578644,14.9981973 4.25,14.9981973 L8.52487128,14.9981973 L13.5,19.2107402 L13.5,4.78747232 Z" id="🎨-Color">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<title>ic_fluent_speaker_1_24_regular</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="🔍-Product-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="ic_fluent_speaker_1_24_regular" fill="#212121" fill-rule="nonzero">
|
||||
<path d="M14.7041458,3.44249572 C14.8951735,3.66820635 15,3.95432916 15,4.25002642 L15,19.7516569 C15,20.4420128 14.4403559,21.0016569 13.75,21.0016569 C13.4542072,21.0016569 13.1679984,20.8967628 12.9422573,20.7056232 L7.97512872,16.4998542 L4.25,16.4998542 C3.00735931,16.4998542 2,15.4924949 2,14.2498542 L2,9.74985424 C2,8.50721355 3.00735931,7.49985424 4.25,7.49985424 L7.97522325,7.49985424 L12.9424693,3.29588063 C13.4694295,2.84989375 14.2581589,2.91553555 14.7041458,3.44249572 Z M13.5,4.78912923 L8.52477675,8.99985424 L4.25,8.99985424 C3.83578644,8.99985424 3.5,9.33564067 3.5,9.74985424 L3.5,14.2498542 C3.5,14.6640678 3.83578644,14.9998542 4.25,14.9998542 L8.52487128,14.9998542 L13.5,19.2123971 L13.5,4.78912923 Z M17.1035389,8.64021534 C17.4571007,8.42442159 17.9186545,8.53610465 18.1344483,8.88966643 C18.7082504,9.82979793 18.995732,10.8818435 18.995732,12.0303956 C18.995732,13.1789477 18.7082504,14.2309932 18.1344483,15.1711247 C17.9186545,15.5246865 17.4571007,15.6363696 17.1035389,15.4205758 C16.7499771,15.2047821 16.6382941,14.7432282 16.8540878,14.3896664 C17.2822376,13.6881753 17.495732,12.9068876 17.495732,12.0303956 C17.495732,11.1539036 17.2822376,10.3726158 16.8540878,9.67112473 C16.6382941,9.31756295 16.7499771,8.85600909 17.1035389,8.64021534 Z" id="🎨-Color">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.5 4.81425C16.5 3.71986 15.1932 3.15384 14.395 3.90244L9.45826 8.53182C9.13388 8.836 8.70587 9.00529 8.26119 9.00529H5.25C3.45508 9.00529 2 10.4604 2 12.2553V15.7473C2 17.5422 3.45507 18.9973 5.25 18.9973H8.26174C8.70619 18.9973 9.134 19.1664 9.45832 19.4703L14.3953 24.0964C15.1937 24.8446 16.5 24.2785 16.5 23.1843V4.81425ZM10.4843 9.62599L15 5.39141V22.6074L10.484 18.3757C9.88165 17.8114 9.08715 17.4973 8.26174 17.4973H5.25C4.2835 17.4973 3.5 16.7138 3.5 15.7473V12.2553C3.5 11.2888 4.2835 10.5053 5.25 10.5053H8.26119C9.08703 10.5053 9.8819 10.1909 10.4843 9.62599Z" fill="#212121"/>
|
||||
<path d="M22.7021 5.25221C22.4285 4.9412 21.9546 4.91085 21.6436 5.18443C21.3326 5.45801 21.3022 5.93192 21.5758 6.24293C23.3966 8.31284 24.5 11.0266 24.5 14C24.5 16.9733 23.3966 19.6871 21.5758 21.757C21.3022 22.068 21.3326 22.5419 21.6436 22.8155C21.9546 23.0891 22.4285 23.0587 22.7021 22.7477C24.7545 20.4145 26 17.3518 26 14C26 10.6482 24.7545 7.58543 22.7021 5.25221Z" fill="#212121"/>
|
||||
<path d="M20.3528 8.30286C20.1042 7.97156 19.6341 7.90454 19.3028 8.15316C18.9715 8.40178 18.9045 8.8719 19.1531 9.2032C20.1561 10.5397 20.75 12.1994 20.75 14C20.75 15.8006 20.1561 17.4602 19.1531 18.7968C18.9045 19.1281 18.9715 19.5982 19.3028 19.8468C19.6341 20.0954 20.1042 20.0284 20.3528 19.6971C21.544 18.1098 22.25 16.1363 22.25 14C22.25 11.8637 21.544 9.89012 20.3528 8.30286Z" fill="#212121"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -80,6 +80,7 @@ Singleton {
|
||||
property list<string> enabledPanels: [
|
||||
"iiBar", "iiBackground", "iiCheatsheet", "iiDock", "iiLock", "iiMediaControls", "iiNotificationPopup", "iiOnScreenDisplay", "iiOnScreenKeyboard", "iiOverlay", "iiOverview", "iiPolkit", "iiRegionSelector", "iiReloadPopup", "iiScreenCorners", "iiSessionScreen", "iiSidebarLeft", "iiSidebarRight", "iiVerticalBar", "iiWallpaperSelector"
|
||||
]
|
||||
property string panelFamily: "ii" // "ii", "w"
|
||||
|
||||
property JsonObject policies: JsonObject {
|
||||
property int ai: 1 // 0: No | 1: Yes | 2: Local
|
||||
@@ -521,6 +522,7 @@ Singleton {
|
||||
// https://doc.qt.io/qt-6/qtime.html#toString
|
||||
property string format: "hh:mm"
|
||||
property string shortDateFormat: "dd/MM"
|
||||
property string dateWithYearFormat: "dd/MM/yyyy"
|
||||
property string dateFormat: "ddd, dd/MM"
|
||||
property JsonObject pomodoro: JsonObject {
|
||||
property int breakTime: 300
|
||||
@@ -555,6 +557,12 @@ Singleton {
|
||||
property list<string> linkKeywords: ["hentai", "porn", "sukebei", "hitomi.la", "rule34", "gelbooru", "fanbox", "dlsite"]
|
||||
}
|
||||
}
|
||||
|
||||
property JsonObject waffles: JsonObject {
|
||||
property JsonObject bar: JsonObject {
|
||||
property bool bottom: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ AbstractBackgroundWidget {
|
||||
}
|
||||
ClockText {
|
||||
Layout.topMargin: -5
|
||||
text: DateTime.date
|
||||
text: DateTime.longDate
|
||||
}
|
||||
StyledText {
|
||||
// Somehow gets fucked up if made a ClockText???
|
||||
|
||||
@@ -14,12 +14,14 @@ Scope {
|
||||
|
||||
Variants {
|
||||
// For each monitor
|
||||
model: {
|
||||
const screens = Quickshell.screens;
|
||||
const list = Config.options.bar.screenList;
|
||||
if (!list || list.length === 0)
|
||||
return screens;
|
||||
return screens.filter(screen => list.includes(screen.name));
|
||||
model: ScriptModel {
|
||||
values: {
|
||||
const screens = Quickshell.screens;
|
||||
const list = Config.options.bar.screenList;
|
||||
if (!list || list.length === 0)
|
||||
return screens;
|
||||
return screens.filter(screen => list.includes(screen.name));
|
||||
}
|
||||
}
|
||||
LazyLoader {
|
||||
id: barLoader
|
||||
@@ -29,10 +31,6 @@ Scope {
|
||||
id: barRoot
|
||||
screen: barLoader.modelData
|
||||
|
||||
property var brightnessMonitor: Brightness.getMonitorForScreen(barLoader.modelData)
|
||||
property real useShortenedForm: (Appearance.sizes.barHellaShortenScreenWidthThreshold >= screen.width) ? 2 : (Appearance.sizes.barShortenScreenWidthThreshold >= screen.width) ? 1 : 0
|
||||
readonly property int centerSideModuleWidth: (useShortenedForm == 2) ? Appearance.sizes.barCenterSideModuleWidthHellaShortened : (useShortenedForm == 1) ? Appearance.sizes.barCenterSideModuleWidthShortened : Appearance.sizes.barCenterSideModuleWidth
|
||||
|
||||
Timer {
|
||||
id: showBarTimer
|
||||
interval: (Config?.options.bar.autoHide.showWhenPressingSuper.delay ?? 100)
|
||||
|
||||
@@ -33,7 +33,7 @@ Item {
|
||||
visible: root.showDate
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
color: Appearance.colors.colOnLayer1
|
||||
text: DateTime.date
|
||||
text: DateTime.longDate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@ import qs.modules.common
|
||||
Rectangle {
|
||||
id: contentItem
|
||||
anchors.fill: parent
|
||||
color: Appearance.m3colors.m3surfaceContainer
|
||||
color: Appearance.colors.colSurfaceContainer
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Button {
|
||||
id: root
|
||||
|
||||
Layout.fillHeight: true
|
||||
topInset: 4
|
||||
bottomInset: 4
|
||||
|
||||
property color borderColor: ColorUtils.transparentize(Looks.colors.bg1Border, (root.hovered && !root.down) ? Looks.fluentContentTransparency : 1)
|
||||
Behavior on borderColor {
|
||||
animation: Looks.transition.color.createObject(this)
|
||||
}
|
||||
onBorderColorChanged: {
|
||||
borderCanvas.requestPaint();
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: background
|
||||
color: {
|
||||
if (root.down) {
|
||||
return Looks.colors.bg1Active
|
||||
} else if (root.hovered) {
|
||||
return Looks.colors.bg1Hover
|
||||
} else {
|
||||
return ColorUtils.transparentize(Looks.colors.bg1)
|
||||
}
|
||||
}
|
||||
radius: Looks.radius.medium
|
||||
Behavior on color {
|
||||
animation: Looks.transition.color.createObject(this)
|
||||
}
|
||||
|
||||
// Top 1px border with color
|
||||
Canvas {
|
||||
id: borderCanvas
|
||||
anchors.fill: parent
|
||||
onPaint: {
|
||||
var ctx = getContext("2d");
|
||||
ctx.clearRect(0, 0, width, height);
|
||||
|
||||
var borderColor = root.borderColor;
|
||||
|
||||
var r = background.radius;
|
||||
var fadeLength = Math.max(1, r);
|
||||
var fadeLengthPercent = fadeLength / width;
|
||||
|
||||
// Compute normalized stops
|
||||
var leftFadeStop = fadeLengthPercent;
|
||||
var rightFadeStop = 1 - fadeLengthPercent;
|
||||
|
||||
var grad = ctx.createLinearGradient(0, 0, width, 0);
|
||||
grad.addColorStop(0, Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0));
|
||||
grad.addColorStop(leftFadeStop, borderColor);
|
||||
grad.addColorStop(rightFadeStop, borderColor);
|
||||
grad.addColorStop(1, Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0));
|
||||
|
||||
ctx.strokeStyle = grad;
|
||||
ctx.lineWidth = 1;
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(r, 0.5);
|
||||
ctx.lineTo(width - r, 0.5);
|
||||
// Top-right curve
|
||||
ctx.arcTo(width, 0.5, width, r + 0.5, r);
|
||||
// Top-left curve
|
||||
ctx.moveTo(width - r, 0.5);
|
||||
ctx.arcTo(0, 0.5, 0, r + 0.5, r);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
BarButton {
|
||||
id: root
|
||||
|
||||
// padding: 12
|
||||
|
||||
contentItem: Item {
|
||||
anchors.centerIn: root.background
|
||||
implicitHeight: column.implicitHeight
|
||||
implicitWidth: column.implicitWidth
|
||||
Row {
|
||||
id: column
|
||||
anchors.centerIn: parent
|
||||
|
||||
FluentIcon {
|
||||
icon: "speaker" // System icon
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
BarButton {
|
||||
id: root
|
||||
|
||||
rightInset: 12 // For now this is the rightmost button. Desktop peek is useless. (for now)
|
||||
padding: 12
|
||||
|
||||
contentItem: Item {
|
||||
anchors.centerIn: root.background
|
||||
implicitHeight: column.implicitHeight
|
||||
implicitWidth: column.implicitWidth
|
||||
Column {
|
||||
id: column
|
||||
anchors.centerIn: parent
|
||||
WText {
|
||||
anchors.right: parent.right
|
||||
text: DateTime.time
|
||||
}
|
||||
WText {
|
||||
anchors.right: parent.right
|
||||
text: DateTime.date
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
|
||||
Scope {
|
||||
id: bar
|
||||
property bool showBarBackground: Config.options.bar.showBackground
|
||||
|
||||
LazyLoader {
|
||||
id: barLoader
|
||||
active: GlobalStates.barOpen && !GlobalStates.screenLocked
|
||||
component: Variants {
|
||||
model: Quickshell.screens
|
||||
delegate: PanelWindow { // Bar window
|
||||
id: barRoot
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
exclusiveZone: implicitHeight
|
||||
WlrLayershell.namespace: "quickshell:wbar"
|
||||
|
||||
anchors {
|
||||
left: true
|
||||
right: true
|
||||
bottom: Config.options.waffles.bar.bottom
|
||||
top: !Config.options.waffles.bar.bottom
|
||||
}
|
||||
|
||||
color: "transparent"
|
||||
implicitHeight: content.implicitHeight
|
||||
implicitWidth: content.implicitWidth
|
||||
|
||||
WaffleBarContent {
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "bar"
|
||||
|
||||
function toggle(): void {
|
||||
GlobalStates.barOpen = !GlobalStates.barOpen
|
||||
}
|
||||
|
||||
function close(): void {
|
||||
GlobalStates.barOpen = false
|
||||
}
|
||||
|
||||
function open(): void {
|
||||
GlobalStates.barOpen = true
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "barToggle"
|
||||
description: "Toggles bar on press"
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.barOpen = !GlobalStates.barOpen;
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "barOpen"
|
||||
description: "Opens bar on press"
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.barOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "barClose"
|
||||
description: "Closes bar on press"
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.barOpen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
color: Looks.colors.bg0
|
||||
implicitHeight: 48
|
||||
|
||||
Rectangle {
|
||||
id: border
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: Config.options.waffles.bar.bottom ? parent.top : undefined
|
||||
bottom: Config.options.waffles.bar.bottom ? undefined : parent.bottom
|
||||
}
|
||||
color: Looks.colors.bg0Border
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: bloatRow
|
||||
anchors.left: parent.left
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: appsRow
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: systemRow
|
||||
anchors.right: parent.right
|
||||
SystemButton {}
|
||||
TimeButton {}
|
||||
}
|
||||
|
||||
component BarGroupRow: RowLayout {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
spacing: 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import QtQuick
|
||||
import org.kde.kirigami as Kirigami
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Kirigami.Icon {
|
||||
id: root
|
||||
required property string icon
|
||||
property int implicitSize: 18 // Should be 16, but it appears the icons have some padding
|
||||
implicitWidth: implicitSize
|
||||
implicitHeight: implicitSize
|
||||
|
||||
roundToIconSize: false
|
||||
color: Looks.colors.fg
|
||||
isMask: true
|
||||
source: `${Looks.iconsPath}/${root.icon}.svg`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property QtObject colors
|
||||
property QtObject radius
|
||||
property QtObject font
|
||||
property QtObject transition
|
||||
property string iconsPath: `${Directories.assetsPath}/icons/fluent`
|
||||
|
||||
property real fluentBackgroundTransparency: 0.17
|
||||
property real fluentContentTransparency: 0.3
|
||||
colors: QtObject {
|
||||
id: colors
|
||||
property color bg0: "#1C1C1C"
|
||||
property color bg0Border: "#404040"
|
||||
property color bg1: "#2E2E2E"
|
||||
property color bg1Hover: "#292929"
|
||||
property color bg1Active: "#252525"
|
||||
property color bg1Border: "#333333"
|
||||
property color fg: "#FFFFFF"
|
||||
property color brand: Appearance.m3colors.m3primary
|
||||
}
|
||||
|
||||
radius: QtObject {
|
||||
id: radius
|
||||
property int none: 0
|
||||
property int small: 2
|
||||
property int medium: 4
|
||||
property int large: 8
|
||||
property int xLarge: 12
|
||||
}
|
||||
|
||||
font: QtObject {
|
||||
id: font
|
||||
property QtObject family: QtObject {
|
||||
property string ui: "Noto Sans"
|
||||
}
|
||||
property QtObject weight: QtObject {
|
||||
property int regular: Font.Normal
|
||||
property int strong: Font.DemiBold
|
||||
property int stronger: Font.Bold
|
||||
}
|
||||
property QtObject variableAxes: QtObject {
|
||||
|
||||
}
|
||||
property QtObject pixelSize: QtObject {
|
||||
property int small: 10
|
||||
property int normal: 11
|
||||
}
|
||||
}
|
||||
|
||||
transition: QtObject {
|
||||
id: transition
|
||||
property QtObject easing: QtObject {
|
||||
property QtObject bezierCurve: QtObject {
|
||||
readonly property list<real> easeInOut: [0.42,0.00,0.58,1.00]
|
||||
readonly property list<real> easeIn: [0,1,1,1]
|
||||
readonly property list<real> easeOut: [1,0,1,1]
|
||||
}
|
||||
}
|
||||
|
||||
property Component color: Component {
|
||||
ColorAnimation {
|
||||
duration: 80
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: transition.easing.bezierCurve.easeInOut
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import QtQuick
|
||||
|
||||
Text {
|
||||
id: root
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: Looks.colors.fg
|
||||
|
||||
font {
|
||||
family: Looks.font.family.ui
|
||||
pixelSize: Looks.font.pixelSize.normal
|
||||
weight: Looks.font.weight.regular
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,8 @@ Singleton {
|
||||
}
|
||||
property string time: Qt.locale().toString(clock.date, Config.options?.time.format ?? "hh:mm")
|
||||
property string shortDate: Qt.locale().toString(clock.date, Config.options?.time.shortDateFormat ?? "dd/MM")
|
||||
property string date: Qt.locale().toString(clock.date, Config.options?.time.dateFormat ?? "dddd, dd/MM")
|
||||
property string date: Qt.locale().toString(clock.date, Config.options?.time.dateWithYearFormat ?? "dd/MM/yyyy")
|
||||
property string longDate: Qt.locale().toString(clock.date, Config.options?.time.dateFormat ?? "dddd, dd/MM")
|
||||
property string collapsedCalendarFormat: Qt.locale().toString(clock.date, "dd MMMM yyyy")
|
||||
property string uptime: "0h, 0m"
|
||||
|
||||
|
||||
@@ -28,12 +28,18 @@ import qs.modules.ii.overlay
|
||||
import qs.modules.ii.verticalBar
|
||||
import qs.modules.ii.wallpaperSelector
|
||||
|
||||
import qs.modules.waffle.bar
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
import qs.services
|
||||
|
||||
ShellRoot {
|
||||
id: root
|
||||
|
||||
// Force initialization of some singletons
|
||||
Component.onCompleted: {
|
||||
MaterialThemeLoader.reapplyTheme()
|
||||
@@ -67,11 +73,40 @@ ShellRoot {
|
||||
PanelLoader { identifier: "iiSidebarRight"; component: SidebarRight {} }
|
||||
PanelLoader { identifier: "iiVerticalBar"; extraCondition: Config.options.bar.vertical; component: VerticalBar {} }
|
||||
PanelLoader { identifier: "iiWallpaperSelector"; component: WallpaperSelector {} }
|
||||
PanelLoader { identifier: "wBar"; component: WaffleBar {} }
|
||||
|
||||
component PanelLoader: LazyLoader {
|
||||
required property string identifier
|
||||
property bool extraCondition: true
|
||||
active: Config.ready && Config.options.enabledPanels.includes(identifier) && extraCondition
|
||||
}
|
||||
|
||||
// Panel families
|
||||
property list<string> families: ["ii", "waffle"]
|
||||
property var panelFamilies: ({
|
||||
"ii": ["iiBar", "iiBackground", "iiCheatsheet", "iiDock", "iiLock", "iiMediaControls", "iiNotificationPopup", "iiOnScreenDisplay", "iiOnScreenKeyboard", "iiOverlay", "iiOverview", "iiPolkit", "iiRegionSelector", "iiReloadPopup", "iiScreenCorners", "iiSessionScreen", "iiSidebarLeft", "iiSidebarRight", "iiVerticalBar", "iiWallpaperSelector"],
|
||||
"waffle": ["wBar", "iiBackground", "iiCheatsheet", "iiDock", "iiLock", "iiMediaControls", "iiNotificationPopup", "iiOnScreenDisplay", "iiOnScreenKeyboard", "iiOverlay", "iiOverview", "iiPolkit", "iiRegionSelector", "iiReloadPopup", "iiScreenCorners", "iiSessionScreen", "iiSidebarLeft", "iiSidebarRight", "iiWallpaperSelector"],
|
||||
})
|
||||
function cyclePanelFamily() {
|
||||
const currentIndex = families.indexOf(Config.options.panelFamily)
|
||||
const nextIndex = (currentIndex + 1) % families.length
|
||||
Config.options.panelFamily = families[nextIndex]
|
||||
Config.options.enabledPanels = panelFamilies[Config.options.panelFamily]
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "panelFamily"
|
||||
|
||||
function cycle(): void {
|
||||
root.cyclePanelFamily()
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "panelFamilyCycle"
|
||||
description: "Cycles panel family"
|
||||
|
||||
onPressed: root.cyclePanelFamily()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user