You are not logged in.

#1 2008-12-23 18:21:14

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Totally confused by dual monitor xmonad . . .

So I thought that each desktop would be considered as one entire workspace.
But it looks like each desktop is it's own workspace. Which is really confusing.

Any tips/tricks/hacks from those who use xmonad on two screens to help me make sense of what's going on?

Thanks.

Offline

#2 2008-12-24 14:12:09

dusanx
Member
Registered: 2008-11-28
Posts: 132

Re: Totally confused by dual monitor xmonad . . .

I switched from awesome to xmonad recently so I am probably not best person to answer this but let me try.

Xmonad uses n workspaces and you can show any workspace on any monitor but not same one on both monitors. Note that one workspace takes one monitor in size (not both monitors). Takes few tweaks but I was confused before I installed xmobar too. Even with xmobar and without proper configuration you will probably be confused. I am usually using workspaces 1-6 for my primary monitor and workspaces 7-9 for secondary one -- this is probably best way to start.

Let me know if I can help with something.


Gnome -> Openbox -> Awesome -> XMonad -> dwm .
http://github.com/dusanx/uzbl/

Offline

#3 2008-12-24 15:13:56

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Totally confused by dual monitor xmonad . . .

It's a little bit confusing at first, but after you get used to this feature you might find that it adds a considerable amount of flexibility to your window layout.
for example you can move everything from one monitor to the other monitor quickly and easily, or you can change workspaces on one monitor while leaving
the other untouched.  I actually found this to be my favorite feature in xmonad when I was using it.

Last edited by Cyrusm (2008-12-24 15:16:05)


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#4 2008-12-24 18:01:12

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Totally confused by dual monitor xmonad . . .

I have xmobar installed, and configured. But how do I assign workspaces to a certain screen?

Could you post your xmonad.hs? That would help out a lot.

Offline

#5 2008-12-24 18:51:11

dusanx
Member
Registered: 2008-11-28
Posts: 132

Re: Totally confused by dual monitor xmonad . . .

Sure, no problem.

xmonad.hs: http://pastebin.com/f75f0d402

.xmobarrc is shorter so I can paste it here:

Config { font = "xft:Pragmata:pixelsize=11:antialias=true:hinting=true"
       , bgColor = "#000000"
       , fgColor = "#AFAF87"
       , position = Top 
       , commands = [ Run Weather "LYBE" ["-t","<skyCondition> <tempC>°C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 6000
                    , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
                    , Run CoreTemp ["-t", "<core0>°C :: <core1>°C"] 10
                    , Run StdinReader
                    , Run Com "amixer" ["sget PCM,0 |grep \"Front Left:\"|cut -d \"[\" -f2|cut -d \"%\" -f1"] "" 50
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%StdinReader% }{ %coretemp% :: %LYBE% :: Vol %amixer% :: %date%"
       }

With this setup you will see all workspaces listed in xmobar includin workspaces without any active apps.

Also some shortcuts:
MOD+CTRL+ left or right arrow key to move to left and right screen.
MOD+CTRL+o to move currently focused app to other screen.


Gnome -> Openbox -> Awesome -> XMonad -> dwm .
http://github.com/dusanx/uzbl/

Offline

#6 2008-12-24 21:53:56

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Totally confused by dual monitor xmonad . . .

Thanks for posting those configs.

dusanx wrote:

I am usually using workspaces 1-6 for my primary monitor and workspaces 7-9 for secondary one -- this is probably best way to start.

Where is this in your xmonad.hs? I don't see anything about 'screen' . . .

I have xmobar and xmonad running (on 3 machines). One of those machines has two monitors, with one BIG virtual screen (3000 x 1700). I can see two workspaces at once. xmobar shows them as

[1](2)

If I have a window opened on workspace 1 (on the left)and then open another window on workspace 2 (on the right). Everything is fine. Until I try and go to workspace 3. Then the window that used to be in workspace 2 (on the right) is now in workspace 2 (on the left) and workspace 3 (on the right) is 'open'.

I am beginning to understand that xmonad is shifting my workspaces one screen at a time. But what I want is to shift all my workspaces at once. Giving myself a "clean slate" to work with, and not a headache from my windows jumping around.



So how do I set up certain workspaces for certain monitors?

(I will implement those MOD+CTRL+Left/Right key bindings. I like those in awesome.)

Last edited by timetrap (2008-12-24 21:57:10)

Offline

#7 2008-12-24 22:57:19

dusanx
Member
Registered: 2008-11-28
Posts: 132

Re: Totally confused by dual monitor xmonad . . .

timetrap wrote:

Where is this in your xmonad.hs? I don't see anything about 'screen' . . .

It is not defined in hs, I just started to understand xmonad myself so I don't know how to do it yet. When I start X for the first time I activate second monitor MOD+CTRL+ARROW, select ws #7 and switch back to main monitor. Later I select workspaces manually according to monitor I use. It was confusing for me to but sometimes is really handy to be able to use any workspace on any monitor.

I have xmobar and xmonad running (on 3 machines). One of those machines has two monitors, with one BIG virtual screen (3000 x 1700). I can see two workspaces at once. xmobar shows them as

[1](2)

If I have a window opened on workspace 1 (on the left)and then open another window on workspace 2 (on the right). Everything is fine. Until I try and go to workspace 3. Then the window that used to be in workspace 2 (on the right) is now in workspace 2 (on the left) and workspace 3 (on the right) is 'open'.

This shift will happen only when you select ws 2 to be visible on monitor 1. Try selecting ws 5-7 for second monitor so you don't run into workspace switch confusion and play with workspace switching, you will get it after few tries.

I am beginning to understand that xmonad is shifting my workspaces one screen at a time. But what I want is to shift all my workspaces at once. Giving myself a "clean slate" to work with, and not a headache from my windows jumping around.

Should be possible but I have no idea how to code that in xmonad.hs. Anyway, you can't have 'I want ws #5 to cover both my monitors' as far as I know. Should be possible to code something like 'select mon 1 - select ws 1 - select mon 2 - select ws 7' and 'select mon 1 - select ws 2 - select mon 2 - select ws 8' to achieve result you want but I don't know how to do that and I like the way xmonad behaves right now.

My main problem was to understand workspaces while I was having partial ws display in xmobar -- after I fixed mobar to show all workspaces it was much easier.


Gnome -> Openbox -> Awesome -> XMonad -> dwm .
http://github.com/dusanx/uzbl/

Offline

#8 2008-12-24 23:32:52

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Totally confused by dual monitor xmonad . . .

Thanks for the detailed response. I will try setting my montior to a different workspace right away.

Offline

Board footer

Powered by FluxBB