diff --git a/config/modules/power-management/common.nix b/config/modules/power-management/common.nix index 419f07b..7dd7fa6 100644 --- a/config/modules/power-management/common.nix +++ b/config/modules/power-management/common.nix @@ -10,6 +10,9 @@ modules.lavd # modules.ppd ]; + nixos = { + services.upower.enable = true; + }; }; }; } diff --git a/config/modules/power-management/lavd.nix b/config/modules/power-management/lavd.nix index 91fde86..a78726a 100644 --- a/config/modules/power-management/lavd.nix +++ b/config/modules/power-management/lavd.nix @@ -14,7 +14,7 @@ # Most energy efficent scheduler setup.. systemd.services.scx.environment = { SCX_SCHEDULER_OVERRIDE = "scx_lavd"; - SCX_FLAGS_OVERRIDE = "--powersave --enable-cpu-bw"; + SCX_FLAGS_OVERRIDE = "--powersave --enable-cpu-bw --cpu-pref-order '20-21,12-19,0-11'"; }; }; }; diff --git a/config/modules/quickshell/quickshell/Bar.qml b/config/modules/quickshell/quickshell/Bar.qml index b8e6e52..e2cdde0 100644 --- a/config/modules/quickshell/quickshell/Bar.qml +++ b/config/modules/quickshell/quickshell/Bar.qml @@ -48,17 +48,21 @@ Scope { // Right Layout.alignment: Qt.AlignRight Layout.preferredHeight: 20 + // spacing: 100 + spacing: 10 + BatteryWidget {} Rectangle { - width: clockText.width - height: clockText.height + implicitWidth: clockText.width + implicitHeight: clockText.height radius: 3.5 color: Colors.backgroundAlt - anchors.centerIn: parent + Layout.alignment: Qt.AlignCenter Text { id: clockText color: Colors.textPrimary + font: "CaskaydiaCove NFM" text: Clock.time } } diff --git a/config/modules/quickshell/quickshell/BatteryWidget.qml b/config/modules/quickshell/quickshell/BatteryWidget.qml new file mode 100644 index 0000000..6548859 --- /dev/null +++ b/config/modules/quickshell/quickshell/BatteryWidget.qml @@ -0,0 +1,31 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Services.UPower + +Item { + id: root + // enabled: uPowerExists + width: content.width + height: content.height + Layout.alignment: Qt.AlignCenter + RowLayout { + id: content + height: 20 + anchors.centerIn: root + Rectangle { + height: text.height + width: text.width + color: Colors.backgroundAlt + Layout.alignment: Qt.AlignCenter + Text { + property int power: UPower.displayDevice.percentage * 100 + + id: text + anchors.centerIn: parent + text: power + color: Colors.textPrimary + } + } + } +}