Robert Sawko | 8 Feb 10:04 2016
Picon

First workspace not tiling with dzen2

Hi,

I've copied my xmonad configuration on a new laptop and it all worked
fine, almost fine. I have made some small changes to the configuration,
particularly dzen2 status and xmonad bar which I keep separately at the
top.

The one annoying issue is that dzen2 stopped tiling, but only on the
first workspace. Opening a new window will overlay dzen2 unless I
restart xmonad, creating effectively new dzen2 bar, but even then any
change to the layout will also cause dzen to get covered by other
applications.

This peculiarity occurs only on the first workspace!

I posted my xmonad conifig on github, so please look here
https://github.com/robertsawko/xmonad_config

This config seems to generate some other unwanted messages, such
deprecated warnings for ICCCCMFocus or defaultGSConfig which I am going
to investigate.

Please let me know if you have any ideas.

Regards,
Robert
Christian Solje | 2 Feb 22:39 2016
Picon

Multiple Screens

I am trying to get my 3 monitor setup to work with independent screens, I am also trying to have the xmobar to
show on every screen that I got. 
How should I go about getting it to work?

Best Regards

Christian
Alexander Genaud | 27 Jan 22:20 2016
Picon
Gravatar

minimal easy Xmonad 0.11.1 on Lubuntu 15.10 with lxpanel 0.8.1

was "Vanilla Xmonad distribution"

virtualbox on windows 10
created a vmachine with 600 MB RAM and 6 GB disk
mounted lubuntu 15.10 32-bit iso
installed, eject iso, restart, login, terminal


# apt-get install xmonad


$ mkdir ~/.xmonad


$ cat > ~/.xmonad/xmonad.hs
import XMonad
import XMonad.Config.Desktop
main = xmonad $ desktopConfig
       { modMask = mod4Mask
       , terminal = "lxterminal"
       }


$ echo "exec lxpanel &" > ~/.xmonad/xmonad-session-rc


logout, select XMonad (top right), login

<div><div dir="ltr">
<div class="gmail_extra">was "Vanilla Xmonad distribution"</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">
<div class="gmail_extra">virtualbox on windows 10</div>
<div class="gmail_extra">created a vmachine with 600 MB RAM and 6 GB disk</div>
<div class="gmail_extra">mounted lubuntu 15.10 32-bit iso</div>
<div class="gmail_extra">installed, eject iso, restart, login, terminal</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"># apt-get install xmonad</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">$ mkdir ~/.xmonad</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">$ cat &gt; ~/.xmonad/xmonad.hs</div>
<div class="gmail_extra">import XMonad</div>
<div class="gmail_extra">import XMonad.Config.Desktop</div>
<div class="gmail_extra">main = xmonad $ desktopConfig</div>
<div class="gmail_extra">&nbsp; &nbsp; &nbsp; &nbsp;{ modMask = mod4Mask</div>
<div class="gmail_extra">&nbsp; &nbsp; &nbsp; &nbsp;, terminal = "lxterminal"</div>
<div class="gmail_extra">&nbsp; &nbsp; &nbsp; &nbsp;}</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">$ echo "exec lxpanel &amp;" &gt; ~/.xmonad/xmonad-session-rc</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">logout, select XMonad (top right), login</div>
<div><br></div>
</div>
</div></div>
Ico | 26 Jan 09:49 2016
Picon

Mouse focus without entering window

Hi Xmonad,

I'd like xmonad to give focus to the window under my mouse cursor,
independent of entering or leaving the window. 

