Problems getting decoration to work with default tiled layout

I've only just started using xmonad, and am hardly a haskell guru, so I'm probably making a stupid mistake here. But no amount of googling or searching this list's archives has thrown up anything useful (maybe because I don't know the right terms to search for). I'm trying to get window decoration to work, with the following minimal xmonad.hs (taken more or less verbatim from the SimpleDecoration docs): ***** import XMonad import XMonad.Layout.SimpleDecoration myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig) main = xmonad $ defaultConfig { layoutHook = myLayoutHook } ***** The problem is, with this config all my windows are full-screen, even when there are multiple windows open on the same workspace, i.e. no tiling at all. And there's no window decoration visible (other than the window border). Clearly there's something basic that I'm missing here, but what? I'm using a darcs checkout of xmonad (via the Gentoo xmonad-darcs ebuilds), compiled this morning. Thanks for helping out an xmonad beginner. Even at this stage, I'm finding xmonad a delight to use, and incredibly fast and stable. Toby

On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
I've only just started using xmonad, and am hardly a haskell guru, so I'm probably making a stupid mistake here. But no amount of googling or searching this list's archives has thrown up anything useful (maybe because I don't know the right terms to search for).
I'm trying to get window decoration to work, with the following minimal xmonad.hs (taken more or less verbatim from the SimpleDecoration docs):
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
The problem is, with this config all my windows are full-screen, even when there are multiple windows open on the same workspace, i.e. no tiling at all. And there's no window decoration visible (other than the window border).
Hmm, that's strange. Just to make sure we get the simple things out of the way first---are you sure you didn't accidentally switch to fullscreen mode (i.e. with mod-space)? You should also try hitting mod-shift-space to to a hard reload of the layout, sometimes that's necessary when changing your layout (since xmonad tries very hard to keep your layout state across restarts). Otherwise your xmonad.hs looks fine, although I'm not very familiar with the decoration stuff. -Brent

Brent Yorgey wrote:
On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
I've only just started using xmonad, and am hardly a haskell guru, so I'm probably making a stupid mistake here. But no amount of googling or searching this list's archives has thrown up anything useful (maybe because I don't know the right terms to search for).
I'm trying to get window decoration to work, with the following minimal xmonad.hs (taken more or less verbatim from the SimpleDecoration docs):
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
The problem is, with this config all my windows are full-screen, even when there are multiple windows open on the same workspace, i.e. no tiling at all. And there's no window decoration visible (other than the window border).
Hmm, that's strange. Just to make sure we get the simple things out of the way first---
Definitely a good plan.
are you sure you didn't accidentally switch to fullscreen mode (i.e. with mod-space)?
To be sure, I tried hitting mod-space a few times, and also tried replacing the above layout hook with: myLayoutHook = simpleDeco shrinkText defaultTheme (Tall 1 (1/300) (1/2)) with no change in the behaviour.
You should also try hitting mod-shift-space to to a hard reload of the layout, sometimes that's necessary when changing your layout (since xmonad tries very hard to keep your layout state across restarts).
Also doesn't seem to help. I also tried quitting xmonad completely (M-S-q) and logging into X again, but still see the same behaviour.
Otherwise your xmonad.hs looks fine, although I'm not very familiar with the decoration stuff.
Thanks for taking the time to help, Toby

On Tue, Jun 16, 2009 at 03:51:43PM +0200, Toby Cubitt wrote:
Brent Yorgey wrote:
On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
are you sure you didn't accidentally switch to fullscreen mode (i.e. with mod-space)?
To be sure, I tried hitting mod-space a few times, and also tried replacing the above layout hook with:
myLayoutHook = simpleDeco shrinkText defaultTheme (Tall 1 (1/300) (1/2))
with no change in the behaviour.
You should also try hitting mod-shift-space to to a hard reload of the layout, sometimes that's necessary when changing your layout (since xmonad tries very hard to keep your layout state across restarts).
Also doesn't seem to help. I also tried quitting xmonad completely (M-S-q) and logging into X again, but still see the same behaviour.
Yeah, quitting completely and restarting should do it if mod-shift-space does. Hmm. So, having gotten the simple stuff out of the way, I tried this config myself (in fact, I am using it right now while composing this email) and it works fine for me. I get tiled windows with little title boxes above each one. So for now I am going with the hypothesis that your config is not successfully being compiled, and xmonad is using a previous config in its place. (Although there are definitely no syntax errors in the config you pasted; I copied and pasted it and it works fine.) A few more things to check: 1. Do you have the 'xmessage' utility installed? One possibility is that xmonad is generating errors but is not able to show them to you if you don't have 'xmessage'. 2. Also check ~/.xsession-errors and ~/.xmonad/xmonad.errors for any error messages. 3. You can also try loading your xmonad.hs in ghci to see whether there are any errors: cd into ~/.xmonad and type 'ghci'; then at the ghci prompt type ':load xmonad.hs'. If nothing likely comes out of any of these, then we'll have to go back to the drawing board. -Brent

