add battery for laptops
This commit is contained in:
parent
9505748b32
commit
d043f86269
3 changed files with 74 additions and 0 deletions
12
services/PowerService.qml
Normal file
12
services/PowerService.qml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property bool onBattery: UPower.onBattery
|
||||
property UPowerDevice laptopBattery: UPower.devices.values.find(device => device.isLaptopBattery)
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue