From alainbe at free.fr Sun Jun 11 22:19:12 2023 From: alainbe at free.fr (Alain Bertrand) Date: Mon, 12 Jun 2023 00:19:12 +0200 Subject: [xmonad] don't manage windows layout Message-ID: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> Hello, I have a program which doesn't work nicely with xmonad because of the apparition of popup windows, supposed to be small but who take suddenly half the size of the screen. Is there a layout for xmonad which would (un)manages windows just like, say Openbox  ? Thanks for your help Alain -------------- next part -------------- A non-text attachment was scrubbed... Name: xmonad.hs Type: text/x-haskell Size: 1632 bytes Desc: not available URL: From allbery.b at gmail.com Sun Jun 11 22:25:43 2023 From: allbery.b at gmail.com (Brandon Allbery) Date: Sun, 11 Jun 2023 18:25:43 -0400 Subject: [xmonad] don't manage windows layout In-Reply-To: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> Message-ID: You might want XMonad.Layout.SimplestFloat. On Sun, Jun 11, 2023 at 6:19 PM Alain Bertrand wrote: > > Hello, > > I have a program which doesn't work nicely with xmonad because of the > apparition of popup windows, supposed to be small but who take suddenly > half the size of the screen. > > Is there a layout for xmonad which would (un)manages windows just like, > say Openbox ? > > Thanks for your help > > > Alain > > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad -- brandon s allbery kf8nh allbery.b at gmail.com From alainbe at free.fr Sun Jun 11 22:43:15 2023 From: alainbe at free.fr (Alain Bertrand) Date: Mon, 12 Jun 2023 00:43:15 +0200 Subject: [xmonad] don't manage windows layout In-Reply-To: References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> Message-ID: <9250b6ed-dd97-d5f1-a930-f8041132d470@free.fr> Thanks. I got the following error and though the message is really detailed, my total ignorance of Haskel doesn't allow me to fix it. Best regards Alain ------------------- Error detected while loading xmonad configuration file: /home/alain/.xmonad/xmonad.hs xmonad.hs:26:17: error:     * Ambiguous type variable `a0` arising from a use of `avoidStruts`       prevents the constraint `(Show a0)` from being solved.       Relevant bindings include         myLayoutHook :: XMonad.Layout.LayoutModifier.ModifiedLayout                           AvoidStruts                           (Choose                              Full                              (Choose                                 SpiralWithDir                                 (Choose                                    Tall (XMonad.Layout.LayoutModifier.ModifiedLayout XMonad.Layout.WindowArranger.WindowArranger SimplestFloat))))                           a0           (bound at xmonad.hs:26:2)       Probable fix: use a type annotation to specify what `a0` should be.       These potential instances exist:         instance Show Event -- Defined in `Graphics.X11.Xlib.Extras`         instance Show FontSet -- Defined in `Graphics.X11.Xlib.Extras`         instance [safe] Show Arc -- Defined in `Graphics.X11.Xlib.Types`         ...plus 54 others         ...plus 73 instances involving out-of-scope types         (use -fprint-potential-instances to see them all)     * In the expression:         avoidStruts           (Full ||| spiral (6 / 7) ||| Tall 1 0.03 0.5 ||| simplestFloat)       In an equation for `myLayoutHook`:           myLayoutHook             = avoidStruts                 (Full ||| spiral (6 / 7) ||| Tall 1 0.03 0.5 ||| simplestFloat)    | 26 |  myLayoutHook = avoidStruts  ( Full ||| spiral (6/7)  ||| Tall 1 0.03 0.5 ||| simplestFloat)    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- On 12/06/2023 00:25, Brandon Allbery wrote: > You might want XMonad.Layout.SimplestFloat. -------------- next part -------------- A non-text attachment was scrubbed... Name: xmonad.hs Type: text/x-haskell Size: 1686 bytes Desc: not available URL: From allbery.b at gmail.com Sun Jun 11 22:46:36 2023 From: allbery.b at gmail.com (Brandon Allbery) Date: Sun, 11 Jun 2023 18:46:36 -0400 Subject: [xmonad] don't manage windows layout In-Reply-To: <9250b6ed-dd97-d5f1-a930-f8041132d470@free.fr> References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> <9250b6ed-dd97-d5f1-a930-f8041132d470@free.fr> Message-ID: You're not actually using `myLayoutHook`, so the compiler can't determine the type of its layout. See line 34. On Sun, Jun 11, 2023 at 6:43 PM Alain Bertrand wrote: > > Thanks. > > I got the following error and though the message is really detailed, my > total ignorance of Haskel doesn't allow me to fix it. > > Best regards > > Alain > > ------------------- > Error detected while loading xmonad configuration file: > /home/alain/.xmonad/xmonad.hs > > xmonad.hs:26:17: error: > * Ambiguous type variable `a0` arising from a use of `avoidStruts` > prevents the constraint `(Show a0)` from being solved. > Relevant bindings include > myLayoutHook :: XMonad.Layout.LayoutModifier.ModifiedLayout > AvoidStruts > (Choose > Full > (Choose > SpiralWithDir > (Choose > Tall > (XMonad.Layout.LayoutModifier.ModifiedLayout > XMonad.Layout.WindowArranger.WindowArranger SimplestFloat)))) > a0 > (bound at xmonad.hs:26:2) > Probable fix: use a type annotation to specify what `a0` should be. > These potential instances exist: > instance Show Event -- Defined in `Graphics.X11.Xlib.Extras` > instance Show FontSet -- Defined in `Graphics.X11.Xlib.Extras` > instance [safe] Show Arc -- Defined in `Graphics.X11.Xlib.Types` > ...plus 54 others > ...plus 73 instances involving out-of-scope types > (use -fprint-potential-instances to see them all) > * In the expression: > avoidStruts > (Full ||| spiral (6 / 7) ||| Tall 1 0.03 0.5 ||| simplestFloat) > In an equation for `myLayoutHook`: > myLayoutHook > = avoidStruts > (Full ||| spiral (6 / 7) ||| Tall 1 0.03 0.5 ||| > simplestFloat) > | > 26 | myLayoutHook = avoidStruts ( Full ||| spiral (6/7) ||| Tall 1 > 0.03 0.5 ||| simplestFloat) > | > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > ------------------- > > > > > On 12/06/2023 00:25, Brandon Allbery wrote: > > You might want XMonad.Layout.SimplestFloat. > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad -- brandon s allbery kf8nh allbery.b at gmail.com From alainbe at free.fr Sun Jun 11 23:06:48 2023 From: alainbe at free.fr (Alain Bertrand) Date: Mon, 12 Jun 2023 01:06:48 +0200 Subject: [xmonad] don't manage windows layout In-Reply-To: References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> <9250b6ed-dd97-d5f1-a930-f8041132d470@free.fr> Message-ID: On 12/06/2023 00:46, Brandon Allbery wrote: > You're not actually using `myLayoutHook`, so the compiler can't > determine the type of its layout. See line 34. Many thanks. I join the corrected xmonad.hs file in case it could be useful to somebody. Best regards, Alain -------------- next part -------------- A non-text attachment was scrubbed... Name: xmonad.hs Type: text/x-haskell Size: 1706 bytes Desc: not available URL: From platon7pronko at gmail.com Mon Jun 12 07:34:04 2023 From: platon7pronko at gmail.com (Platon Pronko) Date: Mon, 12 Jun 2023 15:34:04 +0800 Subject: [xmonad] don't manage windows layout In-Reply-To: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> Message-ID: <84184b68-9b71-f915-d4b0-102cf59854d0@gmail.com> On 2023-06-12 06:19, Alain Bertrand wrote: > Hello, > > I have a program which doesn't work nicely with xmonad because of the apparition of popup windows, supposed to be small but who take suddenly half the size of the screen. > > Is there a layout for xmonad which would (un)manages windows just like, say Openbox  ? I use myManageHook for floating or ignoring such popup windows. This way you can keep your usual layout and only add some special cases for misbehaving windows. Something like this: myManageHook :: ManageHook myManageHook = composeAll [ fmap (isInfixOf "Gnuplot") title --> doFloat , className =? "Xfce4-panel" --> doIgnore , className =? "Yad" --> doFloat , isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_TOOLBAR" --> doIgnore -- fix for libreoffice dialogs , isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH" --> doIgnore -- splash screens , isFullscreen --> doFullFloat , isDialog --> doFloat , role =? "pop-up" --> doFloat ] (you can check the window properties using xprop utility) -- Best regards, Platon Pronko PGP 2A62D77A7A2CB94E From alainbe at free.fr Wed Jun 14 16:56:01 2023 From: alainbe at free.fr (Alain Bertrand) Date: Wed, 14 Jun 2023 18:56:01 +0200 Subject: [xmonad] don't manage windows layout In-Reply-To: <84184b68-9b71-f915-d4b0-102cf59854d0@gmail.com> References: <92d17551-e165-451e-f9cb-d86ae48cd177@free.fr> <84184b68-9b71-f915-d4b0-102cf59854d0@gmail.com> Message-ID: <5f839d99-701e-57f3-90e7-d295ea9be69f@free.fr> Hi, Thanks for this suggestion. As it turned out, the app I want to use has unfriendly behaviour even with XMonad.Layout.SimplestFloat and I think that I will need to use this solution. Best regards, Alain On 12/06/2023 09:34, Platon Pronko wrote: > On 2023-06-12 06:19, Alain Bertrand wrote: >> Hello, >> >> I have a program which doesn't work nicely with xmonad because of the >> apparition of popup windows, supposed to be small but who take >> suddenly half the size of the screen. >> >> Is there a layout for xmonad which would (un)manages windows just >> like, say Openbox  ? > > I use myManageHook for floating or ignoring such popup windows. This > way you can keep your usual layout and only add some special cases for > misbehaving windows. > > Something like this: > > myManageHook :: ManageHook > myManageHook = >   composeAll >   [ fmap (isInfixOf "Gnuplot") title --> doFloat >   , className =? "Xfce4-panel" --> doIgnore >   , className =? "Yad" --> doFloat >   , isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_TOOLBAR" > --> doIgnore -- fix for libreoffice dialogs >   , isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH" > --> doIgnore -- splash screens >   , isFullscreen --> doFullFloat >   , isDialog --> doFloat >   , role =? "pop-up" --> doFloat >   ] > > (you can check the window properties using xprop utility) >