You are not logged in.

#301 2010-02-25 15:49:20

eol
Member
Registered: 2009-05-30
Posts: 23

Re: xmonad Hacking Thread

Mr.Elendig wrote:

Take a look at one of the dzen muxers,

Thank you for your answer, it could indeed be a solution.
At the moment, i stopped launching the dzen from .xinitrc, I realized that a self updating clock isn't important as I rarely stay more than one minute without sending an event to xmonad so the clock is approximatively updated anyway.
I just changed date "%T" to date "%H:%M" to hide the immobile seconds smile

I 'd just like to know if this date system logger is made in a way it shouldn't self update or if I missed something in my conf.

Offline

#302 2010-02-25 16:42:43

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad Hacking Thread

eol wrote:
Mr.Elendig wrote:

Take a look at one of the dzen muxers,

Thank you for your answer, it could indeed be a solution.
At the moment, i stopped launching the dzen from .xinitrc, I realized that a self updating clock isn't important as I rarely stay more than one minute without sending an event to xmonad so the clock is approximatively updated anyway.
I just changed date "%T" to date "%H:%M" to hide the immobile seconds smile

I 'd just like to know if this date system logger is made in a way it shouldn't self update or if I missed something in my conf.

From what I understand, that date thing is just the output of the date command.   One thing that you could do is simply start a second dzen with the date that updates every second, and then just shorten the width of your statusBarCmd.

In it's simplest form the clockdzen is :

while true:; do
date 
sleep 1
done | dzen -[i]blah[/i]

HTH


Knute

Offline

#303 2010-02-25 20:33:04

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: xmonad Hacking Thread

dannytatom wrote:

I just recently started using Xmonad and am rather pleased with it, though I do have quick question. Is there a way to have Firefox itself tile (like it already does) while letting popups from it (options, addons, popups from sites, etc etc) float?

Hello, sorry for the late response but I haven't been spending much time here lately. Check out my xmonad.hs here: http://bbs.archlinux.org/viewtopic.php? … 82#p667482


I have firefox with floating dialog boxes like the Add-ons, Downloads, and Bookmarks etc..... by using these "doFloat" hooks in my xmonad.hs:

Add:

import XMonad.Hooks.ManageDocks

then this hooks section (firefox stuff is at the bottom):

myManageHook = composeAll
   [ className =? "Gimp-2.6"                               --> (doFloat <+> viewShift "9"),
     className =? "Inkscape"                               --> viewShift "8",
     className =? "Googleearth-bin"                        --> viewShift "7",
     className =? "Stellarium"                             --> viewShift "7",
     className =? "Celestia"                               --> viewShift "7",
     className =? "Gpredict"                               --> viewShift "7",
     className =? "Mirage"                                 --> viewShift "6",
     className =? "Ristretto"                              --> viewShift "6",
     className =? "Xfce4-appearance-settings"              --> doFloat,
     className =? "Agave"                                  --> doFloat,
     className =? "Xfce4-screenshooter-plugin"             --> doFloat,
     className =? "Xfrun4"                                 --> doFloat,
     className =? "Gcalctool"                              --> doFloat,
     className =? "Xarchiver"                              --> doFloat,
     className =? "File-roller"                            --> doFloat,
     className =? "Firefox" <&&> resource =? "Dialog"      --> doFloat,
     className =? "Firefox" <&&> resource =? "Extension"   --> doFloat,
     className =? "Firefox" <&&> resource =? "Browser"     --> doFloat,
     className =? "Firefox" <&&> resource =? "Download"    --> doFloat
   ]
   where viewShift = doF . liftM2 (.) W.greedyView W.shift

then I also add this to the bottom part (mine is for the xfce4 config so it will be different):

main = xmonad $ xfceConfig
    {
    borderWidth        = myBorderWidth,
    normalBorderColor  = myNormalBorderColor,
        modMask            = myModMask,       
        workspaces         = myWorkspaces,
        manageHook         = myManageHook <+> manageHook xfceConfig,
        layoutHook         = gaps [(D,29), (U,20)] $ Tall 1 (3/100) (1/2) ||| Full,
    focusedBorderColor = myFocusedBorderColor
    }`additionalKeys` myKeys

To get the resource name for those firefox windows like the "Add-ons", I used this command ( and then just click the window with the "x"):

xprop | grep CLASS

then after clicking the little "x" mark onto the Add-ons window I get this result:

$  xprop | grep CLASS
WM_CLASS(STRING) = "Extension", "Firefox"

so I then I just wrote it like this and it worked fine for me:

     className =? "Firefox" <&&> resource =? "Dialog"      --> doFloat,
     className =? "Firefox" <&&> resource =? "Extension"   --> doFloat,
     className =? "Firefox" <&&> resource =? "Browser"     --> doFloat,
     className =? "Firefox" <&&> resource =? "Download"    --> doFloat

I Read all of section 1 of this xmonad wiki for the details: http://haskell.org/haskellwiki/Xmonad/G … nage_Hooks


my latest look:
Screenshot-feb2-1.png Screenshot-feb-1.png

Last edited by methuselah (2010-02-25 20:56:37)

Offline

#304 2010-02-25 21:04:45

eol
Member
Registered: 2009-05-30
Posts: 23

Re: xmonad Hacking Thread

Knute wrote:

One thing that you could do is simply start a second dzen with the date that updates every second, and then just shorten the width of your statusBarCmd.

In it's simplest form the clockdzen is :

while true:; do
date 
sleep 1
done | dzen -[i]blah[/i]

HTH

That's exactly what I did in the early beginning, and it works perfectly,
like with xsetroot in dwm.

But I still wander what do i miss to make it also work from the dzen bar launched
in xmonad.hs.

Anyone using XMonad.Util.Loggers here?

Offline

#305 2010-03-07 12:47:48

sime
Member
Registered: 2007-12-14
Posts: 96

Re: xmonad Hacking Thread

edit: nevermind

Last edited by sime (2010-03-08 16:39:11)

Offline

#306 2010-03-24 21:07:03

aheaume
Member
Registered: 2009-12-09
Posts: 10

Re: xmonad Hacking Thread

I just started to use xmonad, so I have a question : What's your favorite layout to code ?

Here's mine :

codeLayout cc = named (show cc ++ "c") ( limitWindows 3 $ magnifier' $ FixedColumn 1 20 cc 10 )

One master window (cc = 84, so vim can display the line numbers and 80 columns of code), and the 2 slaves are magnified whenever they are focused.

I'm happy with it so far, but I was wondering if you have some more haskell magic that could make it even more useful ;-)

Here's my full config:

import XMonad
import XMonad.Config.Azerty
import XMonad.Layout.FixedColumn
import XMonad.Layout.LayoutScreens
import XMonad.Layout.LimitWindows
import XMonad.Layout.Magnifier
import XMonad.Layout.Named
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.TwoPane
import XMonad.Hooks.DynamicLog
import qualified Data.Map as Map

main = xmonad =<< statusBar "xmobar" xmobarPP toggleStrutsKey myConfig

-- Keys
myKeys ( XConfig { modMask = modm } ) = Map.fromList $
        [ ((modm, xK_p), spawn "exe=`dmenu_path | dmenu -fn '-*-terminus-*-r-nor    mal-*-*-120-*-*-*-*-*-*' -nb '#3f3f3f' -nf '#dcdccc' -sb '#c3bf9f' -sf '#3f3f3f'    ` && eval \"exec $exe\"")
        , ((modm, xK_f), sendMessage $ ToggleLayout)
        , ((modm .|. shiftMask, xK_space), layoutScreens 2 (TwoPane 0.5 0.5))
        , ((modm .|. controlMask .|. shiftMask, xK_space), rescreen)
        ]

toggleStrutsKey XConfig { modMask = modm } = ( modm, xK_b )

-- Workspaces
ws1 = "1:main"
ws2 = "2:web"
ws3 = "3:code"
ws4 = "4:im"
ws5 = "5:media"
wsList = [ws1, ws2, ws3, ws4, ws5]

myWorkspaces = wsList ++ map show [(length wsList) .. 9 :: Int]

-- ManageHook
myManageHook = composeAll
        [ className =? c --> doShift "2:web" | c <- webApps ]
webApps = ["Chromium", "Uzbl-core"]


-- Layouts
codeLayout cc = named (show cc ++ "c") ( limitWindows 3
                                       $ magnifier'
                                       $ FixedColumn 1 20 cc 10
                                       )
wide  = named "Wide" (Mirror $ Tall 1 0.03 0.8)

myLayout = smartBorders $ toggleLayouts Full layouts
        where
                layouts = onWorkspace ws2 (wide)
                        $ onWorkspace ws3 (codeLayout 84)
                        $ (Tall 1 0.5 0.5 ||| (Mirror $ Tall 1 0.5 0.5))

-- Config
myConfig = azertyConfig
        { focusedBorderColor = "#c3bf9f"
        , keys = \c -> myKeys c `Map.union` keys azertyConfig c
        , layoutHook = myLayout
        , manageHook = myManageHook <+> manageHook azertyConfig
        , modMask  = mod4Mask
        , normalBorderColor = "#000000"
        , terminal = "urxvtc"
        , workspaces = myWorkspaces
        }

Offline

#307 2010-03-28 15:41:36

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: xmonad Hacking Thread

I was wondering if anybody knew if there was a way to have borders of one size for tiled windows, then have larger borders for floating windows?

To add to the question above me, I use this layout:

code    =    combineTwo (twoThrF) (tTCol) (rTall)
rTall    =    ResizableTall 1 (1/100) (1/3) []
twoThrF    =    TwoPane (1/100) (3/4)
tTCol    =    ThreeCol 1 (1/100) (1/3)

What that mess does is create a layout where on left there are three columns, and on the right there is supposed to be one column that can be resized up/down. That doesn't work for me, and I couldn't get the move window left/right to work, so there is only ever one window there. On my screen, all the windows are ~90 characters wide. I can't remember why they're named like that, but I do know it's easier than having a line full of open and close parenthesis.

If anybody knows how to get the comineTwo layout keybindings to work, that'd be awesome as I have a few other layouts like this too.
EDIT: Figured it out by going back to the documentation again, I apperently kept missing where it said to put the layouts in wrapped with "windowNavigation", e.g.: "myLayouts = windowNavigation (code)"

Last edited by jac (2010-03-28 16:24:27)

Offline

#308 2010-03-29 00:31:33

sw2wolf
Member
From: China
Registered: 2009-06-08
Posts: 99
Website

Re: xmonad Hacking Thread

Why cannot i receive any email from xmonad maillist ? 
I have subscribed from http://www.haskell.org/mailman/listinfo/xmonad.

Sincerely!


e^(π⋅i) + 1 = 0

Offline

#309 2010-04-21 01:41:53

ScottKidder
Member
Registered: 2008-10-27
Posts: 23

Re: xmonad Hacking Thread

SamC wrote:

Does anyone know if it is possible to keep the focus on the current window when a new window is created?

I'm not sure if someone had already answered this but I do this with this bit of code:

-- Manage hook
myManageHook = composeAll
    [  className =? "Xmessage"  --> doFloat 
    ,  className =? "Pidgin"   --> doShift "IM"      
    ,  title     =? "htop"     --> doShift "MNTR"
    ,  title     =? "irssi"    --> doShift "IRSSI"
    ,  title     =? "ncmpcpp"  --> doShift "MUSIC"
    ] 
        <+> (fmap not isDialog --> doF avoidMaster)

avoidMaster :: W.StackSet i l a s sd -> W.StackSet i l a s sd
avoidMaster = W.modify' $ \c -> case c of
    W.Stack t [] (r:rs) -> W.Stack t [r] rs
    otherwise            -> c

and here is my whole xmonad.hs

import XMonad
import qualified XMonad.StackSet as W
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.UrgencyHook
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Prompt.XMonad
import XMonad.Prompt.RunOrRaise
import XMonad.Layout.NoBorders
import Control.Monad
import System.IO
import Data.List
import Data.Ratio ((%))
import qualified Data.Map as M

-- Simple configuration
myTerminal = "urxvt"
myBorderWidth = 4
myModMask = mod4Mask
myWorkspaces = ["WEB", "IRSSI", "TERM", "IM", "MUSIC", "MNTR", "#"]   
myBorder = "#110E17"
myFocusedBorder = "#85960C"

-- Layout Hook
mylayoutHook = smartBorders $ Mirror tiled ||| tiled ||| Full
    where
    tiled = Tall nmaster delta ratio
    nmaster = 1
    delta = 3 / 100
    ratio = 13 / 20

-- Manage hook
myManageHook = composeAll
    [  className =? "Xmessage"  --> doFloat 
    ,  className =? "Pidgin"   --> doShift "IM"      
    ,  title     =? "htop"     --> doShift "MNTR"
    ,  title     =? "irssi"    --> doShift "IRSSI"
    ,  title     =? "ncmpcpp"  --> doShift "MUSIC"
    ] 
        <+> (fmap not isDialog --> doF avoidMaster)

avoidMaster :: W.StackSet i l a s sd -> W.StackSet i l a s sd
avoidMaster = W.modify' $ \c -> case c of
    W.Stack t [] (r:rs) -> W.Stack t [r] rs
    otherwise            -> c

-- Log Hook
myLogHook = fadeInactiveLogHook fadeAmount
    where fadeAmount = 0.87

----------Start main-----------------
main = do
    xmproc <- spawnPipe "xmobar"
    xmonad $ withUrgencyHook NoUrgencyHook defaultConfig
    { manageHook         = manageHook defaultConfig <+> myManageHook 
    , layoutHook         = avoidStruts $ mylayoutHook
    , startupHook        = setWMName "LG3D"
    , keys               = \c -> mykeys c `M.union` keys defaultConfig c 
    , terminal           = myTerminal
    , modMask            = myModMask
    , borderWidth        = myBorderWidth
    , focusFollowsMouse  = True
    , normalBorderColor  = myBorder
    , focusedBorderColor = myFocusedBorder
    , workspaces         = myWorkspaces 
    , logHook            = myLogHook >> dynamicLogWithPP  xmobarPP
                                      { ppOutput          = hPutStrLn xmproc
                                      , ppCurrent         = xmobarColor "#565342" "#C6E108" . wrap "[""]"
                                      , ppVisible         = xmobarColor "#C6E108" "#565342" . wrap "("")"
                                      , ppHidden          = xmobarColor "#85960C" "" 
                                      , ppHiddenNoWindows = xmobarColor "#565342" ""
                                      , ppUrgent          = xmobarColor "#F2F5EE" "#D8191E" . wrap "**""**" .xmobarStrip        
                                      , ppTitle           = xmobarColor "#D8191E" "" . shorten 50
                                      , ppLayout          = xmobarColor "#F2F5EE" ""
                                      , ppSep             = " *-* " } 

    }    
    where
            mykeys (XConfig {modMask = modm}) = M.fromList $
        [   ((modm, xK_f), spawn "firefox")      
          , ((modm .|. shiftMask, xK_apostrophe), spawn "ncmpcpp prev")
                  , ((modm .|. shiftMask, xK_period), spawn "ncmpcpp next")
          , ((modm .|. shiftMask, xK_p), spawn "ncmpcpp toggle")
          , ((modm .|. controlMask, xK_p), runOrRaisePrompt defaultXPConfig)]
            ++    
          [ ((modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) 
                      | (key, sc) <- zip [xK_w, xK_v, xK_z] [0..]
                      , (f, m) <- [(W.view, 0)]]

archlinux|xmonad
++++++++++[>++++++++>+++++++>+++<<<-]>+++.>---.<----.+++++..>>++.<++++++++.--.-----..+.<--.

Offline

#310 2010-04-30 12:09:46

lymphatik
Member
From: Somewhere else
Registered: 2009-03-07
Posts: 119

Re: xmonad Hacking Thread

Does anyone know a way to kill a window with middle click when using gridselect. Follow the link for an example of grid select

http://blog.clemens.endorphin.org/2008/ … elect.html

Offline

#311 2010-04-30 14:19:41

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: xmonad Hacking Thread

lymphatik wrote:

Does anyone know a way to kill a window with middle click when using gridselect. Follow the link for an example of grid select

http://blog.clemens.endorphin.org/2008/ … elect.html

Currently button1 is hardcoded to run the same action as if you had pressed enter (which is hardcoded too).

But perhaps good enough is to just add a different keybinding to open a gridselect whose only action is to kill the selected window.

Offline

#312 2010-04-30 14:32:12

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: xmonad Hacking Thread

Can someone tell me why my window rules aren't working?  I've been staring at it for too long now.  wink

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import qualified XMonad.StackSet as W

-- layouts
import XMonad.Layout
import XMonad.Layout.IM
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.Reflect
import XMonad.Layout.Combo
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import Data.Ratio ((%))
import XMonad.Layout.Gaps


-- layout definitions
customLayout = gaps [(D,16)] $ avoidStruts $ ResizableTall 2 (3/100) (1/2) [] ||| withIM (1%7) (ClassName "Buddy List") Grid ||| layoutHook defaultConfig

-- Workspaces
myWorkspaces =  ["term","www","blender","luxrender","image","6","7","8","9"]

-- Window rules
myManageHook = composeAll
    [ title =? "blender" --> doShift "blender"
    , title =? "luxrender" --> doShift "luxrender"
    , className =? "vimperator" --> doShift "www"
    , title =? "Gimp" --> doShift "image"
    ]

-- icons directory
myBitmapsDir = "/home/lghman/.dzen"

-- main config
main = do
    dzenSbar <- spawnPipe sBarCmd
    dzenConkyTop <- spawnPipe topBarCmd
    dzenConkyBot <- spawnPipe botBarCmd
    spawn "xcompmgr"  
    xmonad $ defaultConfig
        { manageHook = manageHook defaultConfig <+> myManageHook
        , terminal = "urxvt"
        , workspaces = myWorkspaces
        , borderWidth = 0
        , normalBorderColor = "#000000"
        , focusedBorderColor = "#3399ff"
        , layoutHook = customLayout
        , logHook = dynamicLogWithPP $ myDzenPP dzenSbar
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        ([ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
    , ((mod4Mask, xK_a), sendMessage MirrorShrink)
    , ((mod4Mask, xK_z), sendMessage MirrorExpand)
    ]
     ++
 
      --
        -- mod-[1..9], Switch to workspace N
          -- mod-shift-[1..9], Move client to workspace N
      --
        [((m .|. mod4Mask, k), windows $ f i)
        | (i, k) <- zip (myWorkspaces) [xK_1 .. xK_9]
        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]])



-- dzen config
sBarCmd = "dzen2 -fn nu -bg '#000000' -fg '#ffffff' -h 16 -w 640 -ta l"
topBarCmd = "conky -c /home/lghman/.conkyrc | dzen2 -fn nu -bg '#000000' -fg '#ffffff' -h 16 -w 640 -x 640 -ta r"
botBarCmd = "conky -c ~/.conky_bottom_dzen | dzen2 -fn nu -bg '#630714' -fg '#ffffff' -h 16 -y 784 -w 1280 -ta c"

myDzenPP dzenSbar = defaultPP
     { ppCurrent = wrap "^p()[^fg(#630714)" "^fg()]^p()"
     , ppUrgent = wrap "!^fg(purple)^p()" "^fg()^p()"
     , ppVisible = wrap "^p()[^fg()" "^fg()]^p()"
     , ppTitle = wrap "^fg(#630714)< ^fg(#ffffff)" "^fg(#630714) >^fg()" . shorten 90
     , ppSep = " : "
     , ppWsSep = " : "
     , ppLayout = dzenColor "#630714" "#000000" .
            (\x -> case x of
                   "Tall" -> "^i(" ++ myBitmapsDir ++ "/tall.xbm)"
                   "Mirror Tall" -> "^i(" ++ myBitmapsDir ++ "/mtall.xbm)"
                   "Full" -> "^i(" ++ myBitmapsDir ++ "/full.xbm)"
           "ResizableTall" -> "^i(" ++ myBitmapsDir ++ "/resizableGrid.xbm)"
           "IM Grid" -> "^i(" ++ myBitmapsDir ++ "/im-layout.xbm)"
                   _ -> x
                   )
     , ppOutput = hPutStrLn dzenSbar
}

#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#313 2010-05-01 12:51:05

slumslayer
Member
From: Belgium
Registered: 2008-09-14
Posts: 66

Re: xmonad Hacking Thread

http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-Place.html wrote:

... hooks combined with <+> are applied from right to left ...

So they may be overwritten by defaultConfig
try with

manageHook = myManageHook <+> manageHook defaultConfig

Offline

#314 2010-05-01 16:03:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: xmonad Hacking Thread

lifeafter2am wrote:

Can someone tell me why my window rules aren't working?  I've been staring at it for too long now.  wink

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import qualified XMonad.StackSet as W

-- layouts
import XMonad.Layout
import XMonad.Layout.IM
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.Reflect
import XMonad.Layout.Combo
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import Data.Ratio ((%))
import XMonad.Layout.Gaps


-- layout definitions
customLayout = gaps [(D,16)] $ avoidStruts $ ResizableTall 2 (3/100) (1/2) [] ||| withIM (1%7) (ClassName "Buddy List") Grid ||| layoutHook defaultConfig

-- Workspaces
myWorkspaces =  ["term","www","blender","luxrender","image","6","7","8","9"]

-- Window rules
myManageHook = composeAll
    [ title =? "blender" --> doShift "blender"
    , title =? "luxrender" --> doShift "luxrender"
    , className =? "vimperator" --> doShift "www"
    , title =? "Gimp" --> doShift "image"
    ]

-- icons directory
myBitmapsDir = "/home/lghman/.dzen"

-- main config
main = do
    dzenSbar <- spawnPipe sBarCmd
    dzenConkyTop <- spawnPipe topBarCmd
    dzenConkyBot <- spawnPipe botBarCmd
    spawn "xcompmgr"  
    xmonad $ defaultConfig
        { manageHook = manageHook defaultConfig <+> myManageHook
        , terminal = "urxvt"
        , workspaces = myWorkspaces
        , borderWidth = 0
        , normalBorderColor = "#000000"
        , focusedBorderColor = "#3399ff"
        , layoutHook = customLayout
        , logHook = dynamicLogWithPP $ myDzenPP dzenSbar
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        ([ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
    , ((mod4Mask, xK_a), sendMessage MirrorShrink)
    , ((mod4Mask, xK_z), sendMessage MirrorExpand)
    ]
     ++
 
      --
        -- mod-[1..9], Switch to workspace N
          -- mod-shift-[1..9], Move client to workspace N
      --
        [((m .|. mod4Mask, k), windows $ f i)
        | (i, k) <- zip (myWorkspaces) [xK_1 .. xK_9]
        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]])



-- dzen config
sBarCmd = "dzen2 -fn nu -bg '#000000' -fg '#ffffff' -h 16 -w 640 -ta l"
topBarCmd = "conky -c /home/lghman/.conkyrc | dzen2 -fn nu -bg '#000000' -fg '#ffffff' -h 16 -w 640 -x 640 -ta r"
botBarCmd = "conky -c ~/.conky_bottom_dzen | dzen2 -fn nu -bg '#630714' -fg '#ffffff' -h 16 -y 784 -w 1280 -ta c"

myDzenPP dzenSbar = defaultPP
     { ppCurrent = wrap "^p()[^fg(#630714)" "^fg()]^p()"
     , ppUrgent = wrap "!^fg(purple)^p()" "^fg()^p()"
     , ppVisible = wrap "^p()[^fg()" "^fg()]^p()"
     , ppTitle = wrap "^fg(#630714)< ^fg(#ffffff)" "^fg(#630714) >^fg()" . shorten 90
     , ppSep = " : "
     , ppWsSep = " : "
     , ppLayout = dzenColor "#630714" "#000000" .
            (\x -> case x of
                   "Tall" -> "^i(" ++ myBitmapsDir ++ "/tall.xbm)"
                   "Mirror Tall" -> "^i(" ++ myBitmapsDir ++ "/mtall.xbm)"
                   "Full" -> "^i(" ++ myBitmapsDir ++ "/full.xbm)"
           "ResizableTall" -> "^i(" ++ myBitmapsDir ++ "/resizableGrid.xbm)"
           "IM Grid" -> "^i(" ++ myBitmapsDir ++ "/im-layout.xbm)"
                   _ -> x
                   )
     , ppOutput = hPutStrLn dzenSbar
}

Blender needs to be capitalized and Gimp used with className works properly.

Offline

#315 2010-05-01 21:03:12

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: xmonad Hacking Thread

Awesome, I don't know what did it, but I did what both of you said and now everything except firefox is working.  Now I just need to figure out why firefox won't play nicely.  I've tried both className and title and both firefox and Firefox and Vimperator and vimperator. 

The important ones though were Blender and Luxrender (especially this one since it is called by Blender) so thanks for that!  big_smile


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#316 2010-05-01 21:51:19

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: xmonad Hacking Thread

lifeafter2am wrote:

Awesome, I don't know what did it, but I did what both of you said and now everything except firefox is working.  Now I just need to figure out why firefox won't play nicely.  I've tried both className and title and both firefox and Firefox and Vimperator and vimperator. 

The important ones though were Blender and Luxrender (especially this one since it is called by Blender) so thanks for that!  big_smile

Firefox isn't "Firefox" in the official Arch repos. As usual, running xprop and pointing it at the application will tell you what needs to be done. Alternatively, you can get a more official Firefox.

Offline

#317 2010-05-01 21:55:52

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: xmonad Hacking Thread

skottish wrote:
lifeafter2am wrote:

Awesome, I don't know what did it, but I did what both of you said and now everything except firefox is working.  Now I just need to figure out why firefox won't play nicely.  I've tried both className and title and both firefox and Firefox and Vimperator and vimperator. 

The important ones though were Blender and Luxrender (especially this one since it is called by Blender) so thanks for that!  big_smile

Firefox isn't "Firefox" in the official Arch repos. As usual, running xprop and pointing it at the application will tell you what needs to be done. Alternatively, you can get a more official Firefox.

Total and complete awesomeness now! 

I actually didn't know about xprop, thanks for that tip skottish!  big_smile


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#318 2010-05-01 22:56:32

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: xmonad Hacking Thread

lifeafter2am wrote:

... snip ...

Total and complete awesomeness now! 

I actually didn't know about xprop, thanks for that tip skottish!  big_smile

You made it this far without knowing about xprop? Wow!

Offline

#319 2010-05-04 21:50:28

Chance
Member
Registered: 2008-12-05
Posts: 99

Re: xmonad Hacking Thread

Is there a way to run gnome-panel + nautilus in xmonad without having to integrate xmonad within gnome? I'm having so much trouble trying to get either just xmonad alone, or xmonad + gnome to work.

Whenever I try to use xmonad as the wm in gnome, I can't move any windows, and commands don't work. When i try to use just xmonad, there are these random dead grey boxes that pop up and won't close when i try to kill it. I've been following the guide on the xmonad webpage as well as the wiki and still have trouble with this.

Offline

#320 2010-05-24 11:58:10

viktiglemma
Member
Registered: 2010-05-24
Posts: 1

Re: xmonad Hacking Thread

Hi

I'm not getting any sound in Xmonad. In alsamixer everything is turned to max and nothing is muted. If I go into Gnome I have sound. Any ideas?

Offline

#321 2010-05-24 12:11:01

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad Hacking Thread

Is gnome set up to use like pulseaudio or esd?

Xmonad won't automatically start those,  so you have to tell either xmonad or X to start them.


Knute

Offline

#322 2010-05-24 20:21:54

George_K
Member
From: Russie, Saint-Pétersbourg
Registered: 2006-09-27
Posts: 75

Re: xmonad Hacking Thread

viktiglemma wrote:

Hi

I'm not getting any sound in Xmonad. In alsamixer everything is turned to max and nothing is muted. If I go into Gnome I have sound. Any ideas?

Try "pulseaudio --start". What does pavucontrol show?

Offline

#323 2010-06-06 14:55:51

paldepind
Member
From: Århus, Denmark
Registered: 2010-02-17
Posts: 141

Re: xmonad Hacking Thread

XMonad is driving me nuts! Configuring is really a pita, no matter what I do I get error messages..

I have a very simple config that works. But when I try to import DynamicLog, which I need to get dzen working in xmonad, it breaks.

This is my config:

import XMonad
import XMonad.Hooks.DynamicLog

main=do
        xmonad $ defaultConfig
        { terminal    = "urxvt"
        , modMask     = mod4Mask
        , borderWidth = 1
        }

It gives this error: Could not find module `XMonad.Hooks.DynamicLog'

Last edited by paldepind (2010-06-06 14:56:05)

Offline

#324 2010-06-06 15:04:38

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad Hacking Thread

paldepind wrote:

XMonad is driving me nuts! Configuring is really a pita, no matter what I do I get error messages..

I have a very simple config that works. But when I try to import DynamicLog, which I need to get dzen working in xmonad, it breaks.

This is my config:

import XMonad
import XMonad.Hooks.DynamicLog

main=do
        xmonad $ defaultConfig
        { terminal    = "urxvt"
        , modMask     = mod4Mask
        , borderWidth = 1
        }

It gives this error: Could not find module `XMonad.Hooks.DynamicLog'

Do you have the xmonad-contrib package installed?

If not, then you don't have DynamicLog installed.


Knute

Offline

#325 2010-06-06 15:18:27

myrkiada
Member
From: Norway
Registered: 2009-04-15
Posts: 74

Re: xmonad Hacking Thread

I recommend installing xmonad-darcs from AUR (both xmonad-darcs and xmonad-contrib-darcs), but be sure to update every once in a while so you always have the newest modules etc.


My Configs @ Github

Offline

Board footer

Powered by FluxBB