mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-14 15:44:47 +02:00
GNOME: desktop icons through the Desktop Icons NG extension
Sync git.upriser.nl mirror / sync (push) Skipped
Sync git.upriser.nl mirror / sync (push) Skipped
This commit is contained in:
1 parent
4f095bd077
commit
f21b37a77a
2 files changed
+18
-1
No files matched your search
@@ -78,6 +78,7 @@ EOF
|
||||
# GNOME only starts launchers it trusts.
|
||||
gio set "$shortcut_path" metadata::trusted true 2>/dev/null || true
|
||||
gnome_dash_pin
|
||||
gnome_desktop_icons_enable
|
||||
fi
|
||||
|
||||
ok "Desktop shortcut created successfully."
|
||||
@@ -121,3 +122,19 @@ gnome_dash_unpin() {
|
||||
favorites="$(sed -e "s/, '$GNOME_SHORTCUT_ID'//; s/'$GNOME_SHORTCUT_ID', //; s/'$GNOME_SHORTCUT_ID'//" <<< "$favorites")"
|
||||
gsettings set org.gnome.shell favorite-apps "$favorites"
|
||||
}
|
||||
|
||||
# Desktop icons on GNOME (it draws none itself): the Desktop Icons NG extension,
|
||||
# installed with the other GNOME packages (lib/packages.sh). Enabled in the
|
||||
# user's settings; GNOME loads a new extension at the next login.
|
||||
DING_UUID=ding@rastersoft.com
|
||||
|
||||
gnome_desktop_icons_enable() {
|
||||
user_session && command -v gsettings >/dev/null || return 0
|
||||
[[ -d "/usr/share/gnome-shell/extensions/$DING_UUID" ]] || return 0
|
||||
local enabled
|
||||
enabled="$(gsettings get org.gnome.shell enabled-extensions 2>/dev/null)" || return 0
|
||||
[[ "$enabled" == *"$DING_UUID"* ]] && return 0
|
||||
if [[ "$enabled" == "@as []" || "$enabled" == "[]" ]]; then enabled="['$DING_UUID']"
|
||||
else enabled="${enabled%]}, '$DING_UUID']"; fi
|
||||
gsettings set org.gnome.shell enabled-extensions "$enabled"
|
||||
}
|
||||
Reference in new issue
Block a user