BenJetson / gnome-dash-fix

Sort GNOME apps dashboard by category.
http://www.bengodfrey.net/gnome-dash-fix/
MIT License
119 stars 13 forks source link

A different approach you might consider userful #4

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi there,

Just wanted to shared a different approach I've been using, you might find some of it useful to integrate in your project.

Reset menus: dconf reset -f "/org/gnome/desktop/app-folders/folders/" Backup: dconf dump /org/gnome/desktop/app-folders/ > menu.txt Restore: dconf load /org/gnome/desktop/app-folders/ < menu.txt

Chrome apps have no Category, but are always named chrome* :

#!/bin/bash

applist=$(printf "'%s', " $(cd /home/bruno/.local/share/applications; ls chrome*.desktop))
applist="[$(sed -e 's/[,[:space:]]*$//' <<<${applist})]"

gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/WebApps/ name 'X-GNOME-WebApplications.directory'
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/WebApps/ translate true
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/WebApps/ apps "${applist}"

Menu format and translation support:

[folders/Graphics]
translate=true
categories=['Graphics']
apps=['org.gnome.Photos.desktop']
excluded-apps=['evince.desktop', 'variety-slideshow.desktop']
name='Graphics.directory'

[folders/Office]
translate=true
categories=['Office']
apps=@as []
excluded-apps=@as []
name='Office.directory'
BenJetson commented 7 years ago

Good points. :smiley: I'll roll most of these into the interactive.py script sometime soon.

Abhinav1217 commented 7 years ago

@henriquesb2 Nice solution for chrome apps, I was looking everywhere for it 👍 .

I have already added backup and restore functionality ( as command line arguments ) on this script similar to yours, ( I use .config/ ) for personal use. @BenJetson Would you like PR on it or you have moved your focus to the python script?

BenJetson commented 7 years ago

@Abhinav1217 Hey! I'm in the process of rewriting the app with a basic GUI frontend, so yes -- the main focus of this project has shifted to the new python script.

However, I plan on still keeping the original basic script around and supported since it's so useful for people creating setup and login scripts. I'll be moving the simpler script out into a smaller repository of its own to live as an independent project.

I'll DM you here when the new project launches along with the other repository. A PR with this functionality included would be much appreciated in the new repository. :smile:

Abhinav1217 commented 7 years ago

That would be great, Bash is really useful for people like me, who need quick fixes. I do have backup and restore functionality added to your script but chrome app section that @henriquesb2 suggested required to be executed everytime a new chrome app is installed.

DM me when you create new repo, till them I will try to figure out better way to have chrome app folder.