Discussion:
[xmonad] Code Freeze for v0.12 and Time to Test!
Peter Jones
2015-12-11 18:30:49 UTC
Permalink
Except for bug fixes, I'd like to call for a freeze on commits to the
xmonad and xmonad-contrib repositories until we get a release out.

At this point I think we have everything we need in place. Let's take
advantage of the weekend and let as many people as possible test 0.12.
Then on Monday I'll open pull requests from my repos and we can tag and
release.

For reference, the following repositories have the latest changes plus
all of my documentation updates:

https://github.com/pjones/xmonad/tree/release-0.12

https://github.com/pjones/xmonad-contrib/tree/release-0.12

I also put together a stand-alone repository to help me test xmonad and
xmonad-contrib using GHC 7.10.2, 7.8.4, and 7.6.3. (We should plan on
making another release in January to cover 7.10.3.)

My testing repository can be found at:

https://github.com/pjones/xmonad-test/tree/release-0.12

So, please go forth and read the docs and compile the code!
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
gansteed
2015-12-12 04:00:57 UTC
Permalink
Actually, ArchLinux is using GHC 7.10.3 now.
Post by Peter Jones
Except for bug fixes, I'd like to call for a freeze on commits to the
xmonad and xmonad-contrib repositories until we get a release out.
At this point I think we have everything we need in place. Let's take
advantage of the weekend and let as many people as possible test 0.12.
Then on Monday I'll open pull requests from my repos and we can tag and
release.
For reference, the following repositories have the latest changes plus
https://github.com/pjones/xmonad/tree/release-0.12
https://github.com/pjones/xmonad-contrib/tree/release-0.12
I also put together a stand-alone repository to help me test xmonad and
xmonad-contrib using GHC 7.10.2, 7.8.4, and 7.6.3. (We should plan on
making another release in January to cover 7.10.3.)
https://github.com/pjones/xmonad-test/tree/release-0.12
So, please go forth and read the docs and compile the code!
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Ondřej Súkup
2015-12-12 13:58:52 UTC
Permalink
in January/February maybe another release to cover 8.0.1 :)

7.10.3 is mainly bugfix ==> +- same results of test as 7.10.2
Post by gansteed
Actually, ArchLinux is using GHC 7.10.3 now.
Post by Peter Jones
Except for bug fixes, I'd like to call for a freeze on commits to the
xmonad and xmonad-contrib repositories until we get a release out.
At this point I think we have everything we need in place. Let's take
advantage of the weekend and let as many people as possible test 0.12.
Then on Monday I'll open pull requests from my repos and we can tag and
release.
For reference, the following repositories have the latest changes plus
https://github.com/pjones/xmonad/tree/release-0.12
https://github.com/pjones/xmonad-contrib/tree/release-0.12
I also put together a stand-alone repository to help me test xmonad and
xmonad-contrib using GHC 7.10.2, 7.8.4, and 7.6.3. (We should plan on
making another release in January to cover 7.10.3.)
https://github.com/pjones/xmonad-test/tree/release-0.12
So, please go forth and read the docs and compile the code!
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Peter Jones
2015-12-14 16:05:30 UTC
Permalink
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested compilers
list in the cabal file.
Post by Ondřej Súkup
in January/February maybe another release to cover 8.0.1 :)
7.10.3 is mainly bugfix ==> +- same results of test as 7.10.2
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
Tuncer Ayaz
2015-12-14 20:06:02 UTC
Permalink
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested compilers
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
Brent Yorgey
2015-12-18 20:52:43 UTC
Permalink
Sorry it took a little longer to get to this than I thought, I had a few
unexpected things to deal with at the end of the semester. But I think
everything looks good now and I'm about to pull the trigger and upload to
Hackage, unless anyone has any last minute questions/comments.
Post by Tuncer Ayaz
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested compilers
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Brent Yorgey
2015-12-18 20:59:15 UTC
Permalink
OK, well, I've tested everything and put v0.12 tags on both xmonad and
xmonad-contrib. However, it appears that only Adam Vogt has the power to
upload these packages to Hackage. Adam, could you add me and Peter as
uploaders/maintainers for those packages on Hackage? Thanks!

