From 9e6e41915dc77404ccef6e98f669a4f977a5f50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 18 Jul 2024 10:47:17 +0200 Subject: [PATCH] Thu 18 Jul 10:47:17 CEST 2024 --- home/ags/files/config.js | 9 ++++++--- hosts/Aloria/default.nix | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/home/ags/files/config.js b/home/ags/files/config.js index a740586..ef0ff0b 100644 --- a/home/ags/files/config.js +++ b/home/ags/files/config.js @@ -13,7 +13,7 @@ const batteryIndicator = Widget.Box({ Widget.Icon().hook(battery, self => { const thresholds = [...Array(11).keys()].map( i => i * 10); const icon = thresholds.find(threshold => threshold >= battery.percent) - const charging_name = battery.percent === 100 ? "charging" : "charged" + const charging_name = battery.percent >= 99 ? "charged" : "charging" self.icon = battery.charging? `battery-level-${icon}-${charging_name}-symbolic` : `battery-level-${icon}-symbolic` self.tooltip_text = `Battery ${battery.percent}%` self.class_name = "battery-item"; @@ -104,7 +104,9 @@ function Workspaces() { function SysTray() { const items = systemtray.bind("items") - .as(items => items.map(item => Widget.Button({ + .as(items => items.map(item => { + print(JSON.stringify(item)) + return Widget.Button({ child: Widget.Icon({ icon: item.bind("icon"), class_name: "systray-item", @@ -113,7 +115,8 @@ function SysTray() { on_secondary_click: (_, event) => item.openMenu(event), tooltip_markup: item.bind("tooltip_markup"), class_name: "systray", - }))) + })} + )) return Widget.Box({ children: items, diff --git a/hosts/Aloria/default.nix b/hosts/Aloria/default.nix index f2dedd7..5b4c4c7 100644 --- a/hosts/Aloria/default.nix +++ b/hosts/Aloria/default.nix @@ -26,6 +26,7 @@ listenPort = 51820; autostart = true; postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;"; + dns = ["10.0.0.1"]; peers = [{ publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c="; allowedIPs = [ "0.0.0.0/0" "::/0" ]; @@ -39,6 +40,7 @@ listenPort = 51820; autostart = false; postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;"; + dns = ["10.0.0.1"]; peers = [{ publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c="; allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];