added contextmenu and hide tray icon
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
const batteryLevel = (batteryStatus, batteryPercent) => ({
|
||||
"BATTERY_UNAVAILABLE": "not connected",
|
||||
"BATTERY_CHARGING": "charging (" + batteryPercent + "%)"
|
||||
"BATTERY_CHARGING": "charging (" + batteryPercent + "%)",
|
||||
"HEADSET_UNAVAILABLE": "no headset connected"
|
||||
})[batteryStatus] ?? batteryPercent + "%";
|
||||
|
||||
const batteryIcon = batteryStatus => ({
|
||||
"BATTERY_UNAVAILABLE": "action-unavailable",
|
||||
"BATTERY_AVAILABLE": "audio-headphones-symbolic",
|
||||
"BATTERY_CHARGING": "reload"
|
||||
"BATTERY_CHARGING": "freon-voltage-symbolic",
|
||||
"HEADSET_UNAVAILABLE": "dialog-error"
|
||||
})[batteryStatus] ?? "audio-headphones-symbolic";
|
||||
|
||||
const hex2rgb = (hex, h = hex.replace('#', '0x')) => ({ r: h >> 16 & 255, g: h >> 8 & 255, b: h & 255 });
|
||||
|
Reference in New Issue
Block a user