Thu 18 Jul 10:47:17 CEST 2024
This commit is contained in:
parent
97fd7910d9
commit
9e6e41915d
|
@ -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,
|
||||
|
|
|
@ -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" ];
|
||||
|
|
Loading…
Reference in New Issue