-Brent
Post by Brent Yorgey
Sorry it took a little longer to get to this than I thought, I had a few
unexpected things to deal with at the end of the semester. But I think
everything looks good now and I'm about to pull the trigger and upload to
Hackage, unless anyone has any last minute questions/comments.
Post by Tuncer Ayaz
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested compilers
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-12-18 21:18:51 UTC
Permalink
Hello Brent and Peter,

Hackage should accept your upload now.

Thanks for putting this release together

Regards
Adam
Post by Brent Yorgey
OK, well, I've tested everything and put v0.12 tags on both xmonad and
xmonad-contrib. However, it appears that only Adam Vogt has the power to
upload these packages to Hackage. Adam, could you add me and Peter as
uploaders/maintainers for those packages on Hackage? Thanks!
-Brent
Post by Brent Yorgey
Sorry it took a little longer to get to this than I thought, I had a few
unexpected things to deal with at the end of the semester. But I think
everything looks good now and I'm about to pull the trigger and upload to
Hackage, unless anyone has any last minute questions/comments.
Post by Peter Jones
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested
compilers
Post by Peter Jones
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Brent Yorgey
2015-12-21 19:15:43 UTC
Permalink
Thanks Adam! xmonad 0.12 is now on Hackage!
Post by adam vogt
Hello Brent and Peter,
Hackage should accept your upload now.
Thanks for putting this release together
Regards
Adam
Post by Brent Yorgey
OK, well, I've tested everything and put v0.12 tags on both xmonad and
xmonad-contrib. However, it appears that only Adam Vogt has the power to
upload these packages to Hackage. Adam, could you add me and Peter as
uploaders/maintainers for those packages on Hackage? Thanks!
-Brent
Post by Brent Yorgey
Sorry it took a little longer to get to this than I thought, I had a few
unexpected things to deal with at the end of the semester. But I think
everything looks good now and I'm about to pull the trigger and upload to
Hackage, unless anyone has any last minute questions/comments.
Post by Peter Jones
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested
compilers
Post by Peter Jones
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Brent Yorgey
2015-12-21 19:16:14 UTC
Permalink
Is there anything else that needs to happen? e.g. does the website need to
be updated?
Post by Brent Yorgey
Thanks Adam! xmonad 0.12 is now on Hackage!
Post by adam vogt
Hello Brent and Peter,
Hackage should accept your upload now.
Thanks for putting this release together
Regards
Adam
Post by Brent Yorgey
OK, well, I've tested everything and put v0.12 tags on both xmonad and
xmonad-contrib. However, it appears that only Adam Vogt has the power to
upload these packages to Hackage. Adam, could you add me and Peter as
uploaders/maintainers for those packages on Hackage? Thanks!
-Brent
Post by Brent Yorgey
Sorry it took a little longer to get to this than I thought, I had a
few unexpected things to deal with at the end of the semester. But I think
everything looks good now and I'm about to pull the trigger and upload to
Hackage, unless anyone has any last minute questions/comments.
Post by Peter Jones
Post by Peter Jones
If someone can explicitly state that all the xmonad + xmonad-contrib
tests pass under 7.10.3 then I'm happy to add it to the tested
compilers
Post by Peter Jones
list in the cabal file.
I didn't run tests, but fwiw I'm using xmonad + xmonad-contrib built
with 7.10.3.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Peter Jones
2015-12-21 21:08:08 UTC
Permalink
Post by Brent Yorgey
Is there anything else that needs to happen? e.g. does the website need to
be updated?
According to the TODO file this is what we have left:

* generate, and push website haddocks with xmonad-web/gen-docs.sh

* update #xmonad topic

* email announce
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
Tuncer Ayaz
2015-12-22 10:13:50 UTC
Permalink
Post by Peter Jones
Is there anything else that needs to happen? e.g. does the website
need to be updated?
* generate, and push website haddocks with xmonad-web/gen-docs.sh
* update #xmonad topic
* email announce
Maybe the announcement should end with a list of contributors. We can
begin with the git repos, and for the next release it might make sense
to include tickets as well, but I'm not sure about that. You could run
something like this on all repos and embed a single sorted list:

git log v0.11.. --format="%aN" --reverse \
| perl -e 'my %dedupe; while (<STDIN>) { print unless $dedupe{$_}++}'
adam vogt
2015-12-22 18:00:40 UTC
Permalink
Post by Tuncer Ayaz
Post by Peter Jones
Is there anything else that needs to happen? e.g. does the website
need to be updated?
* generate, and push website haddocks with xmonad-web/gen-docs.sh
* update #xmonad topic
* email announce
Maybe the announcement should end with a list of contributors. We can
begin with the git repos, and for the next release it might make sense
to include tickets as well, but I'm not sure about that. You could run
git log v0.11.. --format="%aN" --reverse \
| perl -e 'my %dedupe; while (<STDIN>) { print unless $dedupe{$_}++}'
We did list contributors in previous announces. Darcs cleaned up the list
using an .authorspellings file (checked into the contrib repo), but I can't
find an equivalent feature built-into git.

Regards,
Adam
Brandon Allbery
2015-12-22 18:02:32 UTC
Permalink
Post by adam vogt
We did list contributors in previous announces. Darcs cleaned up the list
using an .authorspellings file (checked into the contrib repo), but I can't
find an equivalent feature built-into git.
Git can use .mailmap but IIRC it's not as automated.
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
adam vogt
2015-12-22 21:43:21 UTC
Permalink
I've converted the .authorspellings to a .mailmap.
Post by Brandon Allbery
Post by adam vogt
We did list contributors in previous announces. Darcs cleaned up the list
using an .authorspellings file (checked into the contrib repo), but I can't
find an equivalent feature built-into git.
Git can use .mailmap but IIRC it's not as automated.
--
brandon s allbery kf8nh sine nomine associates
unix, openafs, kerberos, infrastructure, xmonad
http://sinenomine.net
Tuncer Ayaz
2015-12-28 13:51:20 UTC
Permalink
Is there anything else that needs to happen? e.g. does the website
need to be updated?
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.

import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutHints
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.Run(hPutStrLn, spawnPipe)

main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad $ defaultConfig
{
terminal = "xterm"
, manageHook = myManageHook <+> fullscreenManageHook <+> manageDocks
<+> manageHook defaultConfig
, layoutHook = fullscreenFloat $ fullscreenFocus $ layoutHints
$ smartBorders $ avoidStruts $ layoutHook defaultConfig
, handleEventHook = fullscreenEventHook
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc }
}
`removeKeysP`
[
"M-S-q"
, "M-p"
]
`additionalKeysP`
[
("M-S-q", confirmPrompt myXPConfig "exit" $ io exitSuccess)
, ("M-p", shellPrompt myXPConfig)
]
`additionalKeys`
[ ((mod4Mask, xK_q), spawn "xmonad --recompile && xmonad --restart") ]

myXPConfig = defaultXPConfig
{
position = Top
, promptBorderWidth = 0
, defaultText = ""
, alwaysHighlight = True
, font = "9x15"
}

myManageHook = composeAll
[
className =? "Pidgin" --> doFloat
, className =? "MuPDF" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "mpv" --> doFloat
]
Tuncer Ayaz
2015-12-28 13:55:31 UTC
Permalink
Post by Tuncer Ayaz
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
Accidentally omitted:

What's modern about it is that it uses

(1) the new config module
(2) built-in launcher prompt
(3) built-in prompt module for exit confirmation

It doesn't require dmenu and shows how to configure key bindings the
modern way.
Devin Mullins
2015-12-28 18:30:40 UTC
Permalink
Interesting, I didn't know about ConfirmPrompt! So many contrib modules.

FYI, you don't need to use removeKeysP to update existing key bindings, as
it's backed by a Data.Map - just the additionalKeysP will do.

Also, insert shameless plug for the even more modern X.C.Prime module - I
think it makes configs look nicer, personally.
Post by Tuncer Ayaz
Post by Tuncer Ayaz
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
What's modern about it is that it uses
(1) the new config module
(2) built-in launcher prompt
(3) built-in prompt module for exit confirmation
It doesn't require dmenu and shows how to configure key bindings the
modern way.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Tuncer Ayaz
2015-12-28 21:44:19 UTC
Permalink
Post by Devin Mullins
Interesting, I didn't know about ConfirmPrompt! So many contrib modules.
Yeah, there are many hidden gems in the contrib namespace.
Post by Devin Mullins
FYI, you don't need to use removeKeysP to update existing key bindings, as
it's backed by a Data.Map - just the additionalKeysP will do.
Thanks, good catch. Posed an update.
Post by Devin Mullins
Also, insert shameless plug for the even more modern X.C.Prime module - I
think it makes configs look nicer, personally.
How would a modified version, making use of that, look?
Alain Bertrand
2015-12-28 16:53:34 UTC
Permalink
Post by Tuncer Ayaz
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
import System.Exit
[snip quote]

Hi, all,
May I had a suggestion : add as a comment what is needed to use xmonad
with AZERTY keyboards, where defaults for 1234567890 are &é"'(-è_çà .
Ideally, one should have only to uncomment a few line to get xmonad to
work whith those keyboards.

Best regards,

Alain

(add sorry for the personal answer instead of the mailing-list)
Devin Mullins
2015-12-28 18:32:13 UTC
Permalink
The first result for https://www.google.com/search?q=xmonad+azerty looks
good. Does that work?
Post by Alain Bertrand
Post by Tuncer Ayaz
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
import System.Exit
[snip quote]
Hi, all,
May I had a suggestion : add as a comment what is needed to use xmonad
with AZERTY keyboards, where defaults for 1234567890 are &é"'(-Ú_çà .
Ideally, one should have only to uncomment a few line to get xmonad to
work whith those keyboards.
Best regards,
Alain
(add sorry for the personal answer instead of the mailing-list)
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Alain Bertrand
2015-12-28 19:56:24 UTC
Permalink
Post by Devin Mullins
The first result for https://www.google.com/search?q=xmonad+azerty
looks good. Does that work?
Yes, it does, but this is not what I am hoping for.
When I first tried xmonad, I encountered the link you pointed and used
it but unfortunately, each time I tried to add another customization to
my config file, it failed because for a non haskell-initiated user, it
is *cryptic*.
So I registered to this mailing list, got the help needed and can enjoy
the power of xmonad but one shouldn't have to register to a mailing list
to get xmonad working.
The file Tuncer Ayaz has proposed contains several interesting
customizations. To be fully useful, it should be very easy to use in
most default keyboards on earth.

Best regards,

Alain
Post by Devin Mullins
Post by Tuncer Ayaz
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
import System.Exit
[snip quote]
Hi, all,
May I had a suggestion : add as a comment what is needed to use xmonad
with AZERTY keyboards, where defaults for 1234567890 are &é"'(-è_çà .
Ideally, one should have only to uncomment a few line to get xmonad to
work whith those keyboards.
Best regards,
Alain
(add sorry for the personal answer instead of the mailing-list)
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Tuncer Ayaz
2015-12-28 21:29:32 UTC
Permalink
Here's an updated post with a short text that you might want
to include in the announcement:

xmonad (and xmonad-contrib) have evolved a lot since its first
release, and therefore it's a good idea to showcase a modern
xmonad.hs. The config below will give you a good starter xmonad setup
with minor customizations. These are:

(1) Ask for confirmation before exiting

(2) Replace default launcher binding with built-in shellPrompt, which
is friendlier to use and does not require dmenu.

Arguably, these customizations should be the default, but as it
requires xmonad-contrib, we can not really make it the default.

Some of the things you might want to do next:

* customize looks
* control volume and display backlight
* customize layouts
* customize mouse behavior
* whatever you need and can imagine

Save this as ~/.xmonad/xmonad.hs:

