495 current 2024-04-28 20:50:10 24.05.20240428.30ddacc 6.8.6-zen1 *
This commit is contained in:
parent
5549a17e4c
commit
d6c181bc5b
46 changed files with 1685 additions and 10 deletions
52
modules/rice/ags/cfg/modules/dashboard/bluetooth.js
Normal file
52
modules/rice/ags/cfg/modules/dashboard/bluetooth.js
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { Widget, Bluetooth, Utils } from "../../imports.js";
|
||||
const { execAsync } = Utils
|
||||
const { Box } = Widget;
|
||||
|
||||
export const BluetoothWidget = () =>
|
||||
Widget.Button({
|
||||
onClicked: () => Bluetooth.toggle(),
|
||||
onSecondaryClickRelease: () => {
|
||||
execAsync(['bash', '-c', 'blueman-manager', '&']);
|
||||
App.closeWindow('dashboard');
|
||||
},
|
||||
child: Box({
|
||||
className: "bluetooth",
|
||||
vpack: "center",
|
||||
vexpand: true,
|
||||
setup: (self) => {
|
||||
self.hook(Bluetooth, (self) => {
|
||||
if (Bluetooth.enabled) {
|
||||
self.toggleClassName("off", false);
|
||||
} else {
|
||||
self.toggleClassName("off", true);
|
||||
}
|
||||
});
|
||||
},
|
||||
children: [
|
||||
Widget.Label({
|
||||
className: "bluetoothIcon",
|
||||
label: "",
|
||||
setup: (self) => {
|
||||
self.hook(Bluetooth, (self) => {
|
||||
if (Bluetooth.enabled) {
|
||||
self.label = "";
|
||||
} else {
|
||||
self.label = "";
|
||||
}
|
||||
});
|
||||
},
|
||||
}),
|
||||
Box({
|
||||
vertical: true,
|
||||
vpack: "center",
|
||||
children: [
|
||||
Widget.Label({
|
||||
className: "bluetoothLabel",
|
||||
label: "Bluetooth",
|
||||
hpack: "start",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue