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

Show all open windows on all desktops #22

Open
danixland opened this issue Nov 4, 2024 · 13 comments
Open

Show all open windows on all desktops #22

danixland opened this issue Nov 4, 2024 · 13 comments
Labels
done except styles feature New feature or request

Comments

@danixland
Copy link

Hi,
is it possible to add the option to show all open windows on all desktops on i3wm?

@tuurep
Copy link
Owner

tuurep commented Nov 4, 2024

Hello, good suggestion, off the top of my head I don't think that will be too much trouble!

It would probably work the same regardless of window manager

The largest question in my mind is:

  • if we click on a window that's on a different desktop, does it already switch to the correct desktop, or does the raise function need some changes?

I can start working on that maybe later this week

@tuurep tuurep added the feature New feature or request label Nov 4, 2024
@tuurep
Copy link
Owner

tuurep commented Nov 5, 2024

Did you have an idea about how to sort the list with all desktops?

Gives me an idea that the desktops could have their own segments like:

firefox · discord | steam · firefox | alacritty · kitty
^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^
    desktop 1           desktop 2         desktop 3

Could then make the desktop separator string | configurable as well

(Then each segment could sort within itself according to sort_by)

@danixland
Copy link
Author

Hi, thanks for your reply,
regarding the sorting, I wouldn't sort by desktop, I'd probably leave the windows unsorted or sorted by the sort_by directive, but if you wanted to have the option to sort by desktop, I'd keep it simple and sort by desktop number, and inside each "desktop group" use sort_by as you said.

Maybe you could add the option to define a color for each desktop, so that you can determine which window belongs to which desktop, and then you can use bold for the current window and sort of gray out all the others.
Maybe you could also provide an option for a different divider in the "desktop group", something like you displayed in your example in the previous answer.

Hope this helps. Let me know if I can help

@tuurep
Copy link
Owner

tuurep commented Nov 7, 2024

Thanks, in that case let's first do it the simplest way possible in this issue:

  • Make all windows from all desktops appear
  • Make sure the raise action works by switching desktop too

Then we can follow up with

  • desktop-specific colors
    • not sure if this is hard because some WMs allow infinite/dynamic amount of desktops
firefox · discord | steam · firefox | alacritty · kitty
^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^
    desktop 1           desktop 2         desktop 3

^ In some way I really like this idea myself, but it's possible it could prove too complicated. Definitely opening a new issue for this later so let's not worry about it.

@tuurep
Copy link
Owner

tuurep commented Nov 11, 2024

I haven't yet had the time for this but it's on my mind for sure

Let me know if you wanted to do a PR

Otherwise, I'll get to it whenever I can :)

@danixland
Copy link
Author

I haven't yet had the time for this but it's on my mind for sure

Let me know if you wanted to do a PR

I wish I could help you but I have no idea where to start with C.

Otherwise, I'll get to it whenever I can :)

No rush, keep me posted in case you need help with testing 😃

@tuurep tuurep mentioned this issue Dec 29, 2024
1 task
@tuurep
Copy link
Owner

tuurep commented Dec 29, 2024

Hey @danixland are you still interested in this?

I have a draft going on at #23, listing all desktop's windows works with all_desktops = true. You can test that in the branch if you want.

Looking into raise switching desktops next.

And I have somewhat of an idea for desktop-specific color configuration, but more on that later.

Update:

raise desktop switching is done! (clicking on a window from a different desktop should switch the desktop, and then raise the window)

I've tested this as well as I can on Openbox (my setup) and works great. If you're able to test would be great help. Remember to set all_desktops = true in config.toml if you do, since the default is false.

If this is ok, all that remains will be colors. My idea for that would be:

  • Be able to set these separately for each desktop_id:

    active_window_fg_color = "none"
    active_window_bg_color = "none"
    active_window_ul_color = "none"
    
    inactive_window_fg_color = "#808080"
    inactive_window_bg_color = "none"
    inactive_window_ul_color = "none"
    
  • if a certain desktop doesn't have these set, the 'global' ones would be used instead

Feel free to criticize this idea

@tuurep
Copy link
Owner

tuurep commented Jan 7, 2025

I'm thinking I could allow overriding any1 of the top-level options for different desktops like:

[desktops.1]
inactive_window_fg_color = "#ff0000"
# any other keys...

[desktops.2]
inactive_window_fg_color = "#0000ff"
# any other keys...

falling back into the top-level setting if not specified.

Feels like a good idea, but I'll have to make sure it doesn't make the whole program needlessly complicated. Should be a matter of figuring out how to parse the TOML nicely in the C code.

Footnotes

  1. exceptions: sort_by, max_windows, all_desktops. The first two could still make sense when all_desktops = false however, but let's not consider this right now.

@danixland
Copy link
Author

hi, and belated happy new year.. I'll test this afternoon and I'll report back.. cheers..

@tuurep
Copy link
Owner

tuurep commented Jan 11, 2025

Happy new year 😄

Thanks, the desktop config part may be a challenge but I'll try to solve it.

If you can confirm that clicking on a window switches desktop in i3, would be great.

Any other ideas/feedback welcome.

@danixland
Copy link
Author

great work man!!! It shows all windows from all different desktops and clicking on one from a different desktop raises it!!

@tuurep
Copy link
Owner

tuurep commented Jan 11, 2025

Awesome!

The functionality is there, just gotta add the color customization (#22 (comment)). I don't know how long this will take me 😄 I'll let you know.

Oh yeah, now that every window has its desktop attached, it opens up possibilities to do more with desktops, so this feels like a pretty good change already.

(the reason they didn't have it before is because I strictly use only 1 desktop myself)

@tuurep
Copy link
Owner

tuurep commented Feb 28, 2025

The desktop color config isn't happening rapidly because I feel like I have to make a bit of a more complicated than usual decision on how the config is gonna work for it (but the idea could work),

Probably going to take care of these issues first:
#26
#24
#27 (got a particularly good idea here I think)

Then get back to trying to solve this.

Update: I merged #23 to master because it was left in such a stable point, I don't see why I shouldn't 😄

Will follow up with a separate PR with the config related work.

tuurep added a commit that referenced this issue Feb 28, 2025
Issue: #22
- Adds option to show windows from all desktops (default: false)
- Cleans up the structure of `click-actions` folder
- Fixes `raise` so that it can switch desktop, if necessary
@tuurep tuurep changed the title show all open windows on all desktops on I3WM Show all open windows on all desktops Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done except styles feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants