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

Filter domain if the focused app is a browser #104

Open
BarbUk opened this issue Jan 14, 2025 · 2 comments
Open

Filter domain if the focused app is a browser #104

BarbUk opened this issue Jan 14, 2025 · 2 comments

Comments

@BarbUk
Copy link

BarbUk commented Jan 14, 2025

It's more of a discussion than an issue.

I wanted a way to filter rofi-rbw with the domain of my current tab if the focused app is a browser.

Reading the documentation, it's possible using:

domain=google.com
rofi-rbw --selector-args="-filter '${domain} '"

I've hacked a quick script that:

  • check if the focused window is a browser
  • focus the url bar
  • copy the current url
  • clear the clipboard
  • use the domain from the url to filter rofi-rbw output

It's only compatible with X11, and working as expected with chrome only at the moment.

@fdw
Copy link
Owner

fdw commented Jan 16, 2025

Hey, thank you! 🙂

Is there an advantage to calling rofi-rbw instead of directly going to rbw? Do you want the manual selection?

If so, can/should we make it easier, for example by offering a --filter-url parameter?

@BarbUk
Copy link
Author

BarbUk commented Jan 20, 2025

Is there an advantage to calling rofi-rbw instead of directly going to rbw? Do you want the manual selection?

yes, the manual selection from rofi-rbw is easier to work with than calling rbw directly.

If so, can/should we make it easier, for example by offering a --filter-url parameter?

--filter is a rofi option:

Image

Calling it with a --filter-url parameter could simplify discovery of this option.
I'm not sure if other selector (like wofi) have a similar option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants