diff --git a/home/Riva.nix b/home/Riva.nix index 11f6684..99ffd02 100644 --- a/home/Riva.nix +++ b/home/Riva.nix @@ -27,4 +27,5 @@ ]; }; }; + programs.alacritty.settings.font.size = 13; } diff --git a/home/ags/files/config.js b/home/ags/files/config.js index ef0ff0b..e622c74 100644 --- a/home/ags/files/config.js +++ b/home/ags/files/config.js @@ -21,6 +21,7 @@ const batteryIndicator = Widget.Box({ ]: [] }) +const sensorsAvailable = await Utils.execAsync(['sensors']).then(() => true).catch(() => false) const volumeIndicator = Widget.Button({ on_clicked: () => audio.speaker.is_muted = !audio.speaker.is_muted, @@ -216,11 +217,12 @@ function Right() { }), Widget.Label({ class_name: "item blue", - label: Variable("", { - poll: [5000, 'sensors', out => out.split('\n') - .find(line => line.includes('Tctl') || line.includes('Package')) - .match(/[0-9.]*°C/)[0]], - }).bind(), + label: sensorsAvailable ? Variable("", { + poll: [5000, 'sensors', out => { + const match = out.split('\n').find(line => line.includes('Tctl') || line.includes('Package'))?.match(/[0-9.]*°C/); + return match ? match[0] : "N/A"; + }], + }).bind() : "N/A", }), Widget.Button({ class_name: "item", @@ -244,7 +246,7 @@ function Bar(monitor = 0) { monitor, anchor: ["top", "left", "right"], exclusivity: "exclusive", - css: "font-size: " + (hyprland.monitors[monitor]["width"] > 1920? "1.2em;": "1em;"), + css: "font-size: " + (hyprland.monitors[monitor]["width"] > 2000? "1.2em;": "1em;"), child: Widget.CenterBox({ class_name: "window-box", start_widget: Left(),