I'm guessing I need to edit one of the schemas available in gsettings
but I don't know which one. and when I listed all the schemas, there's just too many of them.
Gnome3+: Remove Favorites from Dash via Terminal – Guide
gnomegnome-shellgnome3
gnomegnome-shellgnome3
I'm guessing I need to edit one of the schemas available in gsettings
but I don't know which one. and when I listed all the schemas, there's just too many of them.
Best Answer
The key you want is
favorite-apps
, the schema ID isorg.gnome.shell
. Now to list your favorite apps you can simply runor
These will return an array of strings e.g.
Now, to remove a value from that array you could use text processing tools like
sed
/awk
to check if an item is in that list and remove it keeping the same format (not that trivial though definitely doable) and once you get it right just write the new settings to the database e.g. assuming you wanted to removeorg.gnome.Nautilus.desktop
you would run (note the double quotes):or
Still, it's easier to write your own utility (using
gsettings
API) that will accept one or more desktop file names as positional parameters and remove them from favorites; to get you started, here is a very basic example inpython
that accepts one param (run asscript.py firefox.desktop
):