import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutHints
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.Run(hPutStrLn, spawnPipe)

main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad $ defaultConfig
{
terminal = "xterm"
, manageHook = myManageHook <+> fullscreenManageHook <+> manageDocks
<+> manageHook defaultConfig
, layoutHook = fullscreenFloat $ fullscreenFocus $ layoutHints
$ smartBorders $ avoidStruts $ layoutHook defaultConfig
, handleEventHook = fullscreenEventHook
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc }
}
`additionalKeysP`
[
-- Ask for confirmation before exiting by replacing the default
-- binding with a custom one.
("M-S-q", confirmPrompt myXPConfig "exit" $ io exitSuccess)
-- Replace M-p launcher binding with built-in shellPrompt, which
-- is friendlier and does not require dmenu.
, ("M-p", shellPrompt myXPConfig)
]
`additionalKeys`
[ ((mod4Mask, xK_q), spawn "xmonad --recompile && xmonad --restart") ]

-- see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html#t:XPConfig
myXPConfig = defaultXPConfig
{
position = Top
, promptBorderWidth = 0
, defaultText = ""
, alwaysHighlight = True
, font = "9x15"
}

-- see http://xmonad.org/xmonad-docs/xmonad/XMonad-ManageHook.html
myManageHook = composeAll
[
className =? "Pidgin" --> doFloat
, className =? "MuPDF" --> doFloat
, className =? "llpp" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "mpv" --> doFloat
, className =? "Gimp" --> doFloat
]
Tuncer Ayaz
2015-12-28 21:46:38 UTC
Permalink
Post by Tuncer Ayaz
Here's an updated post with a short text that you might want
xmonad (and xmonad-contrib) have evolved a lot since its first
release, and therefore it's a good idea to showcase a modern
Typo fix:
xmonad and xmonad-contrib have evolved a lot over the years,
and therefore it's a good idea to showcase a modern
Post by Tuncer Ayaz
xmonad.hs. The config below will give you a good starter xmonad setup
[...]
Tuncer Ayaz
2015-12-29 11:30:39 UTC
Permalink
I've removed leftover rules for mupdf and llpp. There's also no need
for making Gimp floating, because Gimp stable version has a
single-window mode, and there's no collection of windows anymore, if
you enable that. One thing I've noticed with mpv (and mplayer) is that
if you enter and leave fullscreen, then the video (inside window) is
cropped by at least one column of pixels, and the window is not
restored to its original floating position but moved right+down by one
or more pixels. These two effects are probably related, but I don't
see anything wrong with the config. Any idea what's wrong?

Here's v3 with more fixes and better wording:
xmonad and xmonad-contrib have evolved a lot over the years, and
therefore it's a good idea to showcase a modern xmonad.hs. The
config below will give you a good starter xmonad setup with minor
customizations. These are:

(1) Ask for confirmation before exiting

(2) Replace default launcher binding with built-in shellPrompt, which
is friendlier to use and does not require dmenu.

Arguably, these customizations should be the default, but as it
requires xmonad-contrib, we can not really make it the default.

Things you might want to configure next:

* customize looks
* control volume and display back-light
* customize layouts
* customize mouse behavior
* add more prompts (ssh, man, password, etc.)
* whatever you can imagine and/or need

Save this as ~/.xmonad/xmonad.hs:

import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutHints
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.Run(hPutStrLn, spawnPipe)

main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad $ defaultConfig
{
terminal = "xterm"
, manageHook = myManageHook <+> fullscreenManageHook <+> manageDocks
<+> manageHook defaultConfig
, layoutHook = fullscreenFloat $ fullscreenFocus $ layoutHints
$ smartBorders $ avoidStruts $ layoutHook defaultConfig
, handleEventHook = fullscreenEventHook
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc }
}
`additionalKeysP`
[
-- Ask for confirmation before exiting by replacing the default
-- binding with a custom one.
("M-S-q", confirmPrompt myXPConfig "exit" $ io exitSuccess)
-- Replace M-p launcher binding with built-in shellPrompt, which
-- is friendlier and does not require dmenu.
, ("M-p", shellPrompt myXPConfig)
]
`additionalKeys`
[ ((mod4Mask, xK_q), spawn "xmonad --recompile && xmonad --restart") ]

