Git Product home page Git Product logo

ulauncher-system-management-direct's Introduction

ulauncher-system-management-direct

Ulauncher extension allowing you to lock, suspend, reboot and shut down your system w/o an additional sub-menu.

This extension is using experimental techniques to make Ulauncher keywords look and behave like apps. This comes with a couple of minor caveats but as of writing this, it works fine. These techniques were lifted from https://github.com/friday/ulauncher-gnome-settings

How it works (primarily for extension developers)

This explanation was lifted directly from https://github.com/friday/ulauncher-gnome-settings and modified to apply to this extension

Ulauncher extensions can add multiple keywords, but not apps.

Keywords and apps have different workflows. Both have searchable names (like "Google Translate"), but triggering it will have different behavior. Triggering an app name will launch the app. Triggering the keyword name will replace your input with the keyword followed by a space, waiting for you to type an argument.

In addition to this, keywords can be typed directly. This skips the fuzzy search step.

To avoid the additional step and "launch" instead, this extension uses default keywords that look like names. That way if you select "Shut Down" it will replace your input with "Shut Down " (not something else like "shu "). This will show briefly before the KeywordQueryEvent-handler closes Ulauncher and runs the command. It looks a lot less hacky this way, and you may not even think about it.

Instead of spaces it's using an untypable blank character with the same width. Keywords can't contain spaces, since space is the separator between the keyword and the arguments. As a bonus, since it can't be typed with a keyboard it can only launch via search (like apps).

Users can override keywords in Ulauncher's preferences (hence the "default" in default_value). If you do this, this extension will not work as intended, but you may want to delete keywords completely if you don't want a specific panel to appear in search.

Credits

ulauncher-system-management-direct's People

Contributors

ghackett avatar

Stargazers

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

Watchers

 avatar

ulauncher-system-management-direct's Issues

Extension doesn't work anymore

Unfortunately, this very useful extension doesn't work somehow:
-Adding it to Ulauncher results in a crash
-Reboot of Ulauncher vanishes the crash notification
-Ulauncher commands (reboot, shut down, etc) do not bring desired system actions

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.