diff --git a/dots/.config/quickshell/ii/assets/icons/fluent/battery-0.svg b/dots/.config/quickshell/ii/assets/icons/fluent/battery-0.svg new file mode 100644 index 000000000..7fe9d7a3d --- /dev/null +++ b/dots/.config/quickshell/ii/assets/icons/fluent/battery-0.svg @@ -0,0 +1,12 @@ + + + + ic_fluent_battery_0_24_regular + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/dots/.config/quickshell/ii/assets/icons/fluent/battery-6.svg b/dots/.config/quickshell/ii/assets/icons/fluent/battery-6.svg new file mode 100644 index 000000000..145d9a7de --- /dev/null +++ b/dots/.config/quickshell/ii/assets/icons/fluent/battery-6.svg @@ -0,0 +1,12 @@ + + + + ic_fluent_battery_6_24_regular + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/dots/.config/quickshell/ii/assets/icons/fluent/system-search-dark.svg b/dots/.config/quickshell/ii/assets/icons/fluent/system-search-dark.svg new file mode 100644 index 000000000..2d972a7b4 --- /dev/null +++ b/dots/.config/quickshell/ii/assets/icons/fluent/system-search-dark.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + diff --git a/dots/.config/quickshell/ii/assets/icons/fluent/system-search-light.svg b/dots/.config/quickshell/ii/assets/icons/fluent/system-search-light.svg new file mode 100644 index 000000000..b22f9c0ca --- /dev/null +++ b/dots/.config/quickshell/ii/assets/icons/fluent/system-search-light.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index ffc67805a..2ac21aa40 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -561,6 +561,7 @@ Singleton { property JsonObject waffles: JsonObject { property JsonObject bar: JsonObject { property bool bottom: true + property bool leftAlignApps: true } } } diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/AppButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/AppButton.qml new file mode 100644 index 000000000..808a8ba0a --- /dev/null +++ b/dots/.config/quickshell/ii/modules/waffle/bar/AppButton.qml @@ -0,0 +1,40 @@ +import QtQuick +import QtQuick.Layouts +import org.kde.kirigami as Kirigami +import qs.services +import qs.modules.common +import qs.modules.waffle.looks + +BarButton { + id: root + + required property string iconName + implicitWidth: height - topInset - bottomInset + leftInset + rightInset + + contentItem: Item { + id: contentItem + anchors.centerIn: root.background + + implicitHeight: iconWidget.implicitHeight + implicitWidth: iconWidget.implicitWidth + + scale: root.down ? 5/6 : 1 // If/When we do dragging, the scale is 1.25 + Behavior on scale { + NumberAnimation { + duration: 90 + easing.type: Easing.BezierSpline + easing.bezierCurve: root.down ? Looks.transition.easing.bezierCurve.easeIn : Looks.transition.easing.bezierCurve.easeOut + } + } + + Kirigami.Icon { + id: iconWidget + anchors.centerIn: parent + implicitWidth: 26 + implicitHeight: 26 + roundToIconSize: false + source: `${Looks.iconsPath}/${root.iconName}-${Looks.dark ? "dark" : "light"}.svg` + fallback: root.iconName + } + } +} diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/SearchButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/SearchButton.qml new file mode 100644 index 000000000..3bfd3a781 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/waffle/bar/SearchButton.qml @@ -0,0 +1,12 @@ +import QtQuick +import QtQuick.Layouts +import org.kde.kirigami as Kirigami +import qs.services +import qs.modules.common +import qs.modules.waffle.looks + +AppButton { + id: root + + iconName: "system-search" +} diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/StartButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/StartButton.qml new file mode 100644 index 000000000..e3aea59d2 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/waffle/bar/StartButton.qml @@ -0,0 +1,13 @@ +import QtQuick +import QtQuick.Layouts +import org.kde.kirigami as Kirigami +import qs.services +import qs.modules.common +import qs.modules.waffle.looks + +AppButton { + id: root + + leftInset: 12 + iconName: "start-here" +} diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/SystemButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/SystemButton.qml index dcb56c30b..e1bb83684 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/SystemButton.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/SystemButton.qml @@ -34,10 +34,7 @@ BarButton { } FluentIcon { - icon: { - print(WIcons.batteryIcon) - return WIcons.batteryIcon - } + icon: WIcons.batteryIcon } } } diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBarContent.qml b/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBarContent.qml index a2119ddde..f4881adf0 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBarContent.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBarContent.qml @@ -21,14 +21,28 @@ Rectangle { implicitHeight: 1 } - BarGroupRow { - id: bloatRow - anchors.left: parent.left - } - BarGroupRow { id: appsRow + spacing: 4 + anchors.left: undefined anchors.horizontalCenter: parent.horizontalCenter + + states: State { + name: "left" + when: Config.options.waffles.bar.leftAlignApps + AnchorChanges { + target: appsRow + anchors.left: parent.left + anchors.horizontalCenter: undefined + } + } + + transitions: Transition { + animations: Looks.transition.anchor.createObject(this) + } + + StartButton {} + SearchButton {} } BarGroupRow { diff --git a/dots/.config/quickshell/ii/modules/waffle/looks/FluentIcon.qml b/dots/.config/quickshell/ii/modules/waffle/looks/FluentIcon.qml index 229df0458..81b6ebf08 100644 --- a/dots/.config/quickshell/ii/modules/waffle/looks/FluentIcon.qml +++ b/dots/.config/quickshell/ii/modules/waffle/looks/FluentIcon.qml @@ -13,6 +13,7 @@ Kirigami.Icon { implicitHeight: implicitSize source: `${Looks.iconsPath}/${root.icon}.svg` + fallback: root.icon roundToIconSize: false color: Looks.colors.fg isMask: true diff --git a/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml b/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml index 9020b9d85..95693a05d 100644 --- a/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml +++ b/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml @@ -13,6 +13,7 @@ Singleton { property QtObject font property QtObject transition property string iconsPath: `${Directories.assetsPath}/icons/fluent` + property bool dark: Appearance.m3colors.darkmode property real fluentBackgroundTransparency: 0.17 property real fluentContentTransparency: 0.3 @@ -66,6 +67,38 @@ Singleton { ColorAnimation { duration: 80 easing.type: Easing.BezierSpline + easing.bezierCurve: transition.easing.bezierCurve.easeIn + } + } + + property Component enter: Component { + NumberAnimation { + duration: 250 + easing.type: Easing.BezierSpline + easing.bezierCurve: transition.easing.bezierCurve.easeIn + } + } + + property Component exit: Component { + NumberAnimation { + duration: 250 + easing.type: Easing.BezierSpline + easing.bezierCurve: transition.easing.bezierCurve.easeOut + } + } + + property Component move: Component { + NumberAnimation { + duration: 100 + easing.type: Easing.BezierSpline + easing.bezierCurve: transition.easing.bezierCurve.easeInOut + } + } + + property Component anchor: Component { + AnchorAnimation { + duration: 250 + easing.type: Easing.BezierSpline easing.bezierCurve: transition.easing.bezierCurve.easeInOut } }