Consider the following use case: one workspace with two windows. The
mouse and focus are both in the left window. I use the keyboard to give
focus to the right window (alt-tab or similar). To give focus back to
the left window by mouse, I first need to move the mouse outside and
then back into the window. Instead i'd like focus to pop back to window
one as soon as I move the mouse. (Yes, I know I could/should give focus
back with alt tab again, but that is not the point

I have more similar use cases, some using multiple work spaces, where
I'd like to see he same focus behaviour.

According to #xmonad on irc some would consider this behaviour buggy,
which I can understand. Is there still a way to make Xmonad act like
described?

Thank you,

Ico

--

-- 
:wq
^X^Cy^K^X^C^C^C^C
Thomas Järvstrand | 21 Jan 10:30 2016
Picon
Gravatar

Yet another fullscreen thread...

Hi!

I'm a happy xmonad user since a couple of years now. Previously I managed to successfully set it up the way I wanted under Ubuntu using Gnome2 but recently I decided I wanted to try something new and installed xfce (xubuntu), under which I'm having some trouble setting the fullscreen functionality which for some reason was working flawlessly under ubuntu 14.04.

I have problems getting fullscreen applications to work. Specifically showing media. I have been able to apply the workaround to float VLC but it's a bit annoying since I don't always want to have it fullscreen all the time and I haven't been able to find a good way of switching back and forth. In old Ubuntu 14.04 setup this was just working. In there any other way to solve this than the doFullFloat for VLC?

BR
Thomas


<div><div dir="ltr">
<div><div><div>
<div>Hi!

<br><br>I'm a happy xmonad user since a couple of years now. Previously I managed to successfully set it up the way I wanted under Ubuntu using Gnome2 but recently I decided I wanted to try something new and installed xfce (xubuntu), under which I'm having some trouble setting the fullscreen functionality which for some reason was working flawlessly under ubuntu 14.04.

<br><br>I have problems getting fullscreen applications to work. Specifically showing media. I have been able to apply the workaround to float VLC but it's a bit annoying since I don't always want to have it fullscreen all the time and I haven't been able to find a good way of switching back and forth. In old Ubuntu 14.04 setup this was just working. In there any other way to solve this than the doFullFloat for VLC?<br><br>
</div>
<div>BR<br>
</div>
<div>Thomas<br>
</div>
</div></div></div>
<br><br>
</div></div>
Tuncer Ayaz | 2 Jan 13:07 2016
Picon

Wayland

Wasn't there a GSoC project to add Wayland support?

In case you wonder why I'm considering it:

Wayland is becoming a serious alternative, especially to solve tearing
on newer Intel GPUs. Older Intel GPUs do not tear under Xorg at all,
but newer ones tear constantly if you don't force vsync via compton.
From what I gather, this is a solved issue under Wayland.
Jakob Schöttl | 1 Jan 00:09 2016
Picon

How to use virtual/on-screen keyboard in Xmonad

Hello,

I would like to use Xmonad to set up a custom, very restricted desktop 
environment on a Raspberry Pi with a touch screen.

Because there is no hardware keyboard I need a virtual keyboard. I tried 
these programs: xvkbd, matchbox-keyboard, onboard, florence

Some of them work with some other programs. But when it works, it's 
still buggy:

- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus 
(super+j)
- doesn't work at all with some programs

Is there a way to get virtual keyboards work with Xmonad, reliably and 
for all programs?

Thank you!

Jakob

Adam Sjøgren | 31 Dec 23:53 2015
X-Face
Picon
Gravatar

Slowly, slowly getting calls to getWindowAttributes in XMonad to handle exceptions

While fixing the "borders of RGBA-windows are weirdly coloured"-bug¹,
having changed X11's getWindowAttributes to throw an exception on error,
I am trying to work my way through the various calls to
getWindowAttributes in the XMonad source, and handle the exceptions.

With my (lacking) knowledge, it's proving somewhat difficult. Let me
show you the latest call I have been trying to tackle:

  -- manage a new window
  handle (MapRequestEvent    {ev_window = w}) = withDisplay $ \dpy -> do
      wa <- io $ getWindowAttributes dpy w -- ignore override windows
      -- need to ignore mapping requests by managed windows not on the current workspace
      managed <- isClient w
      when (not (wa_override_redirect wa) && not managed) $ do manage w

What needs to happen is that I need to wrap this, so if
getWindowAttributes throws an exception, something reasonable happens.

Right.

As the code does nothing if wa_override_redirect is set, maybe it makes
sense to assume that if wa isn't available, wa_o_r probably isn't
set(?), so we then need to go on and "do manage w" if "not managed" in
that case.

Ok. But how?

I've tried a number of combinations of wrapping C.handle around this,
similar to what I have found before², but I certainly need (to read a
lot more, or, some) help - I keep getting IO () when I need X (), or the
opposite, and stuff like that.

  Best regards,

    Adam

¹ https://github.com/xmonad/xmonad/pull/9 depending on https://github.com/xmonad/X11/pull/35
² An attempt at one of the other calls to getWindowAttributes: https://github.com/asjo/xmonad/commit/8c2b6047a9adf5689b6082c806dc20bb6501f6d9
  (compiles and works, but really created by guess, trial and error).

--

-- 
 "Sprecken Sie deutsch, baby"                                 Adam Sjøgren
                                                         asjo <at> koldfront.dk

_______________________________________________
xmonad mailing list
xmonad <at> haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Adam Sjøgren | 31 Dec 17:35 2015
X-Face
Picon
Gravatar

Not running my startupHook on restart

I have a startupHook that spawns a number of windows on various
workspaces.

When I restart XMonad, I don't want those windows opened again.

Is there an easy way to have startupHook only run when logging in, and
not when restarting XMonad?

The way I have tried to solve this, unsuccessfully, is to make my
startupHook look like this:

  myStartup = when (noRun /= "1") $ do
                spawnOn "1" "emacs"
                spawnOn "6" "x-terminal-emulator"
                -- and so on...
              where
                noRun = unsafePerformIO $ env "NO_STARTUP_HOOK" "0"

  env :: String -> String -> IO String
  env variable fallthrough = getEnv variable `Control.Exception.catch` econst fallthrough

(where getEnv is imported from System.Environment).

And then I have changed the restart keybinding like this:

        , ("M-S-r", spawn "xmonad --recompile; export NO_STARTUP_HOOK=1; xmonad --restart")

Unfortunately it doesn't work - I guess something "more" is going on
when "xmonad --restart" runs, because if I add a key:

        , ("M-S-y", spawn "export HEP=yay; notify-send --expire-time 2000 'Testing' \"ENV: [$HEP]\"")

then pressing M-S-y gives me an alert with the text "ENV: [yay]" in it.
But if I do:

        , ("M-S-y", spawn "notify-send --expire-time 2000 'Testing' \"ENV: [$NO_STARTUP_HOOK]\"")

the notification says "ENV: []" regardless of whether I have restarted
XMonad or not.

I have a feeling that I am taking the long walk to solve this - any
ideas of the easy way to the goal here?

  Thanks!

    Adam

--

-- 
 "Här kommer rädslan, nu igen                                 Adam Sjøgren
  När alla fjärilar i magen nålas upp                    asjo <at> koldfront.dk
  till ett mönster på min säng"

_______________________________________________
xmonad mailing list
xmonad <at> haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Bogdan Sinitsyn | 22 Dec 20:21 2015
Picon
Gravatar

More possibilities for border width customization

Sometimes it would be better to customize border width depending on window. Is 
it possible to merge this functionality into core?
--

-- 
Bogdan Sinitsyn
Matt Walker | 18 Dec 18:12 2015
Picon

Migrate from String to Data.Text [proposal]

Hi everyone,

I noticed that xmonad and xmonad-contrib both prefer to use of String = [Char] for their stringy data-types.  This is probably a terrible idea.  I cite some sources here, then outline their arguments below.

http://www.alexeyshmalko.com/2015/haskell-string-types/
https://mail.haskell.org/pipermail/haskell-cafe/2014-June/114745.html

__String is Bad__

1) Char is a horribly inefficient representation of a character, being an entire machine word in length (at least 32 bits).  Actually, it's worse: each Char takes up _two_ machine words in GHC, since it needs one to store GC information in.  See the slide in the first link for more details.  Data.Text stores the characters in compact arrays.

