diff --git a/modules/bar/Bat.qml b/modules/bar/Bat.qml index 0059503..eb56a07 100644 --- a/modules/bar/Bat.qml +++ b/modules/bar/Bat.qml @@ -1,4 +1,6 @@ import Quickshell.Services.UPower +import Quickshell +import Quickshell.Widgets import QtQuick import QtQuick.Layouts import QtQuick.Effects @@ -15,30 +17,33 @@ BarComponent { implicitHeight: Config.moduleHeight implicitWidth: batLayout.implicitWidth + 16 - function batteryIcon(percent) { - if (root.charging) - return "battery_android_frame_bolt"; - if (percent <= 15) - return "battery_android_alert"; - if (percent <= 30) - return "battery_android_frame_2"; - if (percent <= 50) - return "battery_android_frame_3"; - if (percent <= 70) - return "battery_android_frame_4"; - if (percent <= 85) - return "battery_android_frame_5"; - if (percent <= 100) - return "battery_android_frame_full"; + function batteryIcon(percent, charging) { + if(percent <= 10) return charging ? "battery-empty-charging" : "battery-empty" + if(percent <= 30) return charging ? "battery-level-30-charging" : "battery-level-30" + if(percent <= 40) return charging ? "battery-level-40-charging" : "battery-level-40" + if(percent <= 50) return charging ? "battery-level-50-charging" : "battery-level-50" + if(percent <= 60) return charging ? "battery-level-60-charging" : "battery-level-60" + if(percent <= 70) return charging ? "battery-level-70-charging" : "battery-level-70" + if(percent <= 80) return charging ? "battery-level-80-charging" : "battery-level-80" + if(percent <= 90) return charging ? "battery-level-90-charging" : "battery-level-90" + if(percent >= 90) return charging ? "battery-level-100-charging" : "battery-level-100" + } RowLayout { id: batLayout anchors.centerIn: root - MaterialIcon { - text: root.batteryIcon(root.percent) - } + IconImage { + source: Quickshell.iconPath(root.batteryIcon(root.percent, root.charging) + "-symbolic") + implicitSize: Config.iconSize + layer.enabled: true + layer.effect: MultiEffect { + colorization: 1.0 + colorizationColor: Colors.text + brightness: 0.5 + } + } StyledText { - text: Math.floor(root.percent) + "%" + text: Math.floor(root.percent,root.charging) + "%" } } } diff --git a/modules/bar/Mpris.qml b/modules/bar/Mpris.qml index f0c4eb4..0b05852 100644 --- a/modules/bar/Mpris.qml +++ b/modules/bar/Mpris.qml @@ -3,6 +3,8 @@ import Quickshell.Services.Mpris import QtQuick import QtQuick.Layouts import QtQuick.Effects +import Quickshell +import Quickshell.Widgets import qs import qs.widgets import qs.settings @@ -18,13 +20,21 @@ BarComponent { } return null; } - visible: spotify !== null && spotify.playbackState === MprisPlaybackState.Playing + visible: spotify !== null + active: clickHandler.containsMouse RowLayout { id: songLayout anchors.centerIn: root - MaterialIcon { - text: "music_note_2" - } + IconImage { + source: Quickshell.iconPath("folder-music-symbolic") + implicitSize: Config.iconSize + layer.enabled: true + layer.effect: MultiEffect { + colorization: 1.0 + colorizationColor: Colors.text + brightness: 0.5 + } + } StyledText { Layout.maximumWidth: 400 Layout.maximumHeight: Config.barHeight / 1.6 @@ -32,4 +42,12 @@ BarComponent { elide: Text.ElideRight } } + MouseArea { + id: clickHandler + anchors.fill: root + hoverEnabled: true + onClicked: root.spotify.togglePlaying() + acceptedButtons: Qt.LeftButton + cursorShape: Qt.PointingHandCursor + } } diff --git a/modules/bar/Pw.qml b/modules/bar/Pw.qml index 5a6b78d..57f1dad 100644 --- a/modules/bar/Pw.qml +++ b/modules/bar/Pw.qml @@ -1,6 +1,9 @@ +//@ pragma IconTheme Adwaita pragma ComponentBehavior: Bound import Quickshell.Services.Pipewire import Quickshell.Io +import Quickshell.Widgets +import Quickshell import QtQuick import QtQuick.Layouts import QtQuick.Effects @@ -18,17 +21,18 @@ BarComponent { function getVolumeIcon() { let volume = Pipewire.ready ? root.defaultAudio.audio.volume : null; if (root.mute) { - return "\ue04f"; + return "audio-volume-muted"; } if (volume <= 0.33) { - return "\ue04e"; + return "audio-volume-low"; } if (volume <= 0.66) { - return "\ue04d"; + return "audio-volume-medium"; } if (volume >= 0.66) { - return "\ue050"; + return "audio-volume-high"; } + } PwObjectTracker { @@ -45,10 +49,16 @@ BarComponent { id: pwLayout anchors.centerIn: root spacing: 4 - MaterialIcon { - text: root.getVolumeIcon() - opacity: root.defaultAudio?.audio.muted ? 0.6 : 1.0 - } + IconImage { + source: Quickshell.iconPath(root.getVolumeIcon() + "-symbolic", root.getVolumeIcon()) + implicitSize: 14 + layer.enabled: true + layer.effect: MultiEffect { + colorization: 1.0 + colorizationColor: Colors.text + brightness: 0.5 + } + } StyledText { text: Math.round(root.defaultAudio?.audio.volume * 100) + "%" opacity: root.defaultAudio?.audio.muted ? 0.6 : 1.0 diff --git a/modules/bar/Ws.qml b/modules/bar/Ws.qml index 29a9d32..489e1d7 100644 --- a/modules/bar/Ws.qml +++ b/modules/bar/Ws.qml @@ -16,6 +16,7 @@ BarComponent { Repeater { model: WindowManager.screenProjection(root.barScreen).windowsets delegate: Rectangle { + id: wsContainer required property var modelData visible: modelData.shouldDisplay StyledText { @@ -23,6 +24,13 @@ BarComponent { anchors.centerIn: parent text: parent.modelData.name color: parent.modelData.active ? Colors.base0D: Colors.base03 + MouseArea { + id: clickHandler + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + acceptedButtons: Qt.LeftButton + onClicked: parent.parent.modelData.activate() + } } } } diff --git a/modules/wallpaper/WallPicker.qml b/modules/wallpaper/WallPicker.qml index c84a449..daaf5cd 100644 --- a/modules/wallpaper/WallPicker.qml +++ b/modules/wallpaper/WallPicker.qml @@ -2,7 +2,6 @@ pragma ComponentBehavior: Bound import Quickshell import Quickshell.Wayland import Quickshell.Widgets -import Quickshell.Hyprland import QtQuick import Qt.labs.folderlistmodel 2.11 import QtQuick.Effects @@ -16,10 +15,16 @@ BarComponent { implicitWidth: Config.moduleHeight required property int screenHeight id: main - MaterialIcon { - anchors.centerIn: main - text: "\ue1bc" - font.bold: true + IconImage { + source: Quickshell.iconPath("preferences-desktop-wallpaper-symbolic") + implicitSize: Config.iconSize + anchors.centerIn: parent + layer.enabled: true + layer.effect: MultiEffect { + colorization: 1.0 + colorizationColor: Colors.text + brightness: 0.5 + } } MouseArea { id: clickHandler diff --git a/settings/settings.ini b/settings/settings.ini index 80980be..c5fa764 100644 --- a/settings/settings.ini +++ b/settings/settings.ini @@ -9,4 +9,4 @@ primaryMon=eDP-1 rounding=4 showCorners=true wallDir=file:///home/lucy/.walls -wallpaper=@Variant(\0\0\0\x11\0\0\0\x1b/home/lucy/.walls/asuka.png) +wallpaper=@Variant(\0\0\0\x11\0\0\0'/home/lucy/.walls/lance_of_longinus.png)