all repos — quickshell @ 03f6a101be8835bc23817106d266a32a46413aef

A desert-witch desktop shell

changed battery display to work with device types
trickyni trickyniv56@gmail.com
Wed, 10 Sep 2025 08:13:17 +0300
commit

03f6a101be8835bc23817106d266a32a46413aef

parent

7a0555aa092ea22b8594622ac5103168be0729b3

3 files changed, 63 insertions(+), 38 deletions(-)

jump to
M Icons.qmlIcons.qml

@@ -8,51 +8,59 @@

Singleton { id: root property var modules: { - "sunset": "󰖚", - "ram": "󰍛", + "sunset": "󰖚", + "ram": "󰍛", "tasklist": "", } property var workspaces: { "volume_mixer": "", - "download": "", - "writing": "" + "download": "", + "writing": "" } property var volume: { "mute": "", - "off": "", - "low": "", + "off": "", + "low": "", "high": "", } property var network: { - "no_bar": "󰣾", - "one_bar": "󰣴", - "two_bar": "󰣶", - "three_bar": "󰣸", - "full_bar": "󰣺", - "crossed_full": "󰣼", - "crossed_empty":"󰣽", - "one_bar_alert": "󰣵", - "two_bar_alert": "󰣹", - "three_bar_alert": "󰣹", - "full_bar_alert": "󰣻", + "no_bar": "󰣾", + "one_bar": "󰣴", + "two_bar": "󰣶", + "three_bar": "󰣸", + "full_bar": "󰣺", + "crossed_full": "󰣼", + "crossed_empty": "󰣽", + "one_bar_alert": "󰣵", + "two_bar_alert": "󰣹", + "three_bar_alert": "󰣹", + "full_bar_alert": "󰣻", } property var devices: { - "battery": "", - "headphones": "", - "controller": "󰮂", - "mewi": "", + "battery": "", + "headphones": "", + "controller": "󰮂", + "earbuds": "󱡏", + "gaming input": "󰮂", + "keyboard": "", + "mouse": "󰍽", + "unknown": "󰂑", + "speakers": "󰓃", + "printer": "󰐪", + "camera": "", + "phone": "", } property var battery: { - "10": "󰁺", - "20": "󰁻", - "30": "󰁼", - "40": "󰁽", - "50": "󰁾", - "60": "󰁿", - "70": "󰂀", - "80": "󰂁", - "90": "󰂂", - "100": "󰁹", + "10": "󰁺", + "20": "󰁻", + "30": "󰁼", + "40": "󰁽", + "50": "󰁾", + "60": "󰁿", + "70": "󰂀", + "80": "󰂁", + "90": "󰂂", + "100": "󰁹", } }
M README.mdREADME.md

@@ -6,9 +6,12 @@ - ...And maybe more

## TODO Additions: + - Battery + - Device blacklist - Network - resize indicator - zen mode + Animations: - workspaces

@@ -18,6 +21,7 @@

UI: - Sunset - disappears at night + - port to phosphot icons? Expansion: - notifications
M bar/modules/Battery.qmlbar/modules/Battery.qml

@@ -9,10 +9,10 @@

Repeater { model: UPower.devices.values.filter(d=>d.model) - Class.RightRowLayout { property var lvl: Math.round(modelData.percentage*100) property var charge_state: UPowerDeviceState.toString(modelData.state) + property var device_type: UPowerDeviceType.toString(modelData.type) Class.BottombarText { id: battery_level_indicator text: lvl+"%"

@@ -29,13 +29,26 @@ id: battery_device_icon

text: modelData.isLaptopBattery ? Icons.devices.battery : { - "Jupiter of the Monkey": Icons.devices.headphones, - "Pro Controller": Icons.devices.controller, - "mix4": Icons.devices.mewi, - }[modelData.model] ?? modelData.model - font.pixelSize: (modelData.model == "Pro Controller") ? 14 : 10 + "Headphones": Icons.devices.headphones, + "Headset": Icons.devices.headphones, + "Gaming Input": Icons.devices.controller, + "Keyboard": Icons.devices.keyboard, + "Mouse": Icons.devices.mouse, + "Unknown": Icons.devices.unknown, + "Speakers": Icons.devices.speaker, + "Printer": Icons.devices.printer, + "Camera": Icons.devices.camera, + "Phone": Icons.devices.phone, + }[device_type] + ?? modelData.model + font.pixelSize: + (device_type == "Gaming Input") + ? 14 + : 10 color: - lvl < 20 + modelData.model == "Jupiter of the Monkey" + ? "#897bc7" + : lvl < 20 ? Resources.palette.scarlet : { "Charging": Resources.palette.saffron,