You are not logged in.
You can't have it in defaultConfig, you have to put it outside anything, i.e. between the imports and main = do.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
I press 'e' (the key I binded to view the empty workspace) and nothing happens. Here is my xmonad.hs:
Notice that you've bound M-e and M-S-e to switching between screens after the empty workspace stuff. M.fromList takes the last elements, so to fix this you should probably remove the xK_e from that list comprehension.
Offline
@unregistered, Or you can write the suggestions Nepherte gave you inline.
Also notice that due to operator precedence being lower than function application, you need () around your fractions.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = let tiled = Tall 1 (1/2) (3/100) in avoidStruts $ Full ||| Mirror tiled ||| tiled
, logHook = dynamicLogWithPP $ xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, focusedBorderColor = "#00ff00"
--, modMask = mod4Mask -- Rebind Mod to the Windows key
}
Offline
hey thanks, that worked, this thread's really helpful but is it better to put it inside or outside or it makes no difference?
Offline
The only difference is where the names are in scope. In the example I gave, the 'tiled' is only in scope where it is used. If you put it at top level, you could refer to 'tiled' anywhere in the module. In this case, it makes no difference, since there should be no reason to refer to it elsewhere.
Offline
ic, what about configuring the looks of the dmenu, how would I go about doing so?
from here it seems that I would have to configure the looks of dmenu in xmonad.hs
http://bbs.archlinux.org/viewtopic.php?id=43802
Offline
@vogt: I'm new to haskell, so could you give me an example or something? I don't really understand your answer.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Nepherte wrote:You can do something like this:
tiled = Tall 1 1/2 3/100 myLayout = avoidStruts $ Full ||| tiled ||| Mirror tiled ||| other tiling algorithm
in your main, you should then assign the layoutHook to myLayout:
layoutHook = myLayout
You can toggle between layouts with mod + spacebar if you didn't change the default key for it.
hey I got a tiled and myLayout not in scope error when trying to compile, any ideas?
here's the config
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import System.IO main = do xmproc <- spawnPipe "xmobar" xmonad $ defaultConfig { manageHook = manageDocks <+> manageHook defaultConfig , tiled = Tall 1 1/2 3/100 , myLayout = avoidStruts $ Full ||| Mirror tiled ||| tiled , layoutHook = myLayout , logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor "green" "" . shorten 50 } , focusedBorderColor = "#00ff00" --, modMask = mod4Mask -- Rebind Mod to the Windows key }
It should be:
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myLayout = avoidStruts $ Full ||| Mirror tiled ||| tiled
where
tiled = Tall 1 1/2 3/100
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = myLayout
, logHook = dynamicLogWithPP $ xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, focusedBorderColor = "#00ff00"
--, modMask = mod4Mask -- Rebind Mod to the Windows key
Offline
@Nepherte
you forgot the parentheses around the fractions but otherwise it worked fine
how can I edit the key for launching dmenu to this:
MODKEY, XK_p, spawn, "exe=`dmenu_path | dmenu -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"'" " -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'` && eval \"exec $exe\""
PS I just want to change the color of dmenu but preserve the alt-P default binding
Last edited by unregistered (2009-06-12 10:56:18)
Offline
I have tested lxpanel+xmonad as below:
import XMonad
import XMonad.Actions.CycleWS
import XMonad.Actions.SwapWorkspaces
import XMonad.Actions.Submap
import XMonad.Actions.WindowGo
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Util.Run(spawnPipe)
import XMonad.Layout.TwoPane
import XMonad.Layout.MosaicAlt
import XMonad.Layout.Combo
import XMonad.Layout.WindowNavigation
import qualified XMonad.StackSet as W
import Data.Bits ((.|.))
import qualified Data.Map as M
import System.Exit
import System.IO
main = do
xmonad $ defaultConfig
{ borderWidth = 1
, focusedBorderColor = "#ff6666"
, normalBorderColor = "#2222aa"
, manageHook = myManageHook <+> manageHook defaultConfig <+> manageDocks
, workspaces = map show [1 .. 10 :: Int]
, terminal = "roxterm"
, modMask = mod4Mask
, focusFollowsMouse = False
, startupHook = myStartupHook
, logHook = myLogHook
, layoutHook = ewmhDesktopsLayout $ windowNavigation $ avoidStruts $ (Mirror tall ||| tall ||| Full)
, keys = \c -> myKeys c `M.union` keys defaultConfig c
}
where
tall = Tall 1 (3/100) (1/2)
myStartupHook :: X ()
myStartupHook = do
spawn "fcitx"
spawn "/usr/local/bin/roxterm"
spawn "lxpanel"
myLogHook :: X ()
myLogHook = ewmhDesktopsLogHook
myManageHook :: ManageHook
myManageHook = composeAll . concat $
[ [ className =? c --> doFloat | c <- myCFloats]
,[ resource =? r --> doFloat | r <- myRFloats]
,[ title =? t --> doFloat | t <- myTFloats]
--,[ isFullscreen --> doFullFloat ]
,[ className =? c --> doIgnore | c <- ignores]
,[ className =? "Audacious" --> doShift "3" ]
,[ className =? "Firefox" --> doF W.swapDown]
,[(role =? "gimp-toolbox" <||> role =? "gimp-image-window") --> (ask >>= doF . W.sink)]]
where myCFloats = ["GQview", "Thunderbird-bin", "MPlayer", "Gimp","Vncviewer","Xmessage"]
myRFloats = ["Dialog", "Download", "Places"]
myTFloats = ["Firefox Preferences", "Element Properties"]
ignores = ["trayer"]
role = stringProperty "WM_WINDOW_ROLE"
myKeys (XConfig {modMask = modm}) = M.fromList $
-- Apps and tools
[ ((modm, xK_F2), spawn "gmrun")
, ((modm, xK_p), spawn "exe=`dmenu_path | dmenu -b` && eval \"exec $exe\"")
, ((mod4Mask, xK_F12), spawn "sudo shutdown -h now")
, ((modm .|. controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((modm, xK_Print), spawn "scrot '/tmp/%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~'")
-- Window Navigation
-- select...
, ((modm, xK_Right), sendMessage $ Go R)
, ((modm, xK_Left ), sendMessage $ Go L)
, ((modm, xK_Up ), sendMessage $ Go U)
, ((modm, xK_Down ), sendMessage $ Go D)
-- swap...
, ((modm .|. controlMask, xK_Right), sendMessage $ Swap R)
, ((modm .|. controlMask, xK_Left ), sendMessage $ Swap L)
, ((modm .|. controlMask, xK_Up ), sendMessage $ Swap U)
, ((modm .|. controlMask, xK_Down ), sendMessage $ Swap D)
]
The lxpanel can work with xmonad happily. And there is another question: In firefox, open the "Organize Bookmark window" -> Restore bookmark from a file, then the confire dialog will be hidden by the "Organize Bookmark window" , I have to use mouse to move the "Organize Bookmark window" to discover the "confirm dialog".
One more question associated with wine:
When running windows application using wine, the app. will lose keyborad focus until i click the app. using mouse.
Last edited by sw2wolf (2009-06-14 05:49:21)
e^(π⋅i) + 1 = 0
Offline
@unregistered: Just change the options you give dmenu in the xmonad.hs file. Check man dmenu for the different options.
Here is my line:
, ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu -fn -*-terminus-*-*-*-*-12-*-*-*-*-*-*-u -nb black -nf gray` && eval \"exec $exe\"")
(To find a font you can use xfontsel.)
Offline
@vogt: I'm new to haskell, so could you give me an example or something? I don't really understand your answer.
The keybindings are stored in a map (the same interface as a hash table, or dictionary in other languages). When converting from the list that you specify the keybindings in, duplicated elements (xK_e in your case), the last binding is taken. In your case xK_e with your modkey, and possibly shift end up being bound to switching screens. The solution is to remove the second occurence of xK_e, from your config.
I think that using XMonad.Util.EZConfig would be better choice for you, since it overrides the existing keybindings. It also has some functions to run on xmonad's startup (or restart) that will tell you if you have bound the same key combination twice.
Offline
>>In firefox, open the "Organize Bookmark window" -> Restore bookmark from a file, then the confire dialog will be hidden by the "Organize Bookmark window" , I have to use mouse to move the "Organize Bookmark window" to discover the "confirm dialog".
up to now, i have not found any answer. Doesnot it mean it cannot be fixed ?
e^(π⋅i) + 1 = 0
Offline
for tabbed layout, what would be the key combination to jump to a specific tab?
Offline
I posted a new thread on the Desktop Environment section, but I figure it won't hurt to ask here either. Does anyone know how to change the behaviour of floating windows, so that they aren't always above other windows? I'm trying to migrate from Awesome and found that behaviour very useful (but, alas, the configuration syntax changes too fast for me to keep up, and there are one or two other issues), since I usually run Skype floating, but on my main screen, so I can chat while I work/read responses through the transparent terminals I use. If I have to edit the Xmonad source, I'd be willing to do that too, I'd just need someone to point out what I need to change, and in what file (haven't even really begun learning Haskell yet, too busy). If anyone has an idea of whom I best direct this question to instead (or someone who is sure to know the answer), that would be great too.
Nice configs here as well.
Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds
Offline
Have you tried the IM-Layout?
http://xmonad.org/xmonad-docs/xmonad-co … ut-IM.html
Keeping the floated windows *below* the tiled doesn't make much sense imo, since you'd have to close all windows again to see any of the floated (yeh, ok, you're using transparency -- but still ). Use multiple workspaces instead - that what they're good for!
Last edited by McManiaC (2009-06-27 15:14:37)
Offline
No, I don't want it to be just below, I want it to just not always be on top...like be able to have it below or above. However, it is a step closer to know that the opposite is true, so a balance should be possible, right?
Thanks for the suggestion though.
Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds
Offline
No, I don't want it to be just below, I want it to just not always be on top...like be able to have it below or above. However, it is a step closer to know that the opposite is true, so a balance should be possible, right?
Thanks for the suggestion though.
You might be able to use a Combo layout for what you want .... I don't know though as I use the IM Layout.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
lswest wrote:No, I don't want it to be just below, I want it to just not always be on top...like be able to have it below or above. However, it is a step closer to know that the opposite is true, so a balance should be possible, right?
Thanks for the suggestion though.
You might be able to use a Combo layout for what you want .... I don't know though as I use the IM Layout.
How would you do that? I haven't had time to google it yet, but I thought I may as well reply, and ask, right? Thanks for the suggestion, I hope that would work.
Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds
Offline
lifeafter2am wrote:lswest wrote:No, I don't want it to be just below, I want it to just not always be on top...like be able to have it below or above. However, it is a step closer to know that the opposite is true, so a balance should be possible, right?
Thanks for the suggestion though.
You might be able to use a Combo layout for what you want .... I don't know though as I use the IM Layout.
How would you do that? I haven't had time to google it yet, but I thought I may as well reply, and ask, right? Thanks for the suggestion, I hope that would work.
Well, as far as I understand it, the XMonad.Layout.Combo hook allows you to combine different layouts. I am just spit-balling here though, as I don't know if you could achieve what you want with different layouts combined.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
Well, as far as I understand it, the XMonad.Layout.Combo hook allows you to combine different layouts. I am just spit-balling here though, as I don't know if you could achieve what you want with different layouts combined.
Thanks for the link, and spit-balling is still more than I have going atm I'll give it a shot and let you know how it goes. Thanks for the suggestion.
Maybe I'm just extremely slow when on summer holidays, or else I am just incapable of understanding the website I'm not sure on how exactly I am meant to use the CombineTwo thing in the xmonad.hs file. Is it like CombineTwo <first layout> <second layout>?
Last edited by lswest (2009-06-28 15:18:10)
Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds
Offline
Well, just as an update on the combo layout suggestion: XMonad doesn't recognize XMonad.Layout.Combo as a proper module, so I can't get any further, and I'm not really looking to create a new layout where things are floated all the time, just that if I choose to float a window to have it go both above and below a window. I'll probably see if DWM or another tiling manager offers that, otherwise I'll probably end up with Awesome again. Thanks for the suggestions though, I'm sure that, given enough time, we could figure something out I'm in the middle of a move right now, so I don't have that kind of time though
Thanks again,
Lswest
Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds
Offline
>>In firefox, open the "Organize Bookmark window" -> Restore bookmark from a file, then the confire dialog will be hidden by the "Organize Bookmark window" , I have to use mouse to move the "Organize Bookmark window" to discover the "confirm dialog".
up to now, i have not found any answer. Doesnot it mean it cannot be fixed ?
UP, hope it can be fixed
e^(π⋅i) + 1 = 0
Offline
Well, just as an update on the combo layout suggestion: XMonad doesn't recognize XMonad.Layout.Combo as a proper module, so I can't get any further, and I'm not really looking to create a new layout where things are floated all the time, just that if I choose to float a window to have it go both above and below a window. I'll probably see if DWM or another tiling manager offers that, otherwise I'll probably end up with Awesome again. Thanks for the suggestions though, I'm sure that, given enough time, we could figure something out I'm in the middle of a move right now, so I don't have that kind of time though
Thanks again,
Lswest
import XMonad.Layout.Combo
Works in my xmonad.hs file. Do you have the xmonad-contrib package installed?
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
Offline