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

Does brotab know which window has focus? #67

Open
bjohas opened this issue Feb 19, 2022 · 2 comments
Open

Does brotab know which window has focus? #67

bjohas opened this issue Feb 19, 2022 · 2 comments
Assignees

Comments

@bjohas
Copy link

bjohas commented Feb 19, 2022

Related to #65, does brotab know which window has focus? Or does brotab only know which tab (within a window) is active?

@bjohas
Copy link
Author

bjohas commented Feb 20, 2022

If I'm interpreting this correctly https://stackoverflow.com/questions/8451189/chrome-windows-getcurrent-is-not-returning-the-list-of-opened-tabs, then it looks like chrome.windows.getCurrent would get the window:

chrome.windows.getCurrent(function(win)
{
    chrome.tabs.getAllInWindow(win.id, function(tabs)
    {
        // Should output an array of tab objects to your dev console.
        console.debug(tabs);
    });
});

It wonder whether it may be possible to implement that? I.e., brotab active would get the active tab in each window, but brotab activewindow would get the active window.

@balta2ar balta2ar self-assigned this May 29, 2022
@bjohas
Copy link
Author

bjohas commented May 30, 2022

Just to add that, as far as I can see, this function would just be:

bt query +currentWindow

I.e., the command already exists.

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

No branches or pull requests

2 participants