summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 15:01:17 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 15:01:17 +1100
commitc81616882eb7819e69ce39537d38c12485289c28 (patch)
treeecbbf34ed0180eb8c77e69007a45a82bcfd4c0e4 /src
parentapp: log startup time (diff)
downloadcaelestia-shell-c81616882eb7819e69ce39537d38c12485289c28.tar.gz
caelestia-shell-c81616882eb7819e69ce39537d38c12485289c28.tar.bz2
caelestia-shell-c81616882eb7819e69ce39537d38c12485289c28.zip
networks + bluetooth: highlight active
Diffstat (limited to 'src')
-rw-r--r--src/modules/popdowns/bluetoothdevices.tsx2
-rw-r--r--src/modules/popdowns/networks.tsx6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/popdowns/bluetoothdevices.tsx b/src/modules/popdowns/bluetoothdevices.tsx
index 7ba421c..c71d981 100644
--- a/src/modules/popdowns/bluetoothdevices.tsx
+++ b/src/modules/popdowns/bluetoothdevices.tsx
@@ -4,7 +4,7 @@ import AstalBluetooth from "gi://AstalBluetooth";
import PopdownWindow from "../../widgets/popdownwindow";
const BluetoothDevice = (device: AstalBluetooth.Device) => (
- <box className="device">
+ <box className={bind(device, "connected").as(c => `device ${c ? "active" : ""}`)}>
<icon
className="icon"
icon={bind(device, "icon").as(i =>
diff --git a/src/modules/popdowns/networks.tsx b/src/modules/popdowns/networks.tsx
index 0e9fe2f..18a38d3 100644
--- a/src/modules/popdowns/networks.tsx
+++ b/src/modules/popdowns/networks.tsx
@@ -4,7 +4,11 @@ import AstalNetwork from "gi://AstalNetwork";
import PopdownWindow from "../../widgets/popdownwindow";
const Network = (accessPoint: AstalNetwork.AccessPoint) => (
- <box className="network">
+ <box
+ className={bind(AstalNetwork.get_default().wifi, "activeAccessPoint").as(
+ a => `network ${a === accessPoint ? "active" : ""}`
+ )}
+ >
<icon className="icon" icon={bind(accessPoint, "iconName")} />
<label
truncate