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
nixos/bamf: generate bamf-2.index #55470
Conversation
@jtojnar Any advice for
? |
I have no idea how |
Ahh never mind, this should be fine since this fragment will be inherited into the user environment nixpkgs/nixos/modules/config/system-path.nix Line 144 in 8a8056c
nixpkgs/nixos/modules/config/users-groups.nix Line 563 in be1c03d
|
Bamf wants this index of certain desktop file keys so I can match application windows to desktop files. I'm guessing it's obviously faster than enumerating all the directories for them. See: https://git.launchpad.net/bamf/tree/src/bamf-matcher.c
57ebb77
to
5121e5a
Compare
Are there any updates on this pull request, please? |
bamf_matcher_add_new_monitored_directory (self, directory); | ||
|
||
- bamf_file = g_build_filename (directory, BAMF_INDEX_NAME, NULL); | ||
+ bamf_file = g_build_filename ("/run/current-system/sw/share/applications", BAMF_INDEX_NAME, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break the package on other distros?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was to lazy to patch it to probably construct file names in $XDG_DATA_DIRS/applications/bamf.index.
Loading a bamf index won't work on other distros, but further down in the code it can load the table from a directory if the file doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also have no motivation to support bamf on non-nixos linux.
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
Pantheon will probably drop BAMF in a future release, see elementary/wingpanel-indicator-power#208. Since this is only used in Pantheon, adding the Pantheon label for this PR so I can recheck this when packaging 6.1. |
Bamf wants this index of certain desktop file keys
so it can match application windows to desktop files.
I'm guessing it's obviously faster than enumerating all
the directories for them.
See: https://git.launchpad.net/bamf/tree/src/bamf-matcher.c
Motivation for this change
Recalled that I probably should be doing this.
However I think that the index won't have any datafrom programs installed with
nix-env
.Not sure what I'd need to do to fix this (activation script?).Things done
I probably need to check if bamfdaemon is actually using the index and this isn't naive.
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)