RE: Xmonad configuration 06-28-2013, 07:58 PM
#28
(06-28-2013, 12:11 PM)Deque Wrote:(06-28-2013, 08:45 AM)noize Wrote:Code:xmonad.hs:66:53
The function avoidStruts is applied to two arguments.
Note: if I switch positions I get the same but for fullscreenFull.
This is my xmonad.hs:
Code:import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Actions.GridSelect
import XMonad.Layout.Fullscreen
import XMonad.Layout.PerWorkspace
import System.IO
myNormalBorderColor = "#cccccc"
myFocusedBorderColor = "#0000ff"
myManageHook = composeAll
[
(className =? "Firefox" <&&> resource =? "Dialog") --> doFloat
, className =? "Firefox" --> doShift "web"
, manageDocks
]
myLayoutMain = Mirror tiled ||| tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 2
-- Default proportion of screen occupied by master pane
ratio = 3/5
-- Ratio of screen to increment by when resizing panes
delta = 1/100
myLayoutDefault = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 2
ratio = 3/5
delta = 1/100
myLayoutWeb = Mirror tiled ||| tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 3/4
delta = 1/100
myLayoutCoding = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 1/100
main = do
xmonad $ gnomeConfig
{ manageHook = fullscreenManageHook <+> myManageHook <+> manageHook gnomeConfig
, handleEventHook = fullscreenEventHook
, startupHook = do
spawn "gnome-terminal"
spawn "firefox"
, layoutHook = onWorkspace "main" (fullscreenFull avoidStruts myLayoutMain) $
onWorkspace "web" (fullscreenFull avoidStruts myLayoutWeb) $
onWorkspace "coding" (fullscreenFull avoidStruts myLayoutCoding) $
avoidStruts myLayoutDefault
, workspaces = ["main","web","coding","hacking","testing","6","7","8","9"]
, modMask = mod4Mask
, normalBorderColor = myNormalBorderColor
, focusedBorderColor = myFocusedBorderColor
}`additionalKeys`
[ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]
P.S: it's happening pretty often to me that the cursor in gedit disappears. I mean, it is there, you can type and do everything but without seeing the bar. It makes things a bit harder.
You need to use brackets.
The function fullscreenFull (or avoidStruts) takes one argument. If you do
Code:fullscreenFull avoidStruts myLayoutMain
You apply two arguments to the function fullscreenFull.
Instead you have to do:
Code:fullscreenFull (avoidStruts myLayoutMain)
That means you pass one argument, which is the result of the operation (avoidStruts myLayoutMain)
I will probably switch to xmonad only (adding xmobar or dzen for some status bars). I don't really need Gnome. I don't really need the panels and there are too many little problems with Gnome which I never had with xmonad alone.
I'll later try with that code.
Could you mention some of the problems you're talking about (I've noticed a few too, though I can't recall now)?
However, with XMonad + Gnome I can use Nautilus.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U
If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U
If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize