Coder Social home page Coder Social logo

friday / ulauncher-revived Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ulauncher/ulauncher

22.0 4.0 2.0 2.49 MB

Linux Application Launcher

License: Other

Python 76.02% Shell 3.83% JavaScript 7.00% HTML 0.17% Vue 10.80% CSS 1.92% Dockerfile 0.26%

ulauncher-revived's Introduction

Ulauncher Revived ๐Ÿง

This repo was an attempt to fix critical Ulauncher issues during a time Ulauncher development went stale.

The author of the fork has now been given shared ownership of the main Ulauncher repository and development will continue there in collaboration with the author and contributors.

This repository will continue to live for a while, until Ulauncher v6 has been released. While Ulauncher v5 has a developed a lot further than this fork, not all the features from the fork has been featured in any Ulauncher release yet. But as of Ulauncher v6 they will have.

Supported distros

  • Arch yay ulauncher-revived-git(installs from git dev branch)
App Search File Browser Custom Themes
screenshot screenshot screenshot

Create your own Extensions Create your own Color themes

Using with Systemd

If your distribution packages ulauncher.service or if you download it manually, then you can enable and start ulauncher by running:

systemctl --user enable --now ulauncher.service

Known Issues

Code Contribution

Project Contributor-friendly Issues
Ulauncher App GitHub issues by-label
GitHub issues by-label
GitHub issues by-label
GitHub issues by-label
Frontend for extensions website
Uses ReactJS
GitHub issues by-label
API for extensions website
Uses Python and bottle library
GitHub issues by-label

