Code Monkey home page Code Monkey logo

ulauncher-custom-scripts's People

Contributors

daviscodesbugs avatar directspeed avatar nastuzzisamy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ulauncher-custom-scripts's Issues

Allow extension to take arguements

Will it be possible for the extension to directly take arguments from ulauncher

ie. sh script_name arg1 arg2

it will be really nice addition to have

request - examples

Hello,

Can you put 2 or 3 really simple examples on github and/or the extension directly?

Thanks

sudo commands not working.

How can I run commands like restarting nginx that require entering password?
Also how to show output generated by some commands like "sudo nginx -t"?

How to customize the icon?

Hello!

Maybe I'm missing the explanation, but I can't figure out how to put a custom icon on an script, or if it needs to be an specific format or have specific dimensions.

Thanks for your help!

No script appears. Only "Loading..."

I have installed the extension, and copied the example scripts into ~/.config/ulauncher/scripts.json
When writing the keyword "sh" in ulauncher, only the icon assigned with the legend "Loading ..." appears but nothing happens.
The script appears only when tipping.

2021-07-08_02-27

json example doesn't works - "Loading..." but no scripts displayed

Using the extension with default json example file doesn't work:

~/.config/ulauncher/scripts.json

{
  "name": "Edit_scripts",
  "description": "Select to edit scripts",
  "icon": null,
  "script": "xdg-open",
  "default_arguments": [
    "~/.config/ulauncher/scripts.json"
  ]
}

In logs:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Client.py", line 54, in on_message
    self.extension.trigger_event(event)
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event
    action = listener.on_event(event, self)
  File "/home/bruno/.local/share/ulauncher/extensions/com.github.nastuzzisamy.ulauncher-custom-scripts/main.py", line 32, in on_event
    results, params = launcher.get_first_scripts()
  File "/home/bruno/.local/share/ulauncher/extensions/com.github.nastuzzisamy.ulauncher-custom-scripts/src/scripts.py", line 36, in get_first_scripts
    return self.config[:MAX_SCRIPTS], []
TypeError: unhashable type: 'slice'

Solution

The json must be an array

"Loading..." during running any command

Just pasted one of the examples to scripts.json

[
    {
        "name": "Hibernate",
        "description": "Start hibernate",
        "icon": null,
        "script": "systemctl",
        "default_arguments": [
		"hibernate"
        ]
    },
    {
      "name": "Lock & hibernate",
      "description": "Lock and hibernate",
      "icon": null,
      "script": "lock_gnome_session && systemctl",
      "default_arguments": ["hibernate"]
    },
    {
      "name": "Restart Gnome",
      "description": "Restart gnome",
      "icon": null,
      "script": "busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart(\"Relancement de Gnome\")'",
      "default_arguments": []
    }
]

I'm not able to take a screenshot.

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.