-- see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html#t:XPConfig
myXPConfig = defaultXPConfig
{
position = Top
, promptBorderWidth = 0
, defaultText = ""
, alwaysHighlight = True
, font = "9x15"
}

-- see http://xmonad.org/xmonad-docs/xmonad/XMonad-ManageHook.html
myManageHook = composeAll
[
className =? "Pidgin" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "mpv" --> doFloat
]
Bogdan Sinitsyn
2015-12-29 11:53:15 UTC
Permalink
Post by Tuncer Ayaz
One thing I've noticed with mpv (and mplayer) is that
if you enter and leave fullscreen, then the video (inside window) is
cropped by at least one column of pixels, and the window is not
restored to its original floating position but moved right+down by one
or more pixels. These two effects are probably related, but I don't
see anything wrong with the config. Any idea what's wrong?
Maybe it's because border width is reapplied by core and then by layout?
--
Bogdan Sinitsyn
Tuncer Ayaz
2016-01-02 11:56:13 UTC
Permalink
Post by Bogdan Sinitsyn
Post by Tuncer Ayaz
One thing I've noticed with mpv (and mplayer) is that
if you enter and leave fullscreen, then the video (inside window) is
cropped by at least one column of pixels, and the window is not
restored to its original floating position but moved right+down by one
or more pixels. These two effects are probably related, but I don't
see anything wrong with the config. Any idea what's wrong?
Maybe it's because border width is reapplied by core and then by layout?
Is there a fix you would suggest?
Tuncer Ayaz
2016-03-02 19:06:46 UTC
Permalink
Adapted to dock changes by adding docksEventHook as suggested by
Bogdan.

Here's v3 with more fixes and better wording:
xmonad and xmonad-contrib have evolved a lot over the years, and
therefore it's a good idea to showcase a modern xmonad.hs. The config
below will give you a good starter xmonad setup with minor
customizations. These are:

(1) Ask for confirmation before exiting

(2) Replace default launcher binding with built-in shellPrompt, which
is friendlier to use and does not require dmenu.

Arguably, these customizations should be the default, but as it
requires xmonad-contrib, we can not really make it the default.

Things you might want to configure next:

* customize looks
* control volume and display back-light
* customize layouts
* customize mouse behavior
* add more prompts (ssh, man, password, etc.)
* whatever you can imagine and/or need

Save this as ~/.xmonad/xmonad.hs:

import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutHints
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.Run(hPutStrLn, spawnPipe)

main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad $ defaultConfig
{
terminal = "xterm"
, manageHook = myManageHook <+> fullscreenManageHook <+> manageDocks
<+> manageHook defaultConfig
, layoutHook = fullscreenFloat $ fullscreenFocus $ layoutHints
$ smartBorders $ avoidStruts $ layoutHook defaultConfig
, handleEventHook = fullscreenEventHook <+> docksEventHook
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc }
}
`additionalKeysP`
[
-- Ask for confirmation before exiting by replacing the default
-- binding with a custom one.
("M-S-q", confirmPrompt myXPConfig "exit" $ io exitSuccess)
-- Replace M-p launcher binding with built-in shellPrompt, which
-- is friendlier and does not require dmenu.
, ("M-p", shellPrompt myXPConfig)
]
`additionalKeys`
[ ((mod4Mask, xK_q), spawn "xmonad --recompile && xmonad --restart") ]

-- see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html#t:XPConfig
myXPConfig = defaultXPConfig
{
position = Top
, promptBorderWidth = 0
, defaultText = ""
, alwaysHighlight = True
, font = "9x15"
}

-- see http://xmonad.org/xmonad-docs/xmonad/XMonad-ManageHook.html
myManageHook = composeAll
[
className =? "Pidgin" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "mpv" --> doFloat
]

Continue reading on narkive:
Loading...