Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'-sep' option for script modi #1041

Closed
vredesbyyrd opened this issue Dec 12, 2019 · 5 comments
Closed

'-sep' option for script modi #1041

vredesbyyrd opened this issue Dec 12, 2019 · 5 comments

Comments

@vredesbyyrd
Copy link

vredesbyyrd commented Dec 12, 2019

Version

1.5.4-1

Launch Command

rofi -modi "ffh:/home/clu/experiments/fire-hist/ffh.lua" -show ffh -async-pre-read 30 -eh 2 -sep '^'

Steps to reproduce

  • run rofi

What behaviour you see

  • Since '-sep' is dmenu specific, option is ignored.

What behaviour you expect to see

With rofi in dmenu mode, you can use the -sep and -eh options to display a single selection across a multiple lines, e.g echo -en "a\nb^c\nd" | rofi -dmenu -sep '^' -eh 2. IMO, this can be a nice way to display data. I do this for a firefox tab switcher script.

rofi-2019-12-12-1609-00000

I have been wanting to display information this way but with modi scripts rather than -dmenu. I do not think its possible at the moment, maybe programmatically in the script itself but I have not had any success yet.

Could the -sep option or a similar function be added to mode scripts?

Thanks for your time.

@DaveDavenport
Copy link
Collaborator

How is that going to work if you have multiple script modi that require different 'sep'.

@vredesbyyrd
Copy link
Author

How is that going to work if you have multiple script modi that require different 'sep'.

I asked myself that after posting this. The best I could think of is an option similar to -display-{mode} string. With my previous launch command example...

rofi -modi "window,run,ffh:/home/clu/experiments/fire-hist/ffh.lua" -show ffh -separator-ffh "^"

Although it would have the same function as the dmenu option -sep maybe a distinct name to differentiate it makes sense, -delimiter-(mode) string?

I assume I am overlooking important considerations and perhaps this level of control should be left for -dmenu or c plugins. There are just certain use cases where I prefer the mode scripts over -dmenu.

@DaveDavenport
Copy link
Collaborator

Added option to change delimiter in script mode.

@vredesbyyrd
Copy link
Author

Right on, thank you for implementing this. I only tested it briefly and all seems to work well. When time abides I have a script in mind that will utilize this option so I'll test more than.

Much appreciated, closing.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants