Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I run 12.04 with gnome-shell (so it looks like Gnome 2 with horizontal panels on the top and the bottom of the screen) with Xmonad.

What I want to do is create a keybinding that would toggle these panels, basically switching applications on the screen to fullscreen and back.

Can anyone tell me what should I write in xmonad.hs in order to achieve it? (I'm totally innocent of Haskell, unfortunately.)

share|improve this question
    
I changed "borders" to "panels" in your question since that's the term which is used –  Sergey Aug 24 '12 at 10:18
    
Yes, thanks, I felt that something was wrong with wording. –  shlema Aug 24 '12 at 10:55
add comment

1 Answer

Assuming you've setup your XMonad using gnomeConfig then the panels should be handled as struts.

In your xmonad.hs you then want to use the ManageDocks module.

The docs page provides the steps necessary to enable it but it surmounts to modifying your manageHook and layoutHook as follows:

import XMonad.Hooks.ManageDocks
...
manageHook = ... <+> manageDocks
...
layoutHook = avoidStruts (tall ||| mirror tall ||| ...)
        where tall = ResizableTall 1 (3/100) (1/2)
...

There already exists a key binding in XMonad to toggle struts: Mod+b is the default. If you're defining your own set of keybindings then you can add the following:

,((modm, xK_b     ), sendMessage ToggleStruts)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.