xmonad / xmonad-testing

Stack/cabal setup for testing xmonad* and configurations
BSD 2-Clause "Simplified" License
27 stars 21 forks source link

Add getting started sample config #2

Closed ghost closed 7 years ago

ghost commented 7 years ago

@pjones, as promised, here's the sample config to use for the modern getting started guide.

ghost commented 7 years ago

We should probably provide a generic xmobarrc as well.

ghost commented 7 years ago

Addressed review comment in a fixup commit.

ghost commented 7 years ago

@pjones, should we be concerned that XMonad.Config.Desktop is labeled as Portability:unportable and Stability:unstable?

pjones commented 7 years ago

A few more change requests:

  1. fullscreenEventHook, avoidStructs, manageDocks, and friends shouldn't be needed now that we are using desktopConfig.
  2. Why add another key binding for recompiling xmonad when there is already a default binding for that?
  3. After addressing issue 1, we probably don't even need a manageHook or handleEventHook in this config.

As far as X.C.Desktop, I think most other -contrib modules have stability set to unstable (and unportable since this only works on OSes with xorg). No changes should be needed.

ghost commented 7 years ago

fullscreenEventHook, avoidStructs, manageDocks, and friends shouldn't be needed now that we are using desktopConfig

I've never used desktopConfig. Does it require anything from desktop environments to function?

Why add another key binding for recompiling xmonad when there is already a default binding for that?

Because the built-in didn't work for me the last time I tried it but this explicit one did. I can try to omit it and see if it works now.

After addressing issue 1, we probably don't even need a manageHook or handleEventHook in this config.

I can try your suggestions and see if they work.

pjones commented 7 years ago

I've never used desktopConfig. Does it require anything from desktop environments to function?

Nope. It just adds EWMH and ManageDocks support. Two things that everyone would expect XMonad to do out of the box.

geekosaur commented 7 years ago

On Tue, Nov 15, 2016 at 5:29 PM, Tuncer Ayaz notifications@github.com wrote:

However, seeing how this config, like other configs, suffers from windows mis-calculating their actual size when returning from fullscreen

This is a longstanding and hard to fix bug in xmonad core. It's tracking sizes and positions, but inconsistently with respect to adding the border, so windows tend to either move or change size or both by 2*borderWidth (or by that as modified by being tracked as a RationalRect instead of actual pixels in some cases). Fixing it basically means adding either a window property or an internal window-associated structure that stores the original size, and rewiring the core to use that consistently instead of trusting sizes that depending on context may or may not have been modified by borderWidth.

This is also why some floating windows "creep" by an amount related to the borderWidth under some circumstances.

brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

geekosaur commented 7 years ago

On Tue, Nov 15, 2016 at 5:38 PM, Tuncer Ayaz notifications@github.com wrote:

@pjones https://github.com/pjones, should we be concerned that XMonad.Config.Desktop is labeled as Portability:unportable and Stability:unstable?

The portability and stability fields are defined, somewhat poorly, by the ecosystem. All of xmonad is "nonportable", because it will not work on Windows (heavily dependent on POSIX process model). Stability field was never well defined and is these days considered meaningless.

brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

geekosaur commented 7 years ago

On Tue, Nov 15, 2016 at 7:03 PM, Tuncer Ayaz notifications@github.com wrote:

I've never used desktopConfig. Does it require anything from desktop environments to function?

It's basically defaultConfig with EwmhDesktops and ManageDocks already applied. It does not require a desktop environment, rather it makes xmonad act just enough like a desktop environment to satisfy programs that expect one.

brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

geekosaur commented 7 years ago

On Tue, Nov 15, 2016 at 6:39 PM, Peter J. Jones notifications@github.com wrote:

(and unportable since this only works on OSes with xorg)

cygwin has an xorg port, plus there are environments like eXceed. The process management is what does not port very well; xmonad does a number of things that are even harder to emulate than fork() (and fork() emulation would itself probably make xmonad unusable).

brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

ghost commented 7 years ago

@pjones, with the suggested desktopConfig changes applied, the config doesn't work as before. For instance, xmobar isn't respected and not visible at the top. Didn't try the other features.

pjones commented 7 years ago

@tuncer Take a look at this other configuration. It is using desktopConfig and works properly.

ghost commented 7 years ago

I'm having trouble re-integrating manageHook for floating rules and logHook for xmobar output, but struts seems to work, so that's good. If you want to, you can push a fixup commit to this pr's branch, since you have write access to the repo.

pjones commented 7 years ago

@tuncer Thanks for the config. I've taken it and turned it into this for the upcoming release.

ghost commented 7 years ago

@pjones, great. How do we present it as part of getting started steps on xmonad.org? Looks like we need to streamline http://xmonad.org/intro.html and http://xmonad.org/download.html and trim it down.