all repos — quickshell @ 06c34b8d9c2dcb5b19a7a08cc4ea7c5623b9fc66

A desert-witch desktop shell

bar/modules/Battery.qml (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
//HeadphonesBattery.qml
import QtQuick
import Quickshell
import QtQuick.Layouts
import Quickshell.Services.UPower
import "../.."
import "../classes" as Class


Repeater {
  model: UPower.devices.values
  Class.RightRowLayout {
    Class.BottombarText {
      text: modelData.percentage*100+"%"
    }
    Class.BottombarIcon {
      text: (({
        "Jupiter of the Monkey": Icons.modules.headphones,
        "mix4": Icons.modules.mewi,
      })[modelData.model] ?? modelData.model)+" "
    }
    Class.BotSep{}
  }
}