How do I enable a three column layout in XMonad?











up vote
5
down vote

favorite












I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per workspace).



In the docs, I've found a three-column layout function, and even managed to import it and define a custom layout, but I'm not sure how to add it to my layoutHook, which already has some stuff defined from a tutorial I read, to keep my xmobar safe from window covering.



The relevant lines of my xmonad.hs:



import XMonad.Layout.ThreeColumns
threeLayout = ThreeCol 1 (3/100) (1/2)
...
main = do
xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
...


How do I change the layoutHook line to keep the existing configs, while also adding my three-column tile layout?










share|improve this question




























    up vote
    5
    down vote

    favorite












    I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per workspace).



    In the docs, I've found a three-column layout function, and even managed to import it and define a custom layout, but I'm not sure how to add it to my layoutHook, which already has some stuff defined from a tutorial I read, to keep my xmobar safe from window covering.



    The relevant lines of my xmonad.hs:



    import XMonad.Layout.ThreeColumns
    threeLayout = ThreeCol 1 (3/100) (1/2)
    ...
    main = do
    xmonad $ defaultConfig
    { manageHook = manageDocks <+> manageHook defaultConfig
    , layoutHook = avoidStruts $ layoutHook defaultConfig
    ...


    How do I change the layoutHook line to keep the existing configs, while also adding my three-column tile layout?










    share|improve this question


























      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per workspace).



      In the docs, I've found a three-column layout function, and even managed to import it and define a custom layout, but I'm not sure how to add it to my layoutHook, which already has some stuff defined from a tutorial I read, to keep my xmobar safe from window covering.



      The relevant lines of my xmonad.hs:



      import XMonad.Layout.ThreeColumns
      threeLayout = ThreeCol 1 (3/100) (1/2)
      ...
      main = do
      xmonad $ defaultConfig
      { manageHook = manageDocks <+> manageHook defaultConfig
      , layoutHook = avoidStruts $ layoutHook defaultConfig
      ...


      How do I change the layoutHook line to keep the existing configs, while also adding my three-column tile layout?










      share|improve this question















      I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per workspace).



      In the docs, I've found a three-column layout function, and even managed to import it and define a custom layout, but I'm not sure how to add it to my layoutHook, which already has some stuff defined from a tutorial I read, to keep my xmobar safe from window covering.



      The relevant lines of my xmonad.hs:



      import XMonad.Layout.ThreeColumns
      threeLayout = ThreeCol 1 (3/100) (1/2)
      ...
      main = do
      xmonad $ defaultConfig
      { manageHook = manageDocks <+> manageHook defaultConfig
      , layoutHook = avoidStruts $ layoutHook defaultConfig
      ...


      How do I change the layoutHook line to keep the existing configs, while also adding my three-column tile layout?







      xmonad haskell






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 7 at 23:33









      Rui F Ribeiro

      38.7k1479128




      38.7k1479128










      asked Sep 20 '12 at 9:55









      ire_and_curses

      9,62222731




      9,62222731






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          I simply forget about default config and start defining things on my own. So going that route:



          myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
          main = do
          xmonad $ desktopConfig
          { layoutHook = myLayoutHook
          ...


          This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.






          share|improve this answer























          • Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
            – ire_and_curses
            Sep 22 '12 at 5:21











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f48679%2fhow-do-i-enable-a-three-column-layout-in-xmonad%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          I simply forget about default config and start defining things on my own. So going that route:



          myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
          main = do
          xmonad $ desktopConfig
          { layoutHook = myLayoutHook
          ...


          This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.






          share|improve this answer























          • Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
            – ire_and_curses
            Sep 22 '12 at 5:21















          up vote
          4
          down vote



          accepted










          I simply forget about default config and start defining things on my own. So going that route:



          myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
          main = do
          xmonad $ desktopConfig
          { layoutHook = myLayoutHook
          ...


          This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.






          share|improve this answer























          • Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
            – ire_and_curses
            Sep 22 '12 at 5:21













          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          I simply forget about default config and start defining things on my own. So going that route:



          myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
          main = do
          xmonad $ desktopConfig
          { layoutHook = myLayoutHook
          ...


          This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.






          share|improve this answer














          I simply forget about default config and start defining things on my own. So going that route:



          myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
          main = do
          xmonad $ desktopConfig
          { layoutHook = myLayoutHook
          ...


          This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 22 '12 at 8:50

























          answered Sep 20 '12 at 10:38









          phunehehe

          12.2k1782138




          12.2k1782138












          • Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
            – ire_and_curses
            Sep 22 '12 at 5:21


















          • Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
            – ire_and_curses
            Sep 22 '12 at 5:21
















          Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
          – ire_and_curses
          Sep 22 '12 at 5:21




          Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks!
          – ire_and_curses
          Sep 22 '12 at 5:21


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f48679%2fhow-do-i-enable-a-three-column-layout-in-xmonad%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Morgemoulin

          Scott Moir

          Souastre