davatorium / rofi

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

can't add customize mode to the list of modi. #894

Closed maojunxyz closed 5 years ago

maojunxyz commented 5 years ago

Version

Version: 1.5.2

Configuration

https://gist.github.com/archmj/8c85a36cfb690a86769e86b8ac90b041

Launch Command

Rofi is unsure what to show.
Please specify the mode you want to show.

    rofi -show {mode}

The following modi are enabled:
 * window
 * run
 * ssh

The following can be enabled:
 * windowcd
 * drun
 * combi
 * keys

To activate a mode, add it to the list of modi in the modi setting.

Steps to reproduce

The following modi are enabled:

The following can be enabled:

What behaviour you see

(process:23790): Helper-WARNING **: 14:59:16.668: Failed to set lock on pidfile: Rofi already running?

(process:23790): Helper-WARNING **: 14:59:16.668: Got error: -1 Socket operation on non-socket



## What behaviour you expect to see

*  Use rofi -show custom mode
I want the custom mode to be used like the built-in mode, which works every time.
Just like can use this customize mode  `rofi -show teiler` directly.
DaveDavenport commented 5 years ago

Unsure about your story, if teiler is this one (https://github.com/carnager/teiler) then teiler is a 'dmenu' script, not a mode.

You should not be able to use this a mode, and it will try to create a nested instances of rofi. This will fail. (last posted error message).

maojunxyz commented 5 years ago

Yes, I want to use a custom script and launch it in rofi.Just like you described here.

https://github.com/DaveDavenport/rofi#dmenu-replacement.I don't understand how you started teiler in rofi.

I can start it in the rofi by command like rofi -modi "window,run,ssh,teiler:./teiler" -show teiler on the command line, but I will have the error message described above and the interface information of the teiler will not be displayed properly.

I want to configure teiler to rofi's startup list so that I can quickly switch between useful option lists using shortcut keys.

Just like the configuration file below, these three are started by default.

 rofi.modi:                           run,ssh,teiler

I use rofi instead of dmenu as a launcher in i3wm.

# start program launcher
 it worked
bindsym $mod+d exec rofi -modi "teiler:/home/maojun/Documents/GitHub/teiler/teiler" -show run

But I still have the error description after startup.

(process:23790): Helper-WARNING **: 14:59:16.668: Failed to set lock on pidfile: Rofi already running?

(process:23790): Helper-WARNING **: 14:59:16.668: Got error: -1 Socket operation on non-socket

If I run the ./teiler script directly, the operation is normal.

maojunxyz commented 5 years ago

This is my debug log information G_MESSAGES_DEBUG=all rofi -modi "window,run,ssh,teiler:/home/maojun/Documents/GitHub/teiler/teiler" -show teiler > rofi_debug.loghttps://gist.github.com/archmj/aaf00f61390eb43c7f61e3cfc8976812

DaveDavenport commented 5 years ago

Teiler is a dmenu script, not a mode. It will not work as a mode!

This is not a bug of rofi, or teiler, as it is not how teiler is intended to be used.

You should run teiler, by executing teiler directly.. Teiler will then call rofi (or dmenu).

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.