Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Feb 7, 2020
1 parent b2a4d32 commit 24607c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# KRunner Bridge

TODOS:
- Use signals for processes

**Write krunner python plugins the quick way.**

<del>Plasma 5 stopped exposing KDE Framework API to script languages (except QML) for the purpose of so-called stability (but it is not at all stable, crashing from time to time). But this brings some horrible consequence that writing krunner plugins becomes time-consuming. You have to write long C++ code, configure your C++ building toolchain, and compile them each time you modify something.</del>
Expand Down Expand Up @@ -75,6 +72,7 @@ For more practical examples, check out `example_search.py`. It searches in my us

## Configuration

*Note: Whenever you change the config file KRunner has to be restarted: `kquitapp5 krunner;kstart5 krunner`*
### Timeouts
In the `krunner_bridge.desktop` file are already the config entries for the timeouts configured, if you want them
to take indefinitely long, you can set the value to -1.
Expand Down Expand Up @@ -142,6 +140,13 @@ by default it is detached. If set to false you can set a timeout as described ab
* A: Just append one more config entry (line or group), where the key anything unique.
KRunner bridge searches all properties and groups starting with `X-KRunner-Bridge-Script`.

* Q: How can I update this plugin after with the new features from https://github.com/Shihira/krunner-bridge/pull/3 ?
* A: You should remove the python api file located at ~/.local/share/kservices5/krunner_bridge.py.
After this you can install the new version and add the scripts to the config file.
If you only use python scripts, they should be compatible, otherwise you have to change the json input
from standard input to the first program argument.


-----

* Q: Is it possible to move my scripts somewhere else?
Expand Down
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

cd python
python3 setup.py install
python3 setup.py install --user
cd ..

if [[ ! -d build ]]; then
Expand All @@ -23,4 +23,3 @@ install ./debug_helper.sh $HOME/.local/share/kservices5

kquitapp5 krunner 2> /dev/null
kstart5 --windowclass krunner krunner > /dev/null 2>&1 &

20 changes: 0 additions & 20 deletions install_example.sh

This file was deleted.

1 change: 0 additions & 1 deletion krunner_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ void KRunnerBridge::match(Plasma::RunnerContext &ctxt) {
}

// Evaluate output of the scripts
// TODO Solve using signals
for (int i = 0, processCount = processes.count(); i < processCount; ++i) {
// Kill processes if context is not valid anymore
if (!ctxt.isValid()) {
Expand Down

0 comments on commit 24607c1

Please sign in to comment.