Brent Yorgey wrote:
Brent Yorgey wrote:
On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
[...] Hmm. So, having gotten the simple stuff out of the way, I tried this config myself (in fact, I am using it right now while composing this email) and it works fine for me. I get tiled windows with little
On Tue, Jun 16, 2009 at 03:51:43PM +0200, Toby Cubitt wrote: title boxes above each one. So for now I am going with the hypothesis that your config is not successfully being compiled, and xmonad is using a previous config in its place. (Although there are definitely no syntax errors in the config you pasted; I copied and pasted it and it works fine.) A few more things to check:
1. Do you have the 'xmessage' utility installed? One possibility is that xmonad is generating errors but is not able to show them to you if you don't have 'xmessage'.
xmessage is definitely installed. I tried introducing deliberate syntax errors in xmonad.hs, and mod-q then pops up a message. I also tested "xmessage test" from an xterm.
2. Also check ~/.xsession-errors and ~/.xmonad/xmonad.errors for any error messages.
~/xmonad.errors is empty. ~/.xsession-errors contains the following: *****~/.xsession.errors***** Warning: Cannot convert string "nil2" to type FontStruct xterm: cannot load font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 user error (createFontSet) No running windows found user error (createFontSet) user error (createFontSet) user error (createFontSet) Waiting for Emacs...user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) ************************** This is after a fresh log-in to xmonad, with the following ~/.xsession: ***** ~/.xsession ***** export PATH="~/bin:$PATH" /usr/bin/xmonad *********************** I then ran Emacs to view those files and copy them into this email, and started an xterm to test xmonad.hs as below.
3. You can also try loading your xmonad.hs in ghci to see whether there are any errors: cd into ~/.xmonad and type 'ghci'; then at the ghci prompt type ':load xmonad.hs'.
I get the following output: *****ghci, :load xmonad.hs***** Prelude> :load xmonad.hs Ok, modules loaded: Main. Prelude Main> *******************************
If nothing likely comes out of any of these, then we'll have to go back to the drawing board.
Could those createFontSet errors maybe indicate something going wrong with the fonts used to decorate the windows? Toby

On Tue, Jun 16, 2009 at 07:59:38PM +0200, Toby Cubitt wrote:
Could those createFontSet errors maybe indicate something going wrong with the fonts used to decorate the windows?
Toby
Probably. When a layout crashes xmonad falls back to the full screen layout, which explains part of your issue. The default theme uses the font string "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*", are you missing this font? I note that xterm is failing to find its font as well. Cheers, Spencer Janssen

Spencer Janssen wrote:
On Tue, Jun 16, 2009 at 07:59:38PM +0200, Toby Cubitt wrote:
Could those createFontSet errors maybe indicate something going wrong with the fonts used to decorate the windows?
Toby
Probably. When a layout crashes xmonad falls back to the full screen layout, which explains part of your issue. The default theme uses the font string "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*", are you missing this font?
I note that xterm is failing to find its font as well.
That was indeed the problem. I installed the package containing the missing fonts, and everything now works. (This also stops xterm from complaining.) Thanks for your help! For the record, in case anyone else running Gentoo also hits this problem, the missing fonts are in the "media-fonts/font-misc-misc" package. Install that and you should be good to go. Toby

Brent Yorgey wrote:
Brent Yorgey wrote:
On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
[...] Hmm. So, having gotten the simple stuff out of the way, I tried this config myself (in fact, I am using it right now while composing this email) and it works fine for me. I get tiled windows with little
On Tue, Jun 16, 2009 at 03:51:43PM +0200, Toby Cubitt wrote: title boxes above each one. So for now I am going with the hypothesis that your config is not successfully being compiled, and xmonad is using a previous config in its place. (Although there are definitely no syntax errors in the config you pasted; I copied and pasted it and it works fine.) A few more things to check:
1. Do you have the 'xmessage' utility installed? One possibility is that xmonad is generating errors but is not able to show them to you if you don't have 'xmessage'.
xmessage is definitely installed. I tried introducing deliberate syntax errors in xmonad.hs, and mod-q then pops up a message. I also tested "xmessage test" from an xterm.
2. Also check ~/.xsession-errors and ~/.xmonad/xmonad.errors for any error messages.
~/xmonad.errors is empty. ~/.xsession-errors contains the following: *****~/.xsession.errors***** Warning: Cannot convert string "nil2" to type FontStruct xterm: cannot load font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 user error (createFontSet) No running windows found user error (createFontSet) user error (createFontSet) user error (createFontSet) Waiting for Emacs...user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) ************************** This is after a fresh log-in to xmonad, with the following ~/.xsession: ***** ~/.xsession ***** export PATH="~/bin:$PATH" /usr/bin/xmonad *********************** I then ran Emacs to view those files and copy them into this email, and started an xterm to test xmonad.hs as below.
3. You can also try loading your xmonad.hs in ghci to see whether there are any errors: cd into ~/.xmonad and type 'ghci'; then at the ghci prompt type ':load xmonad.hs'.
I get the following output: *****ghci, :load xmonad.hs***** Prelude> :load xmonad.hs Ok, modules loaded: Main. Prelude Main> *******************************
If nothing likely comes out of any of these, then we'll have to go back to the drawing board.
Could those createFontSet errors maybe indicate something going wrong with the fonts used to decorate the windows? Toby

Brent Yorgey wrote:
Brent Yorgey wrote:
On Tue, Jun 16, 2009 at 03:02:52PM +0200, Toby Cubitt wrote:
***** import XMonad import XMonad.Layout.SimpleDecoration
myLayoutHook = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig)
main = xmonad $ defaultConfig { layoutHook = myLayoutHook } *****
[...] Hmm. So, having gotten the simple stuff out of the way, I tried this config myself (in fact, I am using it right now while composing this email) and it works fine for me. I get tiled windows with little
On Tue, Jun 16, 2009 at 03:51:43PM +0200, Toby Cubitt wrote: title boxes above each one. So for now I am going with the hypothesis that your config is not successfully being compiled, and xmonad is using a previous config in its place. (Although there are definitely no syntax errors in the config you pasted; I copied and pasted it and it works fine.) A few more things to check:
1. Do you have the 'xmessage' utility installed? One possibility is that xmonad is generating errors but is not able to show them to you if you don't have 'xmessage'.
xmessage is definitely installed. I tried introducing deliberate syntax errors in xmonad.hs, and mod-q then pops up a message. I also tested "xmessage test" from an xterm.
2. Also check ~/.xsession-errors and ~/.xmonad/xmonad.errors for any error messages.
~/xmonad.errors is empty. ~/.xsession-errors contains the following: *****~/.xsession.errors***** Warning: Cannot convert string "nil2" to type FontStruct xterm: cannot load font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 user error (createFontSet) No running windows found user error (createFontSet) user error (createFontSet) user error (createFontSet) Waiting for Emacs...user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) user error (createFontSet) ************************** This is after a fresh log-in to xmonad, with the following ~/.xsession: ***** ~/.xsession ***** export PATH="~/bin:$PATH" /usr/bin/xmonad *********************** I then ran Emacs to view those files and copy them into this email, and started an xterm to test xmonad.hs as below.
3. You can also try loading your xmonad.hs in ghci to see whether there are any errors: cd into ~/.xmonad and type 'ghci'; then at the ghci prompt type ':load xmonad.hs'.
I get the following output: *****ghci, :load xmonad.hs***** Prelude> :load xmonad.hs Ok, modules loaded: Main. Prelude Main> *******************************
If nothing likely comes out of any of these, then we'll have to go back to the drawing board.
Could those createFontSet errors maybe indicate something going wrong with the fonts used to decorate the windows? Toby
participants (3)
-
Brent Yorgey
-
Spencer Janssen
-
Toby Cubitt