davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.04k stars 609 forks source link

When starting, script mode blocks until script exits #947

Open ralismark opened 5 years ago

ralismark commented 5 years ago

Version

Output of rofi -v

Version: 1.5.2

Configuration

Output of rofi -help: https://gist.github.com/ralismark/b7b92d41387c4d690a08c258ee7904e1

Launch Command

rofi -no-config -show script:./test

Contents of ./test:

#!/bin/sh
seq 50
sleep 5
seq 51 100

Steps to reproduce

  1. Create ./test with above contents and make executable
  2. Run rofi -no-config -show script:./test in same directory

What behaviour you see

What behaviour you expect to see

DaveDavenport commented 5 years ago

Yes that is currently as designed.

It is on my todo to improve, but not completely trivial.

tangxinfa commented 5 years ago

It looks like all script will executed even if we don't show it

rofi -modi "run,ssh,test:sleep 10" -show run

With the previous example, rofi will block 10 seconds.

I wrote a translate plugin by default translate primary selection, will block rofi many seconds

DaveDavenport commented 5 years ago

It looks like all script will executed even if we don't show it

This is correct.

I wrote a translate plugin by default translate primary selection, will block rofi many seconds

Plugins (not scripts) can do any asynchronious behavior they want. This is up to their developers.

Rofi is mend to be a quick launcher/menu, if you have something that takes seconds (blocking or not), it is the question if a rofi mode is the right tool for it.