You are not logged in.

#526 2011-10-17 21:40:46

nnoell
Member
From: Spain
Registered: 2010-08-21
Posts: 99

Re: xmonad Hacking Thread

nexus7 wrote:

Thanks a lot again. smile

I'm again getting a

Not in scope: `conf'

-error with this...

How do you declare myKeys? do you have conf@ at the begining?, like so:

myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
....
nexus7 wrote:

2nd, how to implement an individual layout like for gimp? Remember, my ws names got a bit more complicated because of my extra ws font. -- Redefining the names with "where" so far results in following error: ...

Put your workspaces like before, you can refer to them by typing (myWorkspaces !! 0) instead of "firstworkspace", (myWorkspaces !! 1) instead of  "secondworkspace" and so on. So, to implement an individual gimp layout you should do that, but remember, put (myWorkspaces !! 3) (if you want gimp layout on the fourth workspace) instead of "gimp".

Offline

#527 2011-10-17 22:28:55

nexus7
Member
From: brain dump
Registered: 2006-12-06
Posts: 285

Re: xmonad Hacking Thread

Managing both at the same time failed... tongue

So step by step:

nnoell wrote:

How do you declare myKeys? do you have conf@ at the begining?, like so:

myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
....

Well didn't have a "@". My former config was just:

main = do
...
        xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig
            { modMask            = myModMask 
                ...
            } 
            `additionalKeysP` myKeys
...
myModMask = mod4Mask
...
myKeys =  [ ... ]

Entering yours is leading to

xmonad.hs:74:31:
    Couldn't match expected type `[(String, X ())]'
                with actual type `XConfig t0 -> M.Map [Char] (X ())'
    In the second argument of `additionalKeysP', namely `myKeys'
    In the second argument of `($)', namely
      `defaultConfig
         {modMask = myModMask, terminal = "terminal", borderWidth = 1,
          normalBorderColor = "#222222", focusedBorderColor = "#3399ff",
          workspaces = myWorkspaces, layoutHook = myLayoutHook,
          manageHook = manageDocks <+> myManageHook
                   <+>
                     manageHook defaultConfig,
          logHook = myLogHook status, startupHook = myStartupHook}
     `additionalKeysP`
       myKeys'
    In the second argument of `($)', namely
      `withUrgencyHook NoUrgencyHook
     $   defaultConfig
           {modMask = myModMask, terminal = "terminal", borderWidth = 1,
            normalBorderColor = "#222222", focusedBorderColor = "#3399ff",
            workspaces = myWorkspaces, layoutHook = myLayoutHook,
            manageHook = manageDocks <+> myManageHook
                     <+>
                       manageHook defaultConfig,
            logHook = myLogHook status, startupHook = myStartupHook}
       `additionalKeysP`
         myKeys'

What's that "XConfig"-stuff, am I missing another module? XMonad.Core didn't help that (but I had to import "qualified Data.Map as M" btw.)


we are Arch.
you will be assimilated!
resistance is futile!

Offline

#528 2011-10-17 23:13:10

nnoell
Member
From: Spain
Registered: 2010-08-21
Posts: 99

Re: xmonad Hacking Thread

Lol, it is the first time I see an xmonad key setup like yours. I don't understand it very well. I suggest you to declare myKeys inside xmonad main function, like my old xmonad.hs:

main = do
        workspaceBar            <- spawnPipe myWorkspaceBar
        xmonad $ withUrgencyHook NoUrgencyHook defaultConfig
                { terminal           = myTerminal
                , modMask            = myModMask
                ...
                , keys               = myKeys
                , mouseBindings      = myMouseBindings
                }


myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
                [ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
                , ....
                ]
                ++
                [((m .|. modMask, k), windows $ f i)
                     | (i, k) <- zip (XMonad.workspaces conf) ([xK_1 .. xK_9] ++ [xK_0])
                     , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
                ++
                [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
                     | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
                     , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]

BTW, if the problem still persists, could you post your entirely xmonad.hs?

Offline

#529 2011-10-18 00:48:18

nexus7
Member
From: brain dump
Registered: 2006-12-06
Posts: 285

Re: xmonad Hacking Thread

nnoell wrote:

Lol, it is the first time I see an xmonad key setup like yours. I don't understand it very well. I suggest you to declare myKeys inside xmonad main function, like my old xmonad.hs:...

I'll check this out. smile

nnoell wrote:

BTW, if the problem still persists, could you post your entirely xmonad.hs?

Yep, and to make things easier, I'll revert to standard style keybindings.

Last edited by nexus7 (2011-10-25 22:22:37)


we are Arch.
you will be assimilated!
resistance is futile!

Offline

#530 2011-10-25 22:44:36

nexus7
Member
From: brain dump
Registered: 2006-12-06
Posts: 285

Re: xmonad Hacking Thread

Back after being offline for a couple of days.
And now, time to proceed! smile


So this is my masterpiece, or say "construction site". It is best viewed in wide layout.

Many things are working fine, while some are not, and I still need helping hands, because I'm actually stuck. tongue

(1)    In myManageHook, for example, workspace shifting ability somehow has been lost...

(2)    What I also don't fully understand is when one needs to declare what type of window class (class, title, name and all)?

(3)    How to declare a client that should shift and float?

(4)    Many key bindings work, some don't (anymore). -- Despite to the following list, they are all written in classic style in the config file:

M-a	X
M-b	stalonetray disappeares (OK), xmobar & dzen above window(s)
M-c	OK		M-S-h	OK		M-m	X		M-S-t	OK		M-Ret	OK
M-S-d	OK		M-j	OK		M-C-n	X		M-u	X		M-C-Del	X
M-f	X		M-k	OK		M-q	OK		M-S-x	OK		M-C-Ins	X
M-S-f	OK		M-l	OK		M-S-q	OK		M-z	X		M-Tab	OK
M-S-g	OK		M-S-l	OK		M-r	X		M-.	OK		M1-Tab	OK
M-h	OK		M-S-m	OK		M-s	X		M-,	OK		M-Left	OK		M-Right	OK

(5)    I'm still looking for a gimp layout to work, which I'd like to

(6)    be nested within a tabbed layout. -- The background is that all graphics apps should all go to a certain ws, with gimp placed in gimpLayout in one tab, and others (like viewers as ristretto ...) full or tiled in an/other tab/s.

(7)    The actual .hs-config contains several layouts, which I want to test in everyday use, since my desktop should not just be cool but also productive. Therefor I'd like to have a subset of layouts for certain workspaces, but haven't got them to run.



Well, I feel just like trying to learn a language by citing proverbs~ tongue


we are Arch.
you will be assimilated!
resistance is futile!

Offline

#531 2011-10-26 16:40:45

nexus7
Member
From: brain dump
Registered: 2006-12-06
Posts: 285

Re: xmonad Hacking Thread

(Very) little improvements.

My ws named as is:

myWorkspaces :: [String]
myWorkspaces =  [ "^fn(" ++ wsFont ++ ")1"
                , "^fn(" ++ wsFont ++ ")2"
                , "^fn(" ++ wsFont ++ ")3"
                , "^fn(" ++ wsFont ++ ")4"
                , "^fn(" ++ wsFont ++ ")5"
                , "^fn(" ++ wsFont ++ ")6"
                , "^fn(" ++ wsFont ++ ")7"
                , "^fn(" ++ wsFont ++ ")8"
                , "^fn(" ++ wsFont ++ ")9"
                , "^fn(" ++ wsFont ++ ")0"
                ]

Then changed layouts to the following:

myLayoutHook    = onWorkspaces ["5"] gimpLayout $ mainLayouts

mainLayouts     = avoidStruts $ smartBorders   
                $ (Mirror tiled ||| tiled ||| Circle ||| Grid ||| mosaic 2 [3,2] ||| Full)
        where
                tiled           = ResizableTall nmaster delta ratio []
                nmaster         = 1    
                ratio           = 1/2  
                delta           = 3/100

gimpLayout      = avoidStruts   $ withIM (0.11) (Role "gimp-toolbox")
                $ reflectHoriz  $ withIM (0.15) (Role "gimp-dock") Full

Compiled without errors and restarted. But why the hell does gimp still not go to "5" and not get arranged into gimpLayout?


Edit:\\

Shifting works when ws is renamed into a string of letters like this:

myWorkspaces :: [String]
myWorkspaces =  [ "^fn(" ++ wsFont ++ ")1"      -- system
                , "^fn(" ++ wsFont ++ ")2"      -- manage
                , "^fn(" ++ wsFont ++ ")3"      -- dic
                , "^fn(" ++ wsFont ++ ")4"      -- dtp
                , "gfx" -- graphics
                , "^fn(" ++ wsFont ++ ")6"      -- doc
                , "^fn(" ++ wsFont ++ ")7"      -- www
                , "^fn(" ++ wsFont ++ ")8"      -- com
                , "^fn(" ++ wsFont ++ ")9"      -- multimedia
                , "^fn(" ++ wsFont ++ ")0"      -- vm
                ]
        where
                gfx     = "^fn(" ++ wsFont ++ ")5"      --  no effect when enclosed in (  ) or [  ]

myManageHook    :: ManageHook
myManageHook    = (composeAll . concat $
        [ ...
        , [className    =? c    --> doShift     "gfx"   | c     <- myGfx        ] --    graphics
          ...
        ]) 
        where
                role    = stringProperty "WM_WINDOW_ROLE"
                name    = stringProperty "WM_NAME"

However in ppLayout the workspace is displayed with the wrong font and as string "gfx" instead of the number "5".
Also though gimp is on "5" it is always shown "Mirror tiled", and even ignores other layouts; ntl there is no "gimpLayout" on "5", just the "mainLayouts".

Then, "gimpLayout" still can't be selected, only mainLayouts work. Probably because if this ppLayout doesn't show the gimp-icon as definded in here:

        , ppLayout      = dzenColor myLayoutFgColor myLayoutBgColor .
                (\x ->  case x of
                                ...
                        "gimpLayout"            -> " ^i(/home/USER/.icons/xdzen/gimp.xbm) " ++ " "
                )

Last edited by nexus7 (2011-10-26 20:42:38)


we are Arch.
you will be assimilated!
resistance is futile!

Offline

#532 2011-10-26 22:41:15

nnoell
Member
From: Spain
Registered: 2010-08-21
Posts: 99

Re: xmonad Hacking Thread

nexus7 wrote:

However in ppLayout the workspace is displayed with the wrong font and as string "gfx" instead of the number "5".

I have already answered that:

nnoell wrote:
nexus7 wrote:

2nd, how to implement an individual layout like for gimp? Remember, my ws names got a bit more complicated because of my extra ws font. -- Redefining the names with "where" so far results in following error: ...

Put your workspaces like before, you can refer to them by typing (myWorkspaces !! 0) instead of "firstworkspace", (myWorkspaces !! 1) instead of  "secondworkspace" and so on. So, to implement an individual gimp layout you should do that, but remember, put (myWorkspaces !! 3) (if you want gimp layout on the fourth workspace) instead of "gimp".

Applied to your xmonad.hs:

        [ ...
        , [className    =? c    --> doShift     (myWorkspaces !! 4)   | c     <- myGfx        ] --    graphics
          ...
        ]) 
nexus7 wrote:

Compiled without errors and restarted. But why the hell does gimp still not go to "5" and not get arranged into gimpLayout?

Same as before, use (myWorkspaces !! 4):

nexus7 wrote:

myLayoutHook    = onWorkspaces (myWorkspaces !! 4) gimpLayout $ mainLayouts

mainLayouts     = avoidStruts $ smartBorders   
                $ (Mirror tiled ||| tiled ||| Circle ||| Grid ||| mosaic 2 [3,2] ||| Full)
        where
                tiled           = ResizableTall nmaster delta ratio []
                nmaster         = 1   
                ratio           = 1/2 
                delta           = 3/100

gimpLayout      = avoidStruts   $ withIM (0.11) (Role "gimp-toolbox")
                $ reflectHoriz  $ withIM (0.15) (Role "gimp-dock") Full

Offline

#533 2011-10-26 23:42:22

nexus7
Member
From: brain dump
Registered: 2006-12-06
Posts: 285

Re: xmonad Hacking Thread

Hi again! smile

====

<final edit>

OK, it's enough!
It hasn't been my intention to 'hijack' this thread there's no sense in endless exhausting posts here anymore. I'll quit and go start my own thread. wink

Here we go!

Last edited by nexus7 (2011-10-28 01:20:21)


we are Arch.
you will be assimilated!
resistance is futile!

Offline

#534 2011-10-31 04:33:00

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: xmonad Hacking Thread

I am attempting to use either XMonad.Layout.LayoutCombinators or XMonad.Layout.Combo to create a layout whereby I have a single master pane on the the left and all slaves (if any) on the right in a tabbed layout. I have something close to what i want with either LayoutCombinators or Layout.Combo, but when there are several windows open in my custom layout, there appear to be multiple masters on the left and only one slave window on the right. I am assuming they are all master windows because they respond to resize commands as master windows do in other layouts.

I am unable to figure out how to produce the desired behaviour I described above.

Here is my xmonad.hs. It is currently a bit of a mess as it's always a work in progress, but I hope it's not too hard to figure out what I am trying to do and how I am trying to do it.

http://pastebin.com/VERk96F4

I considered that the problem might be related to:

newManageHook        = insertPosition End Newer <+> myManageHook

which changes the order in which new windows are attached, but I still seem to have the problem when I comment out newManageHook and use myManageHook as my manageHook (if that makes sense!).

Have I misunderstood how these layouts are supposed to work? Is there a way to produce the behaviour I seek?

EDIT: I am now attempting this with XMonad.Layout.Master. I am very close to having what I want, but I want a decoration on the master window.

((mastered 0.05 0.5) $ (tabbed shrinkText myTabConfig))

This works in my layout hook. Not sure if all the parentheses are necessary, but it works. Now I need to somehow get 'simpleDeco shrinkText mySDConfig' in there to modify the master window (and only the master window; obviously I don't need decorations on the tabbed windows), but I am not familiar enough with the syntax of Haskell to figure it out, even with trial and error.

EDIT22: This gives me pretty much what I want:

addTabsAlways shrinkText myTabConfig (mastered 0.05 0.5 Simplest)

Last edited by hellomynameisphil (2011-11-03 16:36:50)

Offline

#535 2011-12-29 21:24:54

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,536

Re: xmonad Hacking Thread

import XMonad.Actions.RotSlaves
...
        , ((modM, xK_bracketleft  ), rotAllUp)
        , ((modM, xK_bracketright ), rotAllDown)

is great, especially with the Circle layout.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#536 2012-01-09 03:24:41

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: xmonad Hacking Thread

Just installed Xmonad yesterday and spent half the night configuring it. Starting to wonder why I haven't switched earlier big_smile
Anyway, just a couple (hopefully simple) question:
1) Is it possible to destroy workspaces automatically once the last window on that workspace is closed? I can make xmonad switch to a newly created workspace with

doF . liftM2 (.) W.greedyView W.shift

but when I close the last application, the focus remains on the workspace. I would like to switch it back to the last used workspace (or when there's no used workspace back to "1"). I know that xmonad workspaces don't actually get destroyed, but ... Well, what I want is (eg.):
Say, I'm working on something on workspace "1" and want look up a fact. I open Firefox through dmenu and it gets placed on workspace "2". The focus switches to workspace "2" automatically and I can do my research. When I'm finished, I simply close Firefox and get back to workspace "1" without further interaction. Possible?

2) I'm trying to get ncmpcpp placed on a workspace when invoked. I've tried the hook in various combinations of className and title and resouce with "ncmpc", "ncmpc++", and "ncmpc++ ver. 0.5.8", etc. but nothing works. I'm suspecting that Urxvtc opens first, which doesn't trigger a shift. Does anyone know of a solution for that? Couldn't find anything online.

Thanks in advance.

Just to keep with the tradition, here's my setup:

import XMonad
import XMonad.Layout.Spacing		-- Allow spaces around windows
import XMonad.Layout.NoBorders		-- No border for fullscreen layout
import XMonad.Actions.RotSlaves		-- Rotates Windows anti-/clockwise
import XMonad.Hooks.DynamicLog		-- status output for dock
import XMonad.Hooks.ManageDocks		-- don't meddle with the dock
import XMonad.Util.Run (spawnPipe)	-- needed for spawnPipe (dzen)
-- TODO import XMonad.Util.EZConfig	(additionalKeysP)
import System.Exit
import System.IO	(hPutStrLn)	-- hPutStrLn
import qualified XMonad.StackSet as W
import qualified Data.Map        as M
import Control.Monad (liftM2)		-- for viewShift

main = do
	status <- spawnPipe jackDzenStatus
	conky  <- spawnPipe jackDzenConky
	xmonad $ defaultConfig
		{ terminal		= "urxvtc"
		, modMask		= mod4Mask
		, normalBorderColor	= "#1a1a1a"
		, focusedBorderColor	= "#1f6080"
		, focusFollowsMouse	= jackFocusFollowsMouse
		, workspaces		= jackWorkspaces
		, keys			= jackKeys
		, layoutHook		= jackLayoutHook
		, manageHook		= manageDocks <+> jackManageHook <+> manageHook defaultConfig
		, logHook		= jackLogHook status
		}

-- Sloppy focus
jackFocusFollowsMouse	:: Bool
jackFocusFollowsMouse	= False

-- Workspaces
jackWorkspaces		:: [String]
jackWorkspaces		= clickable . (map dzenEscape) $ ["1-term","2-net","3-vid","4-pic","5-music"] ++ map show [6..9 :: Int]
	where clickable l = [ "^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" | (i,ws) <- zip [1..] l, let n = i ]

-- DZEN DOCK
jackLogHook h  = dynamicLogWithPP $ jackDzenPP { ppOutput = hPutStrLn h }
jackDzenStyle  = " -fg '#b2b2b2' -bg '#1a1a1a' -fn '-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*'"
jackDzenStatus = "dzen2 -w '320' -ta 'l'" ++ jackDzenStyle
jackDzenConky  = "conky -c /home/jack/.xmonad/conkyrc | dzen2 -x '320' -w '960' -ta 'r'" ++ jackDzenStyle
jackDzenPP     = dzenPP
	{ ppCurrent		= dzenColor "#329bcd" "" . wrap " " " "
	, ppHidden		= dzenColor "#d2d2d2" "" . wrap " " " "
	, ppHiddenNoWindows	= dzenColor "#1a1a1a" "" . wrap " " " "
	, ppUrgent		= dzenColor "#ff0000" "" . wrap " " " "
	, ppSep			= "     "
	, ppLayout		= dzenColor "#aaaaaa" "" . wrap "^ca(1,xdotool key super+space)· " " ·^ca()"
	, ppTitle		= dzenColor "#b2b2b2" "" . wrap "^ca(1,xdotool key super+k)^ca(2,xdotool key super+shift+c)" " ^ca()^ca()" . shorten 20 . dzenEscape
	}

-- HOOKS
jackManageHook = composeAll
	[ className =? "MPlayer"	--> (doFloat <+> viewShift "3-vid")
	, className =? "Vlc"		--> (doFloat <+> viewShift "3-vid")
	, className =? "Firefox"	--> doShift   "2-net"
	, className =? "Opera"		--> doShift   "2-net"
	, className =? "sxiv"		--> viewShift "4-pic"
--	, title	    =? "ncmpc++ ver. 0.5.8"	--> doShift   "5-music"
	, className =? "Gimp"		--> doFloat
	, resource  =? "desktop_window"	--> doIgnore
	]
	where viewShift = doF . liftM2 (.) W.greedyView W.shift

-- LAYOUTS
jackLayoutHook	= smartBorders $ avoidStruts $ spacing 3 $ Tall 1 (3/100) (1/2) ||| noBorders Full

-- BINDINGS
jackKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
	[ ((modm, xK_Return), spawn $ XMonad.terminal conf)
	, ((modm,			xK_r		), spawn "urxvtc -e ranger")
	, ((modm,			xK_m		), spawn "urxvtc -e ncmpcpp")
	, ((modm,			xK_o		), spawn "opera")
	, ((modm,			xK_f		), spawn "firefox")
	, ((modm .|. shiftMask,		xK_z		), spawn "slock")
	, ((modm, xK_p), spawn "exe=`dmenu_run -fn -*-terminus-*-*-*-*-12-*-*-*-*-*-*-* -nb '#1a1a1a' -nf '#b2b2b2' -sb '#329bcd' -sf '#1a1a1a'` && eval \"exec $exe\"")
	-- rotate Windows anti-/clockwise
	, ((modm .|. shiftMask, xK_bracketleft  ), rotAllUp)
        , ((modm .|. shiftMask, xK_bracketright ), rotAllDown)
	-- Volume / MPD control
	, ((modm,			xK_F7		), spawn "mpc prev")
	, ((modm,			xK_F8		), spawn "mpc toggle")
	, ((modm,			xK_F9		), spawn "mpc next")
	, ((modm,			xK_F10		), spawn "amixer -q sset Master toggle")
	, ((modm,			xK_F11		), spawn "amixer -q sset Master 2dB-")
	, ((modm,			xK_F12		), spawn "amixer -q sset Master 2dB+")

	-- XMONAD
	-- close focused window
	, ((modm .|. shiftMask,		xK_c		), kill)
	 -- Rotate through the available layout algorithms
	, ((modm,			xK_space	), sendMessage NextLayout)
	--  Reset the layouts on the current workspace to default
	, ((modm .|. shiftMask,		xK_space	), setLayout $ XMonad.layoutHook conf)
	-- Resize viewed windows to the correct size
	, ((modm,			xK_n		), refresh)
	-- Move focus to the next window
	, ((modm,			xK_Tab		), windows W.focusDown)
	-- Move focus to the next window
	, ((modm,			xK_Left		), windows W.focusDown)
	-- Move focus to the previous window
	, ((modm,			xK_Right	), windows W.focusUp)
	-- Move focus to the master window
	, ((modm .|. shiftMask,		xK_m		), windows W.focusMaster)
	-- Swap the focused window and the master window
	, ((modm .|. shiftMask,		xK_Return	), windows W.swapMaster)
	-- Swap the focused window with the next window
	, ((modm .|. shiftMask,		xK_Left		), windows W.swapDown)
	-- Swap the focused window with the previous window
	, ((modm .|. shiftMask,		xK_Right	), windows W.swapUp)
	-- Shrink the master area
	, ((modm .|. controlMask,	xK_Left		), sendMessage Shrink)
	-- Expand the master area
	, ((modm .|. controlMask,	xK_Right	), sendMessage Expand)
	-- Push window back into tiling
	, ((modm,			xK_t		), withFocused $ windows . W.sink)
	-- Increment the number of windows in the master area
	, ((modm,			xK_comma	), sendMessage (IncMasterN 1))
	-- Deincrement the number of windows in the master area
	, ((modm,			xK_period	), sendMessage (IncMasterN (-1)))
	-- Toggle the status bar gap
	-- Use this binding with avoidStruts from Hooks.ManageDocks.
	-- See also the statusBar function from Hooks.DynamicLog.
	-- , ((modm,			xK_b		), sendMessage ToggleStruts)
	-- Quit xmonad
	, ((modm .|. shiftMask,		xK_q		), io (exitWith ExitSuccess))
	-- Restart xmonad
	, ((modm,			xK_q		), spawn "killall conky dzen2; xmonad --recompile; xmonad --restart")
	]
	++
	-- mod-[1..9], Switch to workspace N
	-- mod-shift-[1..9], Move client to workspace N
	[((m .|. modm, k), windows $ f i)
		| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
		, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
	]

Offline

#537 2012-01-10 13:04:25

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 453
Website

Re: xmonad Hacking Thread

JackH79:

The way I place ncmpcpp is by giving urxvt a title when I launch it, using this command:

urxvt -name ncmpcpp -e ncmpcpp

and then I use the following rule to place it:

, title =? "ncmpcpp"            --> doF(W.shift "音楽")

Replace 音楽 with your workspace name (logically).  I should warn you though that this rule doesn't seem to always work (every once in a while ncmpcpp will pop up on workspace 1, or there will be a urxvt-geometry sized view of it on workspace one...which once selected sends you to the right workspace with it full-screened), I don't know if this happens when you launch it via keybinding (I have it start automatically when I launch XMonad).  Doesn't bother me all that much though.

Hope that helps.


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

#538 2012-01-11 06:18:05

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: xmonad Hacking Thread

Thanks for the tip Iswest. Yes, I noticed that it suddenly worked yesterday night. Maybe it was just a hiccup.

On a side note (and only slightly off-topic): does anyone know of a good and simple notification system that plays nicely with a tiler and supports coloured output? I'm using xfce4-notifyd at the moment which is working fine, but it doesn't support colours (I'm not talking about colour schemes). In awesome I could use the build-in naughty notifyer where I could use pango colour codes.
I've tried bash, pango, and html colour codes. None work.

Thanks

Offline

#539 2012-01-11 13:17:41

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: xmonad Hacking Thread

twmn does not meet your color requirements but is worth checking out: https://aur.archlinux.org/packages.php?ID=51596


Cedric Girard

Offline

#540 2012-01-11 13:34:25

Tzbob
Member
From: Belgium
Registered: 2011-04-12
Posts: 61

Re: xmonad Hacking Thread

dunst is pretty good, used dmenu to show things

https://bbs.archlinux.org/viewtopic.php?id=126085&p=1

Offline

#541 2012-01-12 04:58:00

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: xmonad Hacking Thread

Thanks X-dark and Tzbob for the suggestions, but I really want/need coloured output. I've always had my todo list bound to a key which send the output to the notifyer. And my todo list (using remind) is colour coded for different tasks/occasions, which saves me a great deal of reading time when there's a lot to do.

Anyway, another problem is that XMonad.Actions.Commands and XMonad.Actions.WindowBringer don't work. When I press the appropriate button dmenu pops up and offers the correct choices, but when I press <enter>, dmenu closes and nothing else happens.
It says in the XMonad.Actions.Commands description, that it

Requires dmenu and the Dmenu XMonad.Actions module.

Well, I've got dmenu, but don't know what the Dmenu XMonad.Actions module is. I take it that they are not talking about XMonad.Util.Dmenu, becasue that's called up by XMonad.Actions.Commands anyway. Any pointers? STFW=nil
Thanks

Offline

#542 2012-01-30 17:29:42

cbrunos
Member
Registered: 2010-07-22
Posts: 55

Re: xmonad Hacking Thread

Hi, I updated ubuntu to 12.04 (I know I'm the Archlinux forums, but I'm using xmonad) and my old xmobar config doesn't work anymore, I get the following error "Could not parse the template". Here is my .xmobarrc 0.13-2:

Config { font = "xft:Ubuntu-10"
       , bgColor = "#302F2F"
       , fgColor = "#FB5E14"
       , position = TopW L 31
       , lowerOnStart = True
       , commands = [  Run Com "skb" ["-1"] "kb" 10
                    ,  Run StdinReader
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = " %StdinReader% }{<fc=#cd5c5c></fc>"
       }

Thanks for your help!

Last edited by cbrunos (2012-01-30 17:29:55)


Xmonad gets sh*t done. Fast.

Offline

#543 2012-01-30 18:25:55

Raynman
Member
Registered: 2011-10-22
Posts: 1,092

Re: xmonad Hacking Thread

I would start by removing that empty fc element or including "kb" there.

Offline

#544 2012-01-30 22:48:29

cbrunos
Member
Registered: 2010-07-22
Posts: 55

Re: xmonad Hacking Thread

Hey thanks, that did the trick!


Xmonad gets sh*t done. Fast.

Offline

#545 2012-02-01 05:49:36

Olson
Member
From: New Mexico
Registered: 2011-02-14
Posts: 32

Re: xmonad Hacking Thread

Hey all

Longtime xmonad user here. Somehow I finally feel satisfied with my config. It took me a while to figure out how to fix dmenu after an update somehow broke its functionality in xmonad, but it's working now.

here's a screenshot:

archscreen1.th.jpg

I'll be keeping a close eye on this thread smile


who needs a de?
last.fm

Offline

#546 2012-02-09 14:27:09

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: xmonad Hacking Thread

I've recently discovered the Prompt.* extensions. shellPrompt is now enabled in my config and works well but I'm unable to make manPrompt work correctly. The suggestion are the same as shellPrompt and the command never work.

My config file is there: https://github.com/X-dark/config_files/ … /xmonad.hs
My config seems very similar to what is done in other config files using ManPrompt.
I'm using xmonad and xmonad-contrib from [community].

Any idea ?


Cedric Girard

Offline

#547 2012-02-12 12:28:21

JoKo
Member
Registered: 2010-04-09
Posts: 37

Re: xmonad Hacking Thread

Hello, everyone,
Is it possible to guarantee that stalonetray is always on top of dzen? Currently manageDocks handles dzen and I have created a rule for stalonetray to be completely ignored. These, however, do not guarantee that stalonetray is always on top, e.g. I may restart xmonad without killing stalonetray, so dzen covers stalonetray.

Offline

#548 2012-02-15 02:38:11

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: xmonad Hacking Thread

Hey guys, I'm working on my first xmonad config and I've got a few questions for some of the hotkey bindings. I'm trying to bind modMask [ and ] to a script that raises and lowers volume respectively but I haven't been able to figure out the correct name for the keys. Does anyone know it? I found a list of some of the key names here: http://xmonad.org/xmonad-docs/xmonad-co … onfig.html but these keys were not mentioned. Thanks in advance.

Edit: Disregard post. Answer gotten from one of the config files in this thread. (xK_bracketleft/right)

Last edited by bslackr (2012-02-15 02:47:08)

Offline

#549 2012-02-15 20:31:49

Nepherte
Member
From: Belgium
Registered: 2008-09-09
Posts: 427
Website

Re: xmonad Hacking Thread

You can use xev to find out the correct name for a key.

Last edited by Nepherte (2012-02-15 20:32:07)

Offline

#550 2012-02-15 20:33:28

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

Re: xmonad Hacking Thread

can i have 2 instances of xmobar? top bar and bottom bar?


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

Board footer

Powered by FluxBB