The layout can be configured with org/gnome/shell/app-picker-layout and org/gnome/desktop/app-folders in dconf. It mostly works but GNOME usually refreshes the layout and messes up it. If I don’t configure it in dconf the layout won’t be changed.
Hey man ! Don’t know if you ended up finding a solution but I’ll leave this here just in case.
The syntax for the app picker layout is a bit verbose but you can find resources on it at this link : Write key:value using lib.hm.gvariant for home-manager
In my case I created the following function :
apl-entry = with lib.hm.gvariant; name: (position:
(mkDictionaryEntry[name (mkVariant [
(mkDictionaryEntry["position" (mkVariant position)])
])])
);
and then used it like this :
app-picker-layout = [
[ # app drawer 1
(apl-entry "Desktop" 0)
(apl-entry "System" 1)
(apl-entry "Utilities" 2)
(apl-entry "beeper.desktop" 3)
(apl-entry "steam.desktop" 4)
]
[ # app drawer 2 ]
];
Hope this helps ![]()
This is basically what I did. And GNOME just messes up it. ![]()
What do you mean messes it up? What syntax did you use?
If you use NixOS dconf module, you could try locking the setting so that GNOME cannot change it. Not sure if it won’t break something, though.
What do you mean messes it up? What syntax did you use?
app-picker-layout = with lib; [
(
(
list:
zipListsWith (
k: p: mkDictionaryEntry k (mkVariant (mkDictionaryEntry "position" (mkVariant (mkInt32 p))))
) list (genList (x: x) (length list))
)
[
"Office"
"System"
"Utilities"
]
)
];
The order should be Office, System and Utilities. But several seconds after I login, GNOME reverts the order automatically.
It’s locked and I can’t change it manually. But GNOME can change it.
I do something similar, albeit with a somewhat simpler syntax:
programs.dconf.profiles.user.databases = [
{
settings = with lib.gvariant; {
# group LibreOffice applications for a cleaner desktop experience
"org/gnome/desktop/app-folders".folder-children = [ "LibreOffice" ];
"org/gnome/desktop/app-folders/folders/LibreOffice" = {
name = "Office";
apps = [ "writer.desktop" "calc.desktop" "impress.desktop" "draw.desktop" "math.desktop" "base.desktop" ];
translate = true;
};
};
}
];
Unfortunately, the “LibreOffice” entry is not added to the “folder-children” key by this. Even worse, gsettings won’t find the created folder “LibreOffice”, while dconf will happily display it.
$ gsettings get org.gnome.desktop.app-folders folder-children
['Utilities', 'YaST', 'Pardus']
$ gsettings list-recursively org.gnome.desktop.app-folders
org.gnome.desktop.app-folders folder-children ['Utilities', 'YaST', 'Pardus']
$ gsettings get org.gnome.desktop.app-folders.folders.LibreOffice apps
No such schema “org.gnome.desktop.app-folders.folders.LibreOffice”
$ dconf read /org/gnome/desktop/app-folders/folder-children
['Utilities', 'YaST', 'Pardus']
$ dconf list /org/gnome/desktop/app-folders/folders/
LibreOffice/
Pardus/
Utilities/
YaST/
$ dconf read /org/gnome/desktop/app-folders/folders/LibreOffice/apps
['writer.desktop', 'calc.desktop', 'impress.desktop', 'draw.desktop', 'math.desktop', 'base.desktop']
What do I do wrong?
It seems like setting the “folder-children” doesn’t work as expected. ![]()
I thought you didn’t add this part?
Using apl-entry I get the correct result:
[{'Monitoring': <{'position': <0>}>, 'Files': <{'position': <1>}>}]
With @vccs’ function I get , instead of : between ‘position’ and the number:
[{'Monitoring': <{'position', <0>}>, 'Files': <{'position', <1>}>}]
Looks like this is why it doesn’t work.