2) Lists are lazy, which makes their evaluation slower.  You have to thunk on each character, which is pretty silly most of the time.  Normally you want to read in at least _chunks_ of string all at once.  Data.Text is strict, but Data.Text.Lazy exists and is (as you would assume) lazy when you need it.

The long and the short of it is that [Char] is a suboptimal choice to use for anything except possibly short identifiers; Haskell (via GHC) is a compiled language, and yet performs orders of magnitudes worse than even Perl and Python on text processing when using Data.String.  There is simply no good reason to use String when Text exists.

__Alternatives__

The other alternative is ByteString.  Although ByteString is a great type for binary data, and specifically for data exchange protocols, it seems that it would inappropriate in this situation, due to the replacement of most (if not all) instances being actual textual data, which obviously Text is optimized for.

__Migration Issues__

Assuming we can agree that Text > String then, the main problem to switching would be the pain of migration, and whether this would be worth it.  I argue it wouldn't be so bad, and is worth doing on principle alone.

The LANGUAGE pragma of OverloadedStrings allows you to use String literals as Text literals, so that wouldn't be the main problem.  The main issue is changing all the interfaces so they accept Text instead of String, and how this would impact existing user configs, and the xmonad-contrib archive.  Every time you use ++ you would have to replace it with <>, the Monoid infix mappend operator.  I doubt many people use : to build Strings, but in those instances those would have to be changed too.  Finally, pattern matching on Strings like (x:xs) would break as well.  All other functions would require changing from their String/List counterpart to the Text one.  Since the names clash, one would have to import qualified as, for instance, T and call T.intersperse or whatever.  It would be a non-trivial undertaking, but certainly doable.

