forked from Shinonome/dots-hyprland
refractor quick toggles data, add volume slider for waffles action center
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import QtQuick
|
||||
import Quickshell.Bluetooth
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.common.widgets
|
||||
|
||||
QuickToggleModel {
|
||||
name: Translation.tr("Bluetooth")
|
||||
statusText: BluetoothStatus.firstActiveDevice?.name ?? Translation.tr("No device")
|
||||
tooltipText: Translation.tr("%1 | Right-click to configure").arg(
|
||||
(BluetoothStatus.firstActiveDevice?.name ?? Translation.tr("Bluetooth"))
|
||||
+ (BluetoothStatus.activeDeviceCount > 1 ? ` +${BluetoothStatus.activeDeviceCount - 1}` : "")
|
||||
)
|
||||
icon: BluetoothStatus.connected ? "bluetooth_connected" : BluetoothStatus.enabled ? "bluetooth" : "bluetooth_disabled"
|
||||
|
||||
available: BluetoothStatus.available
|
||||
toggled: BluetoothStatus.enabled
|
||||
mainAction: () => {
|
||||
Bluetooth.defaultAdapter.enabled = !Bluetooth.defaultAdapter?.enabled
|
||||
}
|
||||
hasMenu: true
|
||||
}
|
||||
Reference in New Issue
Block a user