Code contributions are very welcome, but for your own sake please do create an issue first (if there aren't any) to confirm that the maintainers want your PR.

Checkout Code Contribution Guidelines for more info.

Setup Development Environment

You must have the following things installed:

  • Yarn

  • python3-setuptools

  • Application runtime dependencies. (You don't have to manually install these if you have already installed Ulauncher)

    sudo apt-get install \
      libkeybinder-3.0-0 \
      libgtk-3-0 \
      gir1.2-gtk-3.0 \
      gir1.2-keybinder-3.0 \
      gir1.2-webkit2-4.0 \
      gir1.2-glib-2.0 \
      gir1.2-notify-0.7 \
      gir1.2-gdkpixbuf-2.0 \
      gir1.2-ayatanaappindicator3-0.1 \
      python3-dbus \
      python3-levenshtein \
      python3-pyinotify \
      python3-websocket \
      python3-xdg
    

Build and Run

  1. If you have Ulauncher installed, make sure you stop the background process (systemctl --user stop ulauncher.service)
  2. ./bin/ulauncher runs the app

License

See the LICENSE file for license rights and limitations (GNU GPL v3.0).

ulauncher-revived's People

Contributors

aaronjanse avatar branb avatar cjbassi avatar dalanicolai avatar dcervenkov avatar dependabot[bot] avatar dev99problems avatar draggonfantasy avatar earboxer avatar freddii avatar friday avatar fuhrmann avatar goodwillcoding avatar gornostal avatar hickscorp avatar igormael avatar jetbug123 avatar jtheoof avatar khrlimam avatar kisaragi-hiu avatar luispabon avatar matheusfillipe avatar nastuzzisamy avatar nikazooz avatar oxplot avatar rensoliemans avatar sgreene570 avatar thanhvg avatar troycurtisjr avatar yatsenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ulauncher-revived's Issues

Changelog

Ulauncher has this only on the releases page and a file specifically for debian which is semi-scripted is a very confusing way. It would be good to have one and be strict about updating it.

https://keepachangelog.com/en/1.0.0/

Chaining: Piping extensions output to other extensions

Extremely vague concept so far, that I don't have any concrete plan to support, but wanted to share:

If extensions had a standardized way output a "format" or list of items of a specific format and accept input "formats" instead of communicating directly with Ulauncher about how to render then, then it would be possible to chain them.

For example If I type "tomorrow" and an extension or Ulauncher itself recognizes that as a date, then I activate that to show options what to do with "tomorrow" that could include a calendar extension, that in turn performs the actual action, or outputs another format that other extensions would want.

Continuous integration

Ulauncher used/uses Travis. I think Github Actions may be better to avoid having to store travis keys, which might also mean people can run them from their forks? I never tried it.

https://openbuildservice.org/ can do regular CI duties and also build distro packages, so we could handle that aspect easier.

Improve the developer experience and reduce dependencies

I stopped contributing to Ulauncher because of the build steps, being told to use containers to run the builds, builds ending up copying all the ulauncher files to my home directly, having to write tests to get PRs merged, and waiting forever.

I'm all for cutting out steps to make this easier, if possible. Why can't I just run Ulauncher from the source directory to test my changes for example?

Test bug report

Environment

I use Arch, btw

Bug description

This is just a test to try the new bug template

Log output

2021-12-01 21:10:43,782 | INFO | ulauncher: main() | Ulauncher version 6.0.0
2021-12-01 21:10:43,786 | INFO | ulauncher: main() | Extension API version 2.0.0
2021-12-01 21:10:43,789 | INFO | ulauncher: main() | GTK+ 3.24.30
2021-12-01 21:10:43,789 | INFO | ulauncher: main() | Is Wayland: False
2021-12-01 21:10:43,789 | INFO | ulauncher: main() | Wayland compatibility: off

Issue isn't already reported

  • I have searched for similar issues before reporting this to avoid creating a duplicate issue

Latest version

  • I am using the latest Ulauncher release

Remove noisy and unneeded semver library

Ulauncher v5 added a 1000 lines of code library for semver just to check if your extension was written for API 1.0.0 or 2.0.0. There are no other versions of the API, and features have been introduced silently and later reverted without bumping the API version, so it's super questionable to even use semver version notation style.

What's worse is that the semver library is polluting the debug output, adding this much noisy for every extension:

DEBUG | ulauncher.utils.semver: parse_range() | hyphen replace ^2.0.0
DEBUG | ulauncher.utils.semver: parse_range() | comparator trim ^2.0.0, re.compile('(\\s*)((?:<|>)?=?)\\s*([v=\\s]*([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-?((?:[0-9]+|\\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\\.(?:[0-9]+|\\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?|[v, re.MULTILINE)
DEBUG | ulauncher.utils.semver: parse_comparator() | comp ^2.0.0
DEBUG | ulauncher.utils.semver: repl() | caret ^2.0.0 ^2.0.0 2 0 0 None
DEBUG | ulauncher.utils.semver: repl() | caret return >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: parse_comparator() | caret >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: parse_comparator() | tildes >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: replace_xranges() | replaceXRanges >=2.0.0 <3.0.0 False
DEBUG | ulauncher.utils.semver: repl() | xrange >=2.0.0 >=2.0.0 >= 2 0 0 None
DEBUG | ulauncher.utils.semver: repl() | xrange gtlt=>= any_x=False
DEBUG | ulauncher.utils.semver: repl() | xRange return >=2.0.0
DEBUG | ulauncher.utils.semver: repl() | xrange <3.0.0 <3.0.0 < 3 0 0 None
DEBUG | ulauncher.utils.semver: repl() | xrange gtlt=< any_x=False
DEBUG | ulauncher.utils.semver: repl() | xRange return <3.0.0
DEBUG | ulauncher.utils.semver: parse_comparator() | xrange >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: replace_stars() | replaceStars >=2.0.0 <3.0.0 False
DEBUG | ulauncher.utils.semver: parse_comparator() | stars >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: __init__() | comparator: >=2.0.0 False
DEBUG | ulauncher.utils.semver: parse() | parse comp=>=2.0.0
DEBUG | ulauncher.utils.semver: __init__() | SemVer 2.0.0, False
DEBUG | ulauncher.utils.semver: __init__() | comparator: <3.0.0 False
DEBUG | ulauncher.utils.semver: parse() | parse comp=<3.0.0
DEBUG | ulauncher.utils.semver: __init__() | SemVer 3.0.0, False
DEBUG | ulauncher.utils.semver: format() | Range format >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: __init__() | SemVer 2.0.0, False
DEBUG | ulauncher.utils.semver: test() | Comparator, test 2.0.0, False
DEBUG | ulauncher.utils.semver: cmp() | cmp: >=
DEBUG | ulauncher.utils.semver: compare() | SemVer.compare 2.0.0 False 2.0.0
DEBUG | ulauncher.utils.semver: compare() | compare result 0
DEBUG | ulauncher.utils.semver: test() | Comparator, test 2.0.0, False
DEBUG | ulauncher.utils.semver: cmp() | cmp: <
DEBUG | ulauncher.utils.semver: compare() | SemVer.compare 2.0.0 False 3.0.0
DEBUG | ulauncher.utils.semver: compare() | compare result -1
DEBUG | ulauncher.utils.semver: parse_range() | range ^2.0.0 False
DEBUG | ulauncher.utils.semver: parse_range() | hyphen replace ^2.0.0
DEBUG | ulauncher.utils.semver: parse_range() | comparator trim ^2.0.0, re.compile('(\\s*)((?:<|>)?=?)\\s*([v=\\s]*([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-?((?:[0-9]+|\\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\\.(?:[0-9]+|\\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?|[v, re.MULTILINE)
DEBUG | ulauncher.utils.semver: parse_comparator() | comp ^2.0.0
DEBUG | ulauncher.utils.semver: repl() | caret ^2.0.0 ^2.0.0 2 0 0 None
DEBUG | ulauncher.utils.semver: repl() | caret return >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: parse_comparator() | caret >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: parse_comparator() | tildes >=2.0.0 <3.0.0
DEBUG | ulauncher.utils.semver: replace_xranges() | replaceXRanges >=2.0.0 <3.0.0 False
DEBUG | ulauncher.utils.semver: repl() | xrange >=2.0.0 >=2.0.0 >= 2 0 0 None
DEBUG | ulauncher.utils.semver: repl() | xrange gtlt=>= any_x=False
DEBUG | ulauncher.utils.semver: repl() | xRange return >=2.0.0

Start extensions only when keyword is entered?

Ulauncher runs a lot of extensions in the background, but the vast majority of extensions out there are just wrapping external APIs. They're not running any daemons / background processes of their own. At least the ones that do are few enough so that they could be convinced to add a new setting to manifest.json to keep the current behavior.

I was told when suggesting this before that "RAM is there to be used" and that it would affect performance negatively. I never bought these arguments.

Devs also have to write more code now to support handing settings being changed. If they're started on demand they wouldn't have to do that.

Also related: Every extension now load GLib needlessly. They communicate with Ulauncher via websockets, and should not need to do that. It should be handled on the server side.

Properly fix the hotkey issues

The current hotkey implementation has too many quirks and the workarounds have race conditions.

Quoting from a libkeybinder issue how to do this:

Use GApplication: https://wiki.gnome.org/HowDoI/GtkApplication
Add your GAction: https://wiki.gnome.org/HowDoI/GAction
Call it over dbus

Furthermore, you can add custom entries to the gnome keyboard shortcut settings, like for example GPaste

I think this requires making a gnome shell extension though :(

I found an example that I think does this, but I'm not sure https://www.codeproject.com/Articles/5271677/How-to-Create-A-GNOME-Extension

Show gnome-control-center panels directly in app

Gnome integrates their settings panels in their own launcher (see the middle part of the picture), and for this reason they made them not display as normal apps. This however causes them to not show in third party launchers at all. You can enable them by copying the desktop entry locally and overriding NoDisplay, in which case they will show up in Ulauncher, but also show up twice in Gnome's own launcher (actually three times counting the desktop entry showing up as a file)

2021-06-30_19-09

In Ulauncher it only shows up once (if you do this):
2021-06-30_19-33

It would be very easy to change the behavior to show these as normal apps. Now that we support ShowIn, they would also only show when your current session is gnome.

I'm considering making this the default rather than adding another option. If people complain they can opt out.

See https://github.com/friday/ulauncher-gnome-settings#modify-ulauncher-not-recommended

Include other meta-fields in app fuzzy matching

Current search only matches the name of the app and the binary. Not comment, keyword and description.

I already extended the kind of ugly solution that fixed the fuzzy matching displaying totally broken results, so that it now includes these fields too, with lower weighting. It needs work and testing, but at least it works.

2021-07-14_23-35
2021-07-14_23-42

Supporting distros

Currently supported distros:

  • Arch (installs straight from git dev branch)

================================================

My first priority is to keep this project working for people building from source. I don't want to start taking over package names, or creating new ones to point here, and reading up on how to support different package managers. Hopefully gornostal will return and it won't be necessary.

Since I did just mention this fork in a couple of github PR's people will be coming here expecting all of that though. Please be patient, build from source, or offer to help out.

Simplify build scripts (rewrite setup.py and deprecate scripts/*)

As part of #9 I want to simplify the scripts, and I tried to rewrite setup.py to use a more default and modern way to install. There's a lot of wrappers, files and abstractions involved now, which I'm not too keen on. This is also what's been holding me back from #2. Setuptools has matured and now includes/extends distutils. It's still a nightmare to work with because they keep breaking use cases especially when you don't want to build an egg or wheel. But by embracing a more conventional setup it's easier to find help for issues you run into, and once it's set up I think it'll be very much worth it.

setup.py can support arbitrary scripts for building packages. I think this is a better approach than the custom ul wrapper binary and scripts directory.

It should be able to run a simple command to get the dev environment set up, and another to install, another to build the tar (it can do this already https://docs.python.org/3/distutils/sourcedist.html)

No logging output from extensions

Steps to reproduce

  1. Install Ulauncher-Revived (via AUR, or similar) and the demo extension
  2. Run Ulauncher via ulauncher -v (or also --dev)

Current behavior

No logging from within the extension (or other installed extensions, like the spotify-api) is visible in the console. This does lead me to believe that I'm doing something wrong, but I've studied the Ulauncher logging documentation, python documentation, stackoverflow questions, other extensions, etc, etc. This still leaves the possibility that my setup is somehow causing issues if others can't reproduce this.
At this point I've tried everything I can think of:

  • using logging directly or even print() instead of the logger instance
  • trying all other logging levels
  • changing logging verbosity via setLevel or basicConfig on the either the logger instance, or the logging class itself.
  • searching for a possible log file somewhere in /tmp or ~/.cache
  • studying both of the setup_logging scripts for any clues (ulauncher/utils/setup_logging.py & ulauncher/api/client/setup_logging.py)

Expected behavior

Logs from extensions should be printed alongside other logs from Ulauncher itself, or stored in a separate file if needed.

Environment

Ulauncher version: ulauncher DEV from AUR, same behaviour in Ulauncher 5.11 from AUR
Linux distro: Arch Linux (Linux 5.12.15-arch1-1)
Desktop environment: N/A

Logs

https://gist.github.com/niraami/c755ef96141434f35f12f0da4a9550f5

Use system icons for the file browse mode

Ulauncher currently uses custom icons, for example for the file browser mode and the calculator icon, rather than using the system icons that users can determine by setting the theme.

By switching to use system icons we can reduce the size of the installed app as well.

install error on Arch/sway

Unable to install via AUR package,

This application failed to start because it could not find or load the Qt platform plugin "wayland".

Available platform plugins are: phantom.

Reinstalling the application may fix this problem.

QT_QPA_PLATFORM is set to wayland
and qt5-wayland is also installed.

EDIT: nvm, setting QT_QPA_PLATFORM globally was causing the trouble

Icons for shortcuts generated on first launch doesn't work in dev mode

{
    "4dcabb1b-fab7-4ee0-8c99-430bf9ae8615": {
        "id": "4dcabb1b-fab7-4ee0-8c99-430bf9ae8615",
        "name": "Google Search",
        "keyword": "g",
        "cmd": "https://google.com/search?q=%s",
        "icon": "~/src/UlauncherRevived/data/media/google-search-icon.png",
        "is_default_search": true,
        "run_without_argument": false,
        "added": 1625258934.4217124
    },
    "8ecf7735-eec1-499b-b123-a2f104e59495": {
        "id": "8ecf7735-eec1-499b-b123-a2f104e59495",
        "name": "Stack Overflow",
        "keyword": "so",
        "cmd": "http://stackoverflow.com/search?q=%s",
        "icon": "~/src/UlauncherRevived/data/media/stackoverflow-icon.svg",
        "is_default_search": true,
        "run_without_argument": false,
        "added": 1625258934.4217358
    },
    "940a61e8-ee65-46e0-824f-85041359ff9c": {
        "id": "940a61e8-ee65-46e0-824f-85041359ff9c",
        "name": "Wikipedia",
        "keyword": "wiki",
        "cmd": "https://en.wikipedia.org/wiki/%s",
        "icon": "~/src/UlauncherRevived/data/media/wikipedia-icon.png",
        "is_default_search": true,
        "run_without_argument": false,
        "added": 1625258934.4217527
    }
}

The problem is that this is generated on first launch, so it persists across installations, but the icon path differs between dev and installed, and also v5 and v6. I think the script should copy the icons to a local path in ~/.cache/ulauncher_cache/icons

Full Client/daemon separation

Pros:

  • More sane code base with no risk of leaking between these layers or crashing.
  • Almost all crashes are happening on the UI layer with X or GTK (XInitThreads etc), and with separation we wouldn't need to restart the whole app if it happens, in addition to probably having an easier time to track down these bugs.
  • The daemon could be much lighter on memory and not have to keep GTK and WebkitGTK in memory.
  • The UI would unload from memory completely when you're done with it.
  • Third party UIs (for example for KDE, or the terminal) could integrate with the daemon.
  • Preferences that need a restart could actually restart the daemon (assuming it uses systemd) when you change them or after you close the preferences window, or it might not even be needed.

Cons:

  • It would take time to rewrite
  • It could potentially add to the time ulauncher needs to toggle or query the extensions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.