nastuzzisamy / ulauncher-custom-scripts Goto Github PK
View Code? Open in Web Editor NEWExtension to execute custom scripts in Ulauncher
License: MIT License
Extension to execute custom scripts in Ulauncher
License: MIT License
How do you use this ulauncher extension?
Thanks.
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
Hello,
Can you put 2 or 3 really simple examples on github and/or the extension directly?
Thanks
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"?
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!
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'
The json must be an array
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.