
Hi all, few months ago i give xmonad a chance and I really like it a lot... There's only one problem: i'm an ultra-rookie to xmonad and to haskell, so i beg for knowledge :-P I try to setup a layout suitable for chatting and looking around I found: * XMonad.Layout.IM * XMonad.Layout.LayoutCombinators what I'm trying to do is to set up a layout that split my screen horizontally in two sections and LayoutCombinators seems to be the one; each section is handled with IM layout. I've forgotten to mention that in the upper section i run pidgin and in the lower skype, so in each section i want the buddies list on the left and each opened chat to be "tabbed" on the right. Basically i have this: tabbedLayout = (tabbed shrinkText tabbedTheme) commLayout = avoidStruts $ (withIM (0.20) pidginRoster tabbedLayout) *//* (withIM (0.20) skypeRoster tabbedLayout) pidginRoster = (ClassName "Pidgin") `And` (Role "buddy_list") skypeRoster = (ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm")) ok, it runs but with an essential issue: every chat window is tabbed in the upper section, while i want the pidgin chats above and skype chats below. Any hints? Thanks a lot! :-) ff0000

If I understood you correctly, I've manage to set what you want.
I found this weird to work with :) anyway, here it is:
import XMonad.Hooks.ManageDocks
import XMonad.Layout.ComboP
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Tabbed
import XMonad.Layout.TwoPane
layout = avoidStruts $ smartBorders $ onWorkspace "im" imLayout $ tiled
where
imLayout = combineTwoP (TwoPane inc 0.5) (myIM pidgin) (myIM skype)
(ClassName "Pidgin")
myIM roaster = combineTwoP (TwoPane inc 0.13) tiled simpleTabbed
roaster
tiled = Tall 1 inc 0.5
pidgin = ClassName "Pidgin" `And` Role "buddy_list"
skype = ClassName "Skype" `And` Role "MainWindow"
inc = 0.05
Regards,
Henrique G. Abreu
On Tue, Jan 26, 2010 at 14:45, Alessandro Massignan
Hi all,
few months ago i give xmonad a chance and I really like it a lot... There's only one problem: i'm an ultra-rookie to xmonad and to haskell, so i beg for knowledge :-P I try to setup a layout suitable for chatting and looking around I found:
* XMonad.Layout.IM * XMonad.Layout.LayoutCombinators
what I'm trying to do is to set up a layout that split my screen horizontally in two sections and LayoutCombinators seems to be the one; each section is handled with IM layout. I've forgotten to mention that in the upper section i run pidgin and in the lower skype, so in each section i want the buddies list on the left and each opened chat to be "tabbed" on the right. Basically i have this:
tabbedLayout = (tabbed shrinkText tabbedTheme) commLayout = avoidStruts $ (withIM (0.20) pidginRoster tabbedLayout) *//* (withIM (0.20) skypeRoster tabbedLayout) pidginRoster = (ClassName "Pidgin") `And` (Role "buddy_list") skypeRoster = (ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm"))
ok, it runs but with an essential issue: every chat window is tabbed in the upper section, while i want the pidgin chats above and skype chats below. Any hints?
Thanks a lot! :-) ff0000 _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi Henrique, the solution you offer doesn't work very well for me... After all i met another problem configuring the properties of skype in combineTwoP layout: i don't know if my brain produces a lot of crap, but xprop()ing skype's window I notice that (ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm")) aren't valid at all... With xprop I can't see any role filed... Anyway i take a shortcut, install skype4pidgin and rearrange the layout with a simple IM layout combined with a tabbed one. It should be fair enough, so i gain time to look over other XMonad's feature :-P. Thanks for your support! It wasn't wasted, because I play with all layouts you suggest ;-). Cheers, ff0000

