Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A different approach you might consider userful #4

Open
ghost opened this issue May 7, 2017 · 4 comments
Open

A different approach you might consider userful #4

ghost opened this issue May 7, 2017 · 4 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented May 7, 2017

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:

  • Setting the translate flag and reference the desktop directory name whenever possible
  • Use '@as []' or add/remove apps not matching categories, or matching more than one
[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
Copy link
Owner

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

@BenJetson BenJetson self-assigned this May 24, 2017
@BenJetson BenJetson added this to the v2.0: GUI milestone May 24, 2017
@Abhinav1217
Copy link

@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
Copy link
Owner

BenJetson commented Jul 19, 2017

@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. 😄

@Abhinav1217
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants