1. 15

for any lobsters that might use xmonad; i’m wondering, what cool setups do you have?

in particular, one that i’m often wondering about, is what’s a funky way to manage, say, running a script to spin up a website, and the browser to interact with it. it’s crazy that it should take two screen locations for this. maybe someone has come up with a cool hack along these lines? also interested to know any cool things you’ve done!

i don’t have any particularly interesting setup - https://github.com/silky/dotfiles/tree/master/.xmonad - aside from maybe the mouse back-forward buttons being used to rotate around available screens.

  1.  

  2. 2

    i3wm user here. If I understand correctly, you basically want to hide windows that you don’t need at the moment. I don’t know any Xmonad-specific way, but hopefully it’s similar enough to i3.

    • I have an absurd amount of workspaces. 30 on the primary and 10 on the secondary monitor, so 40 in total. Workspaces behind the shortcuts that are hardest for me to hit are typically used for these long running jobs that don’t need frequent checking.

    What currently troubles me the most is that sometimes it’s a little too hard to navigate through these workspaces, and I’m kind of looking for some “superworkspace” mechanism (inspired by KDE Activities) that would allow me to keep everything organized.

    • Sometimes, I switch to tabs. Tabs in i3 are basically what a taskbar is in traditional desktops, except you may run into problems when navigating “directionally” to other windows or monitors. You see, hitting something like $mod+left just moves focus to the left. Coincidentally, in tabbed container it switches to the left tab. When I’m on the right tab and want to go to the left (window, container), but without first switching to the left tab, I’ve got no way to do that. I would need to disable this behavior and have specific shorcuts for switching between tabs (e.g. Alt+Tab).

    If I could somehow achieve this, it would be a perfect solution for what you describe. Perhaps it would be easier to achieve in Xmonad than in i3 due to the scriptability.

    1. 2

      When I’m on the right tab and want to go to the left (window, container), but without first switching to the left tab, I’ve got no way to do that.

      You can first move the focus to the parent (https://i3wm.org/docs/userguide.html#_focusing_moving_containers), and then move left.

      1. 2

        You’re right, thanks for clarification. In any case, this is still one more step than I would want it to be.

      2. 2

        Damn, I completely forgot about scratchpad workspace!

      3. 2

        in particular, one that i’m often wondering about, is what’s a funky way to manage, say, running a script to spin up a website, and the browser to interact with it. it’s crazy that it should take two screen locations for this. maybe someone has come up with a cool hack along these lines? also interested to know any cool things you’ve done!

        Could you explain in more depth?

        (I’ll reply to this with my xmonad when I’m on the pc that has it, or I’ll just edit this post.)

        1. 1

          yeah, sorry, it wasn’t a great explanation :)

          the main scenario is this:

          1. i’m writing some javascript app; and i need to run npm run dev, or similar. it stays open, and tells me about errors.
          2. i click around in the app; and i make code changes. arguably, i only need two windows allocated for this task. if i happen to use an ide, and have it set up well, i can do it with just two; getting all my errors via the ide somehow. but suppose i don’t do that, then i need 3 windows.

          one (not great) solution i often think about, is having 3 windows, but have the one with the errors be really small, most of the time, and then allow for it to be increased, as i have the will to read the errors.

          this is such a common pattern for me across so many languages and environments, that i’m thinking there has to be a good way to solve it within the window manager. either kind of saying “this window is the child of that”, and then having that relationship determine who is bigger; and using that idea to kind of push those two independent windows into one “region” within the xmonad window manager.

          does that make more sense?

          it’s just the idea that in almost all my dev, i have some windows that are clearly less important, and thus should be small, and perhaps even invisible, until such time as i want them. (for example, with some of my other projects, i just move the window to a “dead” workspace, that i never look at, and then i’ll occasionally have to drop back and look at it, if the error is beyond my ability to fix by guessing why my app didn’t update.

          1. 2

            I have two ways of doing this:

            1. Making my server/error/debug terminal a floating window, adjusting the size to something comfortable, then simply raising it above and lowering it below my browser/ide/both with a ‘toggle to raise/lower’ shortcut when I need it.
            2. Not assigning my terminal window to any workspace/group, then hiding it completely, and when I need it I search for it and bring it to the foreground using window title search shortcut, then hide it again. If I have many similar terminals, I give it a label using ‘label window’ shortcut before hiding it.

            I use cwm, but I’m sure something very similar is possible in xmonad or i3.

            1. 2

              interesting thoughts.

              i kind of like your idea of perhaps a window that is nowhere, and then bringing that to the fore with a quick search. i might have a bit of a think of a cool way to do that.

              maybe that, combined with the window coming to the foreground as floating-only, and taking up, say, just some space at the top or the bottom of the screen, temporarily. that could be really neat.