Files
Aurora/config/aurora/modules/PowerMode.qml
2026-03-29 13:16:40 -05:00

47 lines
1.5 KiB
QML

import Quickshell // for PanelWindow
import QtQuick // for Text
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell.Io
import Quickshell.Widgets
import Quickshell.Hyprland
import Quickshell.Services.UPower
ColumnLayout {
spacing: 0
Button {
Layout.topMargin: 5
x: (parent.width - width) / 2
implicitWidth: parent.width - 10
implicitHeight: parent.height / 5 - parent.spacing
text: 'performance'
onClicked: PowerProfiles.profile = PowerProfile.Performance
visible: PowerProfiles.hasPerformanceProfile
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Performance ? Pywal.colors.color13 : Pywal.colors.color4 }
}
Button {
Layout.topMargin: 5
x: (parent.width - width) / 2
implicitWidth: parent.width - 10
implicitHeight: parent.height / 5 - parent.spacing
text: 'balanced'
onClicked: PowerProfiles.profile = PowerProfile.Balanced
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Balanced ? Pywal.colors.color13 : Pywal.colors.color4 }
}
Button {
Layout.topMargin: 5
x: (parent.width - width) / 2
implicitWidth: parent.width - 10
implicitHeight: parent.height / 5 - parent.spacing
text: 'power saver'
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
background: Rectangle { color: PowerProfiles.profile == PowerProfile.PowerSaver ? Pywal.colors.color13 : Pywal.colors.color4 }
}
}