Fix ArchUpdater to be able to use ghostty

ArchUpdaterService: add separate ghostty command
ArchUpdater: Change color of symbol if no terminal/aur helper is found,
edited tooltip
ArchUpdaterPanel: Add proper error message if TERMINAL or aur helper
was not found
This commit is contained in:
Ly-sec 2025-08-31 16:41:52 +02:00
parent 3f0374e1f2
commit 1ecc3d9744
3 changed files with 139 additions and 131 deletions

View file

@ -16,10 +16,21 @@ NIconButton {
colorBg: Color.mSurfaceVariant
colorBorder: Color.transparent
colorBorderHover: Color.transparent
colorFg: (ArchUpdaterService.totalUpdates === 0) ? Color.mOnSurface : Color.mPrimary
colorFg: {
if (!ArchUpdaterService.terminalAvailable || !ArchUpdaterService.aurHelperAvailable) {
return Color.mError
}
return (ArchUpdaterService.totalUpdates === 0) ? Color.mOnSurface : Color.mPrimary
}
// Icon states
icon: {
if (!ArchUpdaterService.terminalAvailable) {
return "terminal"
}
if (!ArchUpdaterService.aurHelperAvailable) {
return "package"
}
if (ArchUpdaterService.aurBusy) {
return "sync"
}
@ -31,6 +42,12 @@ NIconButton {
// Tooltip with repo vs AUR breakdown and sample lists
tooltipText: {
if (!ArchUpdaterService.terminalAvailable) {
return "Terminal not configured\nSet TERMINAL environment variable"
}
if (!ArchUpdaterService.aurHelperAvailable) {
return "AUR helper not found\nInstall yay or paru"
}
if (ArchUpdaterService.aurBusy) {
return "Checking for updates…"
}