ghostty: keep warm daemon alive with no windows
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
734d18791c
commit
1b59058b91
2 changed files with 20 additions and 12 deletions
|
|
@ -44,6 +44,8 @@ in
|
||||||
confirm-close-surface = false;
|
confirm-close-surface = false;
|
||||||
gtk-titlebar = false;
|
gtk-titlebar = false;
|
||||||
gtk-single-instance = true;
|
gtk-single-instance = true;
|
||||||
|
# keeps the warm instance alive with zero windows
|
||||||
|
quit-after-last-window-closed = false;
|
||||||
cursor-style = "bar";
|
cursor-style = "bar";
|
||||||
cursor-style-blink = true;
|
cursor-style-blink = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1997,11 +1997,12 @@ in
|
||||||
|
|
||||||
property int vol: sink && sink.audio ? Math.round(sink.audio.volume * 100) : 0
|
property int vol: sink && sink.audio ? Math.round(sink.audio.volume * 100) : 0
|
||||||
property bool muted: sink && sink.audio ? sink.audio.muted : false
|
property bool muted: sink && sink.audio ? sink.audio.muted : false
|
||||||
property string volIcon: muted ? "volume_off"
|
// caelestia's getVolumeIcon: one threshold at 50%, and
|
||||||
: vol > 66 ? "volume_up"
|
// "no_sound" (not volume_off) for the muted state.
|
||||||
: vol > 33 ? "volume_down"
|
property string volIcon: muted ? "no_sound"
|
||||||
: vol > 0 ? "volume_mute"
|
: vol >= 50 ? "volume_up"
|
||||||
: "volume_off"
|
: vol > 0 ? "volume_down"
|
||||||
|
: "volume_mute"
|
||||||
|
|
||||||
function openVolDropdown() {
|
function openVolDropdown() {
|
||||||
bar.toggleDropdown(volDropdown, function() {
|
bar.toggleDropdown(volDropdown, function() {
|
||||||
|
|
@ -2253,13 +2254,18 @@ in
|
||||||
PowerProfiles.profile === PowerProfile.PowerSaver ? "power-saver"
|
PowerProfiles.profile === PowerProfile.PowerSaver ? "power-saver"
|
||||||
: PowerProfiles.profile === PowerProfile.Performance ? "performance"
|
: PowerProfiles.profile === PowerProfile.Performance ? "performance"
|
||||||
: "balanced"
|
: "balanced"
|
||||||
property string batteryIcon: charging ? "battery_charging_full"
|
// caelestia's getBatteryIcon: a 7-step bar scale rather
|
||||||
: batteryLevel >= 90 ? "battery_full"
|
// than one flat charging glyph. The level-- skips the
|
||||||
: batteryLevel >= 70 ? "battery_6_bar"
|
// charging variants Material Symbols doesn't ship (40,
|
||||||
: batteryLevel >= 50 ? "battery_5_bar"
|
// 70). Low-battery warning is carried by colour below.
|
||||||
: batteryLevel >= 30 ? "battery_3_bar"
|
function battIconFor(pct, chg) {
|
||||||
: batteryLevel >= 15 ? "battery_2_bar"
|
if (pct === 1) return chg ? "battery_charging_full" : "battery_full";
|
||||||
: "battery_alert"
|
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
|
// Stacked: icon over percentage. Side by side no longer
|
||||||
// fits, but the level is worth keeping on a laptop.
|
// fits, but the level is worth keeping on a laptop.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue