mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-07 07:49:28 -05:00
24 lines
893 B
QML
24 lines
893 B
QML
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("Not connected")
|
|
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
|
|
}
|