GNOME: AppIndicator extension for tray icons

This commit is contained in:
theupriser committed 2026-10-14 13:54:30 +02:00
1 parent 2b84e6afa6
commit c5b59d9438
2 files changed
+15 -12

No files matched your search

+14 -11
View File
@@ -78,7 +78,7 @@ EOF
# GNOME only starts launchers it trusts. # GNOME only starts launchers it trusts.
gio set "$shortcut_path" metadata::trusted true 2>/dev/null || true gio set "$shortcut_path" metadata::trusted true 2>/dev/null || true
gnome_dash_pin gnome_dash_pin
gnome_desktop_icons_enable gnome_extensions_enable
fi fi
ok "Desktop shortcut created successfully." ok "Desktop shortcut created successfully."
@@ -123,18 +123,21 @@ gnome_dash_unpin() {
gsettings set org.gnome.shell favorite-apps "$favorites" gsettings set org.gnome.shell favorite-apps "$favorites"
} }
# Desktop icons on GNOME (it draws none itself): the Desktop Icons NG extension, # GNOME draws no desktop icons and no tray icons (Steam's, for one) itself:
# installed with the other GNOME packages (lib/packages.sh). Enabled in the # the Desktop Icons NG and AppIndicator extensions, installed with the other
# user's settings; GNOME loads a new extension at the next login. # GNOME packages (lib/packages.sh). Enabled in the user's settings; GNOME
DING_UUID=ding@rastersoft.com # loads a new extension at the next login.
GNOME_EXTENSIONS=(ding@rastersoft.com appindicatorsupport@rgcjonas.gmail.com)
gnome_desktop_icons_enable() { gnome_extensions_enable() {
user_session && command -v gsettings >/dev/null || return 0 user_session && command -v gsettings >/dev/null || return 0
[[ -d "/usr/share/gnome-shell/extensions/$DING_UUID" ]] || return 0 local uuid enabled
local enabled for uuid in "${GNOME_EXTENSIONS[@]}"; do
[[ -d "/usr/share/gnome-shell/extensions/$uuid" ]] || continue
enabled="$(gsettings get org.gnome.shell enabled-extensions 2>/dev/null)" || return 0 enabled="$(gsettings get org.gnome.shell enabled-extensions 2>/dev/null)" || return 0
[[ "$enabled" == *"$DING_UUID"* ]] && return 0 [[ "$enabled" == *"$uuid"* ]] && continue
if [[ "$enabled" == "@as []" || "$enabled" == "[]" ]]; then enabled="['$DING_UUID']" if [[ "$enabled" == "@as []" || "$enabled" == "[]" ]]; then enabled="['$uuid']"
else enabled="${enabled%]}, '$DING_UUID']"; fi else enabled="${enabled%]}, '$uuid']"; fi
gsettings set org.gnome.shell enabled-extensions "$enabled" gsettings set org.gnome.shell enabled-extensions "$enabled"
done
} }
+1 -1
View File
@@ -86,7 +86,7 @@ install_required_packages() {
# Step 2: gamescope/Steam and the desktop helpers the rest of the setup uses. # Step 2: gamescope/Steam and the desktop helpers the rest of the setup uses.
local -a MISSING required=(gamescope-session-cachyos steam mangohud xterm ttf-liberation wqy-zenhei) local -a MISSING required=(gamescope-session-cachyos steam mangohud xterm ttf-liberation wqy-zenhei)
# Plasma's on-screen keyboard; on GNOME kconfig instead, for the kreadconfig6/kwriteconfig6 Steamify's undo journal uses. # Plasma's on-screen keyboard; on GNOME kconfig instead, for the kreadconfig6/kwriteconfig6 Steamify's undo journal uses.
if [[ "$(desktop_kind)" == gnome ]]; then required+=(kconfig accountsservice gnome-shell-extension-desktop-icons-ng); else required+=(plasma-keyboard); fi if [[ "$(desktop_kind)" == gnome ]]; then required+=(kconfig accountsservice gnome-shell-extension-desktop-icons-ng gnome-shell-extension-appindicator); else required+=(plasma-keyboard); fi
info "Checking required packages: ${required[*]}" info "Checking required packages: ${required[*]}"
mapfile -t MISSING < <(pacman -T "${required[@]}") mapfile -t MISSING < <(pacman -T "${required[@]}")