495 current 2024-04-28 20:50:10 24.05.20240428.30ddacc 6.8.6-zen1 *

This commit is contained in:
zackartz 2024-04-28 20:50:20 -04:00
parent 5549a17e4c
commit d6c181bc5b
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
46 changed files with 1685 additions and 10 deletions

View 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",
}),
],
}),
],
}),
});