Fri 5 Jul 23:18:09 CEST 2024

This commit is contained in:
Thomas Avé 2024-07-05 23:18:09 +02:00
parent b5e139205c
commit f945ad5112
3 changed files with 24 additions and 1 deletions

View File

@ -28,7 +28,7 @@
}; };
home.file."${config.xdg.configHome}/ags/style.css".text = pkgs.lib.mkAfter '' home.file."${config.xdg.configHome}/ags/style.css".text = pkgs.lib.mkAfter ''
window.bar { window.bar {
font-size: 1.3em; font-size: 1.2em;
} }
''; '';
} }

View File

@ -3,9 +3,30 @@ const audio = await Service.import("audio")
const systemtray = await Service.import("systemtray") const systemtray = await Service.import("systemtray")
import { getIconName } from "./utils.js" import { getIconName } from "./utils.js"
import { NotificationPopups } from "./notificationPopups.js" import { NotificationPopups } from "./notificationPopups.js"
const battery = await Service.import('battery')
const settings = JSON.parse(Utils.readFile(App.configDir + '/settings.json')) const settings = JSON.parse(Utils.readFile(App.configDir + '/settings.json'))
const batteryIndicator = Widget.Box({
children: [
Widget.Icon().hook(battery, self => {
const icon = [
[101, 'full'],
[67, 'good'],
[34, 'low'],
[1, 'caution'],
[0, 'empty'],
].find(([threshold]) => threshold <= battery.percentage)?.[1]
self.icon = `battery-${icon}-symbolic`
}),
Widget.Label().hook(battery, self => {
self.label = `${battery.percentage}%`
self.css = "margin-left: 0.7em;"
})
]
})
const volumeIndicator = Widget.Button({ const volumeIndicator = Widget.Button({
on_clicked: () => audio.speaker.is_muted = !audio.speaker.is_muted, on_clicked: () => audio.speaker.is_muted = !audio.speaker.is_muted,
class_name: "item blue", class_name: "item blue",
@ -131,6 +152,7 @@ function Right() {
class_name: "right", class_name: "right",
children: [ children: [
SysTray(), SysTray(),
batteryIndicator,
volumeIndicator, volumeIndicator,
Widget.Label({ Widget.Label({
class_name: "item", class_name: "item",

View File

@ -34,6 +34,7 @@
}; };
fileSystems."/home/server".device = pkgs.lib.mkForce "10.0.0.1:/home/server"; fileSystems."/home/server".device = pkgs.lib.mkForce "10.0.0.1:/home/server";
services.upower.enable = true;
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = { networking.wireless.iwd.settings = {
IPv6 = { IPv6 = {