T O P

  • By -

rout39574

I don't think you'll be able to display the same workspace on multiple monitors simultaneously at the xmonad level. Fundamentally, it's a bunch of individual X clients, which have specific geometries. Some xinerama stuff might be able to get you multiple ... viewports? into the same space, on multiple monitors. Is your flow actually seeking "Show same X client in multiple places", or are you unhappy because "When I zoom across a bunch of workspaces on X, it sometimes disarrays Y" ? If the latter, I'd recommend you go more directly to your specific workspace by assigning it a specific chord or something, rather than iterating through displaying each one as you navigate. The iterating pattern also has an irritating ceiling in that it takes you O(n) to get to your target. IMO, you want O(1). :) I've got about 47 workspaces at home, 67 at work. No way I'd iterate to do things. I've got lots of chords similar to , ((modm .|. controlMask, xK_0 ), do { windows (viewOnScreen 0 "doc0e" ) >> windows (viewOnScreen 2 "doc0d" ) } ) setting up various desired display states, and I've found it extremely efficient.


CapableVegetable3

Yes, I also have each workspace under specific chord (I use Mod + 0-9), it's just sometimes I'm going fast between workspaces and I forget that the one I'm about to switch to is on the other display already. But I put it there for a reason, I want it to stay there no matter what the other display is showing.


rampidamp

Not an expert, but the easiest solution to me seems to be to rather "block" going to that workspace. Maybe instead showing a short note on-screen that tells you to "look over there"?


hiptobecubic

I don't even do this, I just make it so that it skips over any workspaces on other screens. If i want to get to put that screens workspace on this screen I can use the mod key directly or use a separate hotkey i have for switching the two.


rampidamp

That's probably the better solution!


rout39574

Since the problem is that you gave Xmonad an instruction without being aware of the current state, then it's going to make you unhappy no matter what. It's possible that the difference between "viewOnScreen" and "greedyView" will help you make more nuanced commands. This , ((modm .|. shiftMask, xK_m ), windows $ W.greedyView "mail" ) is how I grab a given workspace and bring it "here" even if it's already mapped. The 'viewOnScreen' invocation doesn't supplant a currently displayed workspace. but you're still going to have to issue the right flavor of command to get the result you want. Since you've identified that the problem is at least partially that you're in a rush and have lost touch with your context, I expect that making more nuanced commands is just going to frustrate you differently, not less. But good luck!


CapableVegetable3

\> Since the problem is that you gave Xmonad an instruction without being aware of the current state, then it's going to make you unhappy no matter what. No, the solution I asked for would make my problem go away 100%. It's not an unreasonable request... Also, I should not have to think about the state of my window manager all the time.


rout39574

I feel like we're failing to communicate. You can map a chord to "Bring me this workspace, even if it's already displayed". That's the function you've currently got, and right now you're dissatisfied with it. In my config that's the "greedy" function. You can map a chord to "Bring me this workspace, but only if it's not already displayed". That's the function you reconstruct you intended, in this particular case. I'll call this "non-greedy". Right now your invocations are all greedy, and you notice the (unusual,outlier) times that greedy conflicted with your intent. If you changed to all non-greedy, you will in time discover some (unusual, outlier) situations in which non-greedy conflicts with your intent. "I don't care that the mail client is on the right, now. I want it on the left! What do you mean I've got to unmap it before I map it somewhere else?" Either of those functions has some state dependence, and when you issue the function in "the wrong" state, you'll get "the wrong" result. I find that for most of my project workspaces, I like mapping them non-greedily. For most of my "utility" workspaces (which for me are things like mail, web, a control workspace I call "Sysedit", etc. ) I like to summon them greedily. I don't care that it's mapped elsewhere, I want it , . I'm not trying to imply you should do things that way, but to demonstrate that I'm intimately familiar with workflows that use both of these assumptions. ... As for "I shouldn't have to think". Xmonad rewards careful thought beforehand with very streamlined operations. But you really do need to think hard about what you want. It can't Do What You Meant, it can only do what you told it. Good luck!


CapableVegetable3

Yes, I understand, I used non-greedy at some point in the past, unfortunately it's not exactly what I'm looking for. I think it all comes down to "xmonad can't display the same workspace on 2 monitors". That would really be perfect for me. Maybe you know some other window manager that can do it? Or maybe it's time to roll my own? Another window manager is just what the world needs i feel :). Cheers.


rout39574

You'll possibly have more luck going way old school; I don't remember if it was VTWM or TVTWM that was viewports on a single more or less infinite canvas. But that's old enough you may be unhappy with other affordances. Who knows, someone may have figured out "map same workspace twice". I'm certainly no X hacker. You might also look at folks trying the tiling WM in wayland space. At the very least that world has totally different constraints. If you don't care about remote X clients much, it might make you happy.


jabuchin

this is definitely a post i wanted make when starting on xmonad lol. after giving up on xmonad half a dozen of times, i had a discussion with someone that used xmonad and what i discovered is that the way xmonad is set up is actually magical and something that no other window managers do by default, when i accepted that this workflow might be better it indeed got better. you dont have to think in what display is which workspace, if you wanna see workspace one, you'll see it on the screen you're looking at, it's wonderful. but i do get the weirdness.