diff --git a/home-manager/fred.nix b/home-manager/fred.nix index f446c22..0688adc 100644 --- a/home-manager/fred.nix +++ b/home-manager/fred.nix @@ -44,6 +44,8 @@ in confirm-close-surface = false; gtk-titlebar = false; gtk-single-instance = true; + # keeps the warm instance alive with zero windows + quit-after-last-window-closed = false; cursor-style = "bar"; cursor-style-blink = true; }; diff --git a/settings/quickshell.nix b/settings/quickshell.nix index c9da2c5..51e429e 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1997,11 +1997,12 @@ in property int vol: sink && sink.audio ? Math.round(sink.audio.volume * 100) : 0 property bool muted: sink && sink.audio ? sink.audio.muted : false - property string volIcon: muted ? "volume_off" - : vol > 66 ? "volume_up" - : vol > 33 ? "volume_down" - : vol > 0 ? "volume_mute" - : "volume_off" + // caelestia's getVolumeIcon: one threshold at 50%, and + // "no_sound" (not volume_off) for the muted state. + property string volIcon: muted ? "no_sound" + : vol >= 50 ? "volume_up" + : vol > 0 ? "volume_down" + : "volume_mute" function openVolDropdown() { bar.toggleDropdown(volDropdown, function() { @@ -2253,13 +2254,18 @@ in PowerProfiles.profile === PowerProfile.PowerSaver ? "power-saver" : PowerProfiles.profile === PowerProfile.Performance ? "performance" : "balanced" - property string batteryIcon: charging ? "battery_charging_full" - : batteryLevel >= 90 ? "battery_full" - : batteryLevel >= 70 ? "battery_6_bar" - : batteryLevel >= 50 ? "battery_5_bar" - : batteryLevel >= 30 ? "battery_3_bar" - : batteryLevel >= 15 ? "battery_2_bar" - : "battery_alert" + // caelestia's getBatteryIcon: a 7-step bar scale rather + // than one flat charging glyph. The level-- skips the + // charging variants Material Symbols doesn't ship (40, + // 70). Low-battery warning is carried by colour below. + function battIconFor(pct, chg) { + if (pct === 1) return chg ? "battery_charging_full" : "battery_full"; + let level = Math.floor(pct * 7); + if (chg && (level === 4 || level === 1)) level--; + return chg ? "battery_charging_" + ((level + 3) * 10) + : "battery_" + level + "_bar"; + } + property string batteryIcon: battIconFor(batteryLevel / 100, charging) // Stacked: icon over percentage. Side by side no longer // fits, but the level is worth keeping on a laptop.