This way of matching skype main window is a bit old, it's done like this
because in the past it was not possible to match a UTF8 in withIM or
combineTwoP (which is now). Also new skype for linux (2.1) sets appropriate
roles to its windows which makes matching them a lot easier.
The 'role field' in xprop is WM_WINDOW_ROLE. In order to cut xprop crap I
have this alias set in my .bashrc
alias xprop='xprop -notype WM_CLASS WM_NAME WM_WINDOW_ROLE'
Regards,
Henrique G. Abreu
On Tue, Jan 26, 2010 at 20:50, Alessandro Massignan
Hi Henrique,
the solution you offer doesn't work very well for me... After all i met another problem configuring the properties of skype in combineTwoP layout: i don't know if my brain produces a lot of crap, but xprop()ing skype's window I notice that
(ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm"))
aren't valid at all... With xprop I can't see any role filed... Anyway i take a shortcut, install skype4pidgin and rearrange the layout with a simple IM layout combined with a tabbed one. It should be fair enough, so i gain time to look over other XMonad's feature :-P. Thanks for your support! It wasn't wasted, because I play with all layouts you suggest ;-).
Cheers, ff0000 _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi,
Also new skype for linux (2.1) sets appropriate roles to its windows which makes matching them a lot easier. The 'role field' in xprop is WM_WINDOW_ROLE. In order to cut xprop crap I have this alias set in my .bashrc alias xprop='xprop -notype WM_CLASS WM_NAME WM_WINDOW_ROLE' You spoil me :-D! This is my xprop result on skype roster:
WM_CLASS = "skype", "Skype"
WM_NAME = "<USERNAME> - Skype™ (Beta)"
WM_WINDOW_ROLE: not found.
on chat window:
ff0000@regulus:~$ xprop -notype WM_CLASS WM_NAME WM_WINDOW_ROLE
WM_CLASS = "skype", "Skype"
WM_NAME = "

how can i handle them if role is empty? Not possible, you must workaround with the props that are set by the app. That's weird, check if you're using the latest skype for linux, which is 2.1.0.81 I remember previous versions not setting windows roles accordingly. Anyway here are my xprop output on each skype window: WM_WINDOW_ROLE = "MainWindow" WM_WINDOW_ROLE = "Chats" WM_WINDOW_ROLE = "CallWindowForm"
Is there some way to regexping WM_NAME? Not that I know of. The app must have this feature (like terminals), which they normally don't have.
Henrique G. Abreu
On Tue, Jan 26, 2010 at 23:15, Alessandro Massignan
Hi,
Also new skype for linux (2.1) sets appropriate roles to its windows which makes matching them a lot easier. The 'role field' in xprop is WM_WINDOW_ROLE. In order to cut xprop crap I have this alias set in my .bashrc alias xprop='xprop -notype WM_CLASS WM_NAME WM_WINDOW_ROLE' You spoil me :-D! This is my xprop result on skype roster:
WM_CLASS = "skype", "Skype" WM_NAME = "<USERNAME> - Skype™ (Beta)" WM_WINDOW_ROLE: not found.
on chat window:
ff0000@regulus:~$ xprop -notype WM_CLASS WM_NAME WM_WINDOW_ROLE WM_CLASS = "skype", "Skype" WM_NAME = "
- Skype™ Chat" WM_WINDOW_ROLE: not found. how can i handle them if role is empty? Is there some way to regexping WM_NAME? :-|
Cheers, ff0000 _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi Henrique, i opt for a brute-force solution: uninstall skype-staticqt and install skype, so windows role come out... i don't know why... So i rearrange again my layout and now it looks like that: tabLayout = (tabbed shrinkText myTabbedTheme) comL = avoidStruts $ smartBorders $ combineTwoP (dragPane Horizontal 0.1 0.5) (withIM (0.20) (pidginRoster) tabLayout) (withIM (0.20) (skypeRoster) tabLayout) (ClassName "Pidgin") pidginRoster = (ClassName "Pidgin") `And` (Role "buddy_list") skypeRoster = (ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm")) it works perfect! Thanks for all suggestions! :-) Kudos to you and to XMonad of course! :-D Cheers, ff0000
participants (2)
-
Alessandro Massignan
-
Henrique G. Abreu