__Other Breaking Changes__

Are there other niggling issues that exist in the codebase that would cause breaking changes?  Perhaps it would be a good idea to get a list of them all and see if it's worth breaking backwards compatibility to fix them all at once?  I'm a purist when it comes to code, but I would like to hear what other people think, and just how angry they would be with this change.  I have no idea as to what xmonad and xmonad-contrib's breaking changes policy is.

Obviously I'm not proposing this change be undertaken for 0.13 -- I was aiming for more 0.14 or later.

Let me know what you think.

Sincerely,
Matt
<div><div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi everyone,<br><br>
</div>I noticed that xmonad and xmonad-contrib both prefer to use of String = [Char] for their stringy data-types.&nbsp; This is probably a terrible idea.&nbsp; I cite some sources here, then outline their arguments below.<br><br><a href="http://www.alexeyshmalko.com/2015/haskell-string-types/" target="_blank">http://www.alexeyshmalko.com/2015/haskell-string-types/</a><br><a href="https://mail.haskell.org/pipermail/haskell-cafe/2014-June/114745.html" target="_blank">https://mail.haskell.org/pipermail/haskell-cafe/2014-June/114745.html</a><br><br>
</div>
<div>__String is Bad__<br>
</div>
<div><br></div>1) Char is a horribly inefficient representation of a character, being an entire machine word in length (at least 32 bits).&nbsp; Actually, it's worse: each Char takes up _two_ machine words in GHC, since it needs one to store GC information in.&nbsp; See the slide in the first link for more details.&nbsp; Data.Text stores the characters in compact arrays.<br><br>
</div>2) Lists are lazy, which makes their evaluation slower.&nbsp; You have to thunk on each character, which is pretty silly most of the time.&nbsp; Normally you want to read in at least _chunks_ of string all at once.&nbsp; Data.Text is strict, but Data.Text.Lazy exists and is (as you would assume) lazy when you need it.<br><br>
</div>The long and the short of it is that [Char] is a suboptimal choice to use for anything except possibly short identifiers; Haskell (via GHC) is a compiled language, and yet performs orders of magnitudes worse than even Perl and Python on text processing when using Data.String.&nbsp; There is simply no good reason to use String when Text exists.<br><br>
</div>
<div>__Alternatives__<br>
</div>
<div><br></div>
<div>The other alternative is ByteString.&nbsp; Although ByteString is a great type for binary data, and specifically for data exchange protocols, it seems that it would inappropriate in this situation, due to the replacement of most (if not all) instances being actual textual data, which obviously Text is optimized for.<br>
</div>
<div><br></div>
<div>__Migration Issues__<br>
</div>
<div><br></div>Assuming we can agree that Text &gt; String then, the main problem to switching would be the pain of migration, and whether this would be worth it.&nbsp; I argue it wouldn't be so bad, and is worth doing on principle alone.<br><br>
</div>The LANGUAGE pragma of OverloadedStrings allows you to use String literals as Text literals, so that wouldn't be the main problem.&nbsp; The main issue is changing all the interfaces so they accept Text instead of String, and how this would impact existing user configs, and the xmonad-contrib archive.&nbsp; Every time you use ++ you would have to replace it with &lt;&gt;, the Monoid infix mappend operator.&nbsp; I doubt many people use : to build Strings, but in those instances those would have to be changed too.&nbsp; Finally, pattern matching on Strings like (x:xs) would break as well.&nbsp; All other functions would require changing from their String/List counterpart to the Text one.&nbsp; Since the names clash, one would have to import qualified as, for instance, T and call T.intersperse or whatever.&nbsp; It would be a non-trivial undertaking, but certainly doable.<br><br>
</div>
<div>__Other Breaking Changes__<br><br>
</div>Are there other niggling issues that exist in the codebase that would cause breaking changes?&nbsp; Perhaps it would be a good idea to get a list of them all and see if it's worth breaking backwards compatibility to fix them all at once?&nbsp; I'm a purist when it comes to code, but I would like to hear what other people think, and just how angry they would be with this change.&nbsp; I have no idea as to what xmonad and xmonad-contrib's breaking changes policy is.<br><br>
</div>Obviously I'm not proposing this change be undertaken for 0.13 -- I was aiming for more 0.14 or later.<br><br>
</div>Let me know what you think.<br><br>
</div>Sincerely,<br>
</div>Matt<br>
</div></div>

Gmane