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 => {
|
Widget.Icon().hook(battery, self => {
|
||||||
const thresholds = [...Array(11).keys()].map( i => i * 10);
|
const thresholds = [...Array(11).keys()].map( i => i * 10);
|
||||||
const icon = thresholds.find(threshold => threshold >= battery.percent)
|
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.icon = battery.charging? `battery-level-${icon}-${charging_name}-symbolic` : `battery-level-${icon}-symbolic`
|
||||||
self.tooltip_text = `Battery ${battery.percent}%`
|
self.tooltip_text = `Battery ${battery.percent}%`
|
||||||
self.class_name = "battery-item";
|
self.class_name = "battery-item";
|
||||||
|
@ -104,7 +104,9 @@ function Workspaces() {
|
||||||
|
|
||||||
function SysTray() {
|
function SysTray() {
|
||||||
const items = systemtray.bind("items")
|
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({
|
child: Widget.Icon({
|
||||||
icon: item.bind("icon"),
|
icon: item.bind("icon"),
|
||||||
class_name: "systray-item",
|
class_name: "systray-item",
|
||||||
|
@ -113,7 +115,8 @@ function SysTray() {
|
||||||
on_secondary_click: (_, event) => item.openMenu(event),
|
on_secondary_click: (_, event) => item.openMenu(event),
|
||||||
tooltip_markup: item.bind("tooltip_markup"),
|
tooltip_markup: item.bind("tooltip_markup"),
|
||||||
class_name: "systray",
|
class_name: "systray",
|
||||||
})))
|
})}
|
||||||
|
))
|
||||||
|
|
||||||
return Widget.Box({
|
return Widget.Box({
|
||||||
children: items,
|
children: items,
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
autostart = true;
|
autostart = true;
|
||||||
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
||||||
|
dns = ["10.0.0.1"];
|
||||||
peers = [{
|
peers = [{
|
||||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
autostart = false;
|
autostart = false;
|
||||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||||
|
dns = ["10.0.0.1"];
|
||||||
peers = [{
|
peers = [{
|
||||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||||
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
|
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
|
||||||
|
|
Loading…
Reference in New Issue