only show bat module when the device is a laptop

This commit is contained in:
lucy 2026-05-23 14:17:17 +02:00
commit 960d7c4598
3 changed files with 18 additions and 17 deletions

View file

@ -3,24 +3,24 @@ import QtQuick
QtObject { QtObject {
// --- The Backgrounds (Darkest to Lightest) --- // --- The Backgrounds (Darkest to Lightest) ---
readonly property color base00: "#1e1e2e" // Default Background readonly property color base00: "#262427" // Default Background
readonly property color base01: "#181825" // Lighter Background (Status bars, panels) readonly property color base01: "#3b393c" // Lighter Background (Status bars, panels)
readonly property color base02: "#313244" // Selection Background readonly property color base02: "#514f52" // Selection Background
readonly property color base03: "#45475a" // Comments, Invisibles, line highlighting readonly property color base03: "#676567" // Comments, Invisibles, line highlighting
// --- The Foregrounds (Darkest to Lightest) --- // --- The Foregrounds (Darkest to Lightest) ---
readonly property color base04: "#585b70" // Dark Foreground (Used for status bars) readonly property color base04: "#7c7b7d" // Dark Foreground (Used for status bars)
readonly property color base05: "#cdd6f4" // Default Foreground, Caret readonly property color base05: "#fcfcfc" // Default Foreground, Caret
readonly property color base06: "#f5e0dc" // Light Foreground (Rarely used) readonly property color base06: "#eae9eb" // Light Foreground (Rarely used)
readonly property color base07: "#b4befe" // Lightest Foreground readonly property color base07: "#fcfcfc" // Lightest Foreground
// --- The Accent Colors --- // --- The Accent Colors ---
readonly property color base08: "#f38ba8" // Red (Variables, errors) readonly property color base08: "#ff7272" // Red (Variables, errors)
readonly property color base09: "#fab387" // Orange (Integers, booleans, constants) readonly property color base09: "#fc9d6f" // Orange (Integers, booleans, constants)
readonly property color base0A: "#f9e2af" // Yellow (Classes, search text bg, warnings) readonly property color base0A: "#ffca58" // Yellow (Classes, search text bg, warnings)
readonly property color base0B: "#a6e3a1" // Green (Strings, success states) readonly property color base0B: "#bcdf59" // Green (Strings, success states)
readonly property color base0C: "#94e2d5" // Cyan (Support, regex, escape chars) readonly property color base0C: "#aee8f4" // Cyan (Support, regex, escape chars)
readonly property color base0D: "#89b4fa" // Blue (Functions, methods, headings) readonly property color base0D: "#49cae4" // Blue (Functions, methods, headings)
readonly property color base0E: "#cba6f7" // Purple/Mauve (Keywords, storage, selectors) readonly property color base0E: "#a093e2" // Purple/Mauve (Keywords, storage, selectors)
readonly property color base0F: "#f2cdcd" // Brown/Flamingo (Deprecated, embedded tags) readonly property color base0F: "#ff8787" // Brown/Flamingo (Deprecated, embedded tags)
} }

View file

@ -10,6 +10,7 @@ Rectangle {
id: root id: root
clip: true clip: true
color: Colors.base01 color: Colors.base01
visible: UPower.displayDevice.isLaptopBattery
property double percent: UPower.displayDevice.percentage * 100 property double percent: UPower.displayDevice.percentage * 100
property bool hasBattery: UPower.displayDevice.isLaptopBattery property bool hasBattery: UPower.displayDevice.isLaptopBattery
property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging

View file

@ -1,6 +1,6 @@
[General] [General]
barHeight=34 barHeight=34
font=Google Sans font=0xProto Nerd Font
fontSize=14 fontSize=14
opacity=1 opacity=1
roudning=16 roudning=16