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

App launcher refactor #198

Open
wants to merge 185 commits into
base: master
Choose a base branch
from

Conversation

Kasper24
Copy link
Contributor

@Kasper24 Kasper24 commented Feb 4, 2023

This PR fixes lots of the issues the app launcher previously had, including:

  • Fixed scrolling issues
  • Added widget_template support - the only requirements are that the user pass in a prompt with an id of "prompt_role" and a grid with an id of "grid_role"
  • Added app_template support, this is a function that gets an app parameter passed to it. It needs to return a new widget. You can use the app table that gets passed to the function
    • Removed the animation props, as it was somewhat buggy. In the example below I show a better way of animating the widget
  • Removed most of the styling props as there's no need for them now that we have proper templates
  • Renamed bling::app_launcher::visibility signal to visibility
  • Refactor the icon theme helper so it's more consistent with the rest of the helpers library
  • Removed the get_icon_for_client function
  • Convert any useful local function as a public method so that the behavior can be tailored to one needs
  • Added a method to dynamically set the favorite apps, which might be useful in case someone implements a context menu that has a button to toggle off the app's favorite state
  • Improved spawning non-terminal apps (some file managers would open a dialog error when opening them)
  • Improved spawning terminal apps, including auto-detecting the installed terminal so the user doesn't need to configure it anymore. It also now will change the class of the terminal to the class or name if the class isn't available on the desktop file. The second part is done with xdotool, so I'm not sure if I should keep it or not
  • Added 'page::forward', 'page::backward' and 'scroll' signals
  • New text input replacing the old prompt widget, with mouse support, text selection, more sane key binds, copy and paste, completely customizable and many more
  • Better searching
  • Improved performance when scrolling by caching the widgets
  • An option to lazy load the app widgets (less ram when starting and faster startup time, but scrolling pages will lag until all the widgets have been loaded to the cache)
  • Many more bug fixes and code improvements

Ofek Itscovits added 3 commits June 28, 2023 17:52
Watching the /usr/share/applications directory doesn't work across all distors, i.e on NixOS
That folder exists on /run/current-system/sw/share/applications or (~/.nix-profile/share/applications for user apps), but it's
just a syslink
to a path in the store, and that path changes across rebuilts.
Some apps have the same name, i.e nemo and nautilus are both called 'Files'
Before this fix only one of them would end up in the app launcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Requested changes from author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants