You are not logged in.

#1 2008-09-16 19:30:26

honahursey
Member
Registered: 2008-08-18
Posts: 32

Starting Firefox fullscreen in xmonad?

How would I configure xmonad.hs to always start firefox fullscreen?

My xmonad.hs:

import XMonad
import XMonad.Layout
import XMonad.Config (defaultConfig)
import XMonad.Layout.NoBorders
import XMonad.Layout.Gaps
import XMonad.Hooks.DynamicLog hiding (xmobar)
import XMonad.Actions.CycleWS
import Data.Bits
import qualified Data.Map as M
import XMonad.Util.Run (spawnPipe)
import System.IO (hPutStrLn)
import Graphics.X11
 
main :: IO ()
main = xmonad $ defaultConfig
         { normalBorderColor  = "#404040"
         , focusedBorderColor = "#7f9f7f"
         , terminal = "urxvt"
         , layoutHook = smartBorders tiled ||| Full ||| Mirror tiled
         , manageHook = composeAll [ className =? "fontforge" --> doFloat,
                                     className =? "MPlayer"   --> doFloat,
                                     className =? "Gimp"      --> doFloat]
         }
  where
     tiled   = Tall nmaster delta ratio
 
     -- The default number of windows in the master pane
     nmaster = 1
 
     -- Default proportion of screen occupied by master pane
     ratio   = toRational (2/(1+sqrt(5)::Double)) -- golden
 
     -- Percent of screen to increment by when resizing panes
     delta   = 0.03

Offline

#2 2008-09-17 03:37:17

semdornus
Member
From: Tokyo
Registered: 2007-08-07
Posts: 47

Re: Starting Firefox fullscreen in xmonad?

By moving it to a workspace that has the Full (not tiling) layout.
So you set the Layout to Full on a specific workspace (for example on "2") by using the XMonad.Layout.PerWorkspace extension and in the manageHook make sure you move Firefox to that workspace.

Offline

#3 2008-09-17 05:33:29

honahursey
Member
Registered: 2008-08-18
Posts: 32

Re: Starting Firefox fullscreen in xmonad?

Sorry if I didn't make it clear in my origional post, but I was more looking at fullscreen as in the effect of pressing f11 within firefox. 

The Full layout does make the program fill the screen, but there is still bars within the program not hidden by this (tabs and the vimperator 'status bar' in my case.)

Offline

#4 2008-09-17 07:14:31

semdornus
Member
From: Tokyo
Registered: 2007-08-07
Posts: 47

Re: Starting Firefox fullscreen in xmonad?

I'm not sure xmonad is the best place to do that sort of thing. As you say, that's within the program.
You could write code to modify the window size if the class is Firefox for example, but that probably would take time and doesn't strike me as easy.

Maybe take a look at the AutoHide extension? Info: 1, 2.

Offline

Board footer

Powered by FluxBB