Fri 5 Jul 23:18:09 CEST 2024
This commit is contained in:
parent
b5e139205c
commit
f945ad5112
|
@ -28,7 +28,7 @@
|
|||
};
|
||||
home.file."${config.xdg.configHome}/ags/style.css".text = pkgs.lib.mkAfter ''
|
||||
window.bar {
|
||||
font-size: 1.3em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -3,9 +3,30 @@ const audio = await Service.import("audio")
|
|||
const systemtray = await Service.import("systemtray")
|
||||
import { getIconName } from "./utils.js"
|
||||
import { NotificationPopups } from "./notificationPopups.js"
|
||||
const battery = await Service.import('battery')
|
||||
|
||||
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({
|
||||
on_clicked: () => audio.speaker.is_muted = !audio.speaker.is_muted,
|
||||
class_name: "item blue",
|
||||
|
@ -131,6 +152,7 @@ function Right() {
|
|||
class_name: "right",
|
||||
children: [
|
||||
SysTray(),
|
||||
batteryIndicator,
|
||||
volumeIndicator,
|
||||
Widget.Label({
|
||||
class_name: "item",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
};
|
||||
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.settings = {
|
||||
IPv6 = {
|
||||
|
|
Loading…
Reference in New Issue