Code Freeze for v0.12 and Time to Test!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Alain Bertrand
Le 28/12/2015 19:32, Devin Mullins a écrit :
>
> 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

> On Dec 28, 2015 10:53 AM, "Alain Bertrand" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Le 28/12/2015 14:51, Tuncer Ayaz a écrit :
>
>     > 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
>     [hidden email] <mailto:[hidden email]>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
In reply to this post by Tuncer Ayaz
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
    ]

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

sample-xmonad.hs (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
In reply to this post by Devin Mullins-3
On 28 December 2015 at 19:22, Devin Mullins <[hidden email]> wrote:
> Interesting, I didn't know about ConfirmPrompt! So many contrib modules.

Yeah, there are many hidden gems in the contrib namespace.

> 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.

> 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?
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
In reply to this post by Tuncer Ayaz
On 28 December 2015 at 22:29, Tuncer Ayaz <[hidden email]> wrote:
> 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

Typo fix:
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:

[...]
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
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
    ]

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

sample-xmonad.hs (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Bogdan Sinitsyn
On Tuesday, December 29, 2015 12:30:39 PM MSK Tuncer Ayaz wrote:
> 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
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
On 29 December 2015 at 12:53, Bogdan Sinitsyn wrote:

> On Tuesday, December 29, 2015 12:30:39 PM MSK Tuncer Ayaz wrote:
> > 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?
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Code Freeze for v0.12 and Time to Test!

Tuncer Ayaz
In reply to this post by Tuncer Ayaz
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
    ]

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

sample-xmonad.hs (2K) Download Attachment
12