Joachim Breitner | 7 Jul 20:59 2016
Picon
Gravatar

Website out of date

Hi,

just in case someone wanted to fix this and forgot about it:
http://xmonad.org/ still says
“xmonad 0.11 is available from our download page.”

Also, the note “Notes for Ubuntu users only:” on
http://xmonad.org/download.html, as well as the (etch) link is
obsolete.

Greetings,
Joachim

--

-- 

Joachim “nomeata” Breitner
  mail@...https://www.joachim-breitner.de/
  XMPP: nomeata@... • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata@...
_______________________________________________
xmonad mailing list
xmonad <at> haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Adam Sjøgren | 12 Jun 23:37 2016
X-Face
Picon
Gravatar

XMonad.Promp.Shell matching function

I would like shellPrompt to match anywhere in the command, not only from
the beginning.

E.g. if I have a command called "run_icesocial", I would like that to
appear if I type "icesoc", rather than having to type "run_" first.

It looks like XMonad.Prompt.Shell.commandCompletionFunction is the
function to modify:

  commandCompletionFunction :: [String] -> String -> [String]
  commandCompletionFunction cmds str | '/' `elem` str = []
                                     | otherwise      = filter (isPrefixOf str) cmds

Changing isPrefixOf to isInfixOf I would guess - does that sound right?

Is there an easy way to "override" that function from my xmonad.hs?

If not, would it be reasonable to make it configurable, so e.g. you
could put in a fuzzy matching function, or something even weirder? (I'll
give that a go, if so.)

  Best regards,

    Adam

--

-- 
 "Sunday morning when the rain begins to fall                 Adam Sjøgren
  I've got the cure for it all"                          asjo <at> koldfront.dk

_______________________________________________
(Continue reading)

Adam Sjøgren | 12 Jun 22:40 2016
X-Face
Picon
Gravatar

XMonad.Prompt font

I was experimenting with switching from dmenu to XMonad.Prompt.Shell.

With dmenu I can get the font I want by passing the argument '-fn "DejaVu
Sans Condensed-8:normal"' (a truetype font, using xft).

I would like the same in XMonad.Prompt.Shell.

xfontsel(1) of course does not list truetype fonts, and the
documentation only says:

  "data XPConfig
     Constructors
       XPC
         font :: String    Font"

    - http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html

So if anyone else runs into this: what you need to know/guess is to
prefix the 'font' with "xft:" in your configuration; i.e.:

  myPromptConfig = defaultXPConfig
                   {
                     position = Top
                     -- ...
                   , font = "xft:DejaVu Sans Condensed-8"
                   }

  Best regards,

    Adam
(Continue reading)

Adam Sjøgren | 12 Jun 19:24 2016
X-Face
Picon
Gravatar

Catching exceptions from getWindowAttributes

I am trying to modify xmonad to handle exceptions thrown in
getWindowAttributes.

Since I am still copy/paste-coding, I need some help.

Take a function like this, which I have seen crashes in (especially when
using Gimp):

  floatLocation :: Window -> X (ScreenId, W.RationalRect)
  floatLocation w = withDisplay $ \d -> do
      ws <- gets windowset
      wa <- io $ getWindowAttributes d w
      let bw = (fromIntegral . wa_border_width) wa
      sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)

      let sr = screenRect . W.screenDetail $ sc
          rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
                              ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
                              (fi (wa_width  wa + bw*2) % fi (rect_width sr))
                              (fi (wa_height wa + bw*2) % fi (rect_height sr))

      return (W.screen sc, rr)
    where fi x = fromIntegral x

I somehow need to wrap the code from getWindowAttributes and on, in
something that "does the right thing" if gWA throws an exception.

In other places, I have done something like this:

  sendConfigureEvent :: Display -> XEventPtr -> Window -> Event -> IO ()
(Continue reading)

Adam Sjøgren | 12 Jun 18:09 2016
X-Face
Picon
Gravatar

How to run xmonad from development repository

I am trying to get back into fixing the border colormap stuff¹ that I got
half way through last year².

I am wondering - still being new to this - how to efficiently do
development of xmonad.

What I did previous was to rebuild Debian packages with my changes,
installing them, and then "xmonad --recompile" and restarting xmonad.

That is quite cumbersome, as Debian has dependencies between the X11
code, X11 xft and xmonad, so there is a lot of rebuilding just to
realize that I made a(nother) mistake.

How do you run xmonad from a cloned git repository and do a
change-compile-run cycle efficiently?

Is there a way to point "xmonad --recompile" at my local repository, or?

  Best regards,

    Adam

¹ https://github.com/asjo/xmonad/commit/e7d0e004d0a1acfd1ff149eaabf274fe2519c4fc
² https://github.com/xmonad/X11/pull/35

--

-- 
 "Close the door to it all                                    Adam Sjøgren
  A crash and a fireball                                 asjo <at> koldfront.dk
  If that feels good
  This is the end"
(Continue reading)

Dave Macias | 8 Jun 18:18 2016
Picon

Xmonad: Get NSP Workspace

Hello xmonad!

Recently i change myWorkspaces from strings to numbers to be able to use the dice font in ppCurrent/Visible. (it's pretty cool)

Formerly myWorkspace was defined as so:
--myWorkspaces = ["1","2","3","4","5","6","7","8","9"] ++ ["NSP"]
Now:
myWorkspaces = map show $ [1..9] ++ [0] -- 0 is the NSP ws

Everything has been working fine. The only issue is in my keybindings. specifically in CycleWS.

So i have some keybindings as so:
...
...
 , ((mod, xK_Up), windows . W.greedyView =<< findWorkspace getSortByIndexNoNSP Next HiddenNonEmptyWS 1) -- move to next WS non NSP
...
...
where
getSortByIndexNoNSP = fmap (.namedScratchpadFilterOutWorkspace) getSortByIndex



So, if i understand this correctly, "namedScratchpadFilterOutWorkspace" doesnt work because the "name" of the workspace is now the number "0" when it formerly was the string "NSP".

How can i get the keybinding to work when i've changed the NSP workpace name to an actual number?

Please let me know if more info is needed.

Thank you in advance.

-Dave
<div><div dir="ltr">Hello xmonad!<div><br></div>
<div>Recently i change myWorkspaces from strings to numbers to be able to use the dice font in ppCurrent/Visible. (it's pretty cool)</div>
<div><br></div>
<div>Formerly myWorkspace was defined as so:</div>
<div><div>--myWorkspaces = ["1","2","3","4","5","6","7","8","9"] ++ ["NSP"]</div></div>
<div>Now:</div>
<div><div>myWorkspaces = map show $ [1..9] ++ [0] -- 0 is the NSP ws</div></div>
<div><br></div>
<div>Everything has been working fine. The only issue is in my keybindings. specifically in CycleWS.</div>
<div><br></div>
<div>So i have some keybindings as so:</div>
<div>...</div>
<div>...</div>
<div><div>&nbsp;, ((mod, <span class="">	</span>xK_Up), windows . W.greedyView =&lt;&lt; findWorkspace getSortByIndexNoNSP Next HiddenNonEmptyWS 1) -- move to next WS non NSP</div></div>
<div>...</div>
<div>...</div>
<div>where</div>
<div><div>
<span class="">	</span>getSortByIndexNoNSP = fmap (.namedScratchpadFilterOutWorkspace) getSortByIndex</div></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div>So, if i understand this correctly, "namedScratchpadFilterOutWorkspace" doesnt work because the "name" of the workspace is now the number "0" when it formerly was the string "NSP".</div>
<div><br></div>
<div>How can i get the keybinding to work when i've changed the NSP workpace name to an actual number?</div>
<div><br></div>
<div>Please let me know if more info is needed.</div>
<div><br></div>
<div>Thank you in advance.</div>
<div><br></div>
<div>-Dave</div>
</div></div>
Yuriy Halytskyy | 6 Jun 07:14 2016
Picon

Xmonad and multiple screens

I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr:

xrandr --output LVDS1 --off
xrandr --output HDMI-0 --right-of VGA1
xrandr --output VGA1 --right-of LVDS1



  But mod+{w,e,r} does not work and the only way to have windows on one of my screens is to move floating window. Xinerama shows only right monitor:
ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo"
[Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height = 1200}]

Is it possible to somehow overwrite getScreenInfo for xmonad or configure Xinerama propertly?

nvidia-setting can only see one screen and one display.
xrandr output shows one huge 3840 x 1200 display and all screens:

Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384
LVDS-0 disconnected primary (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0 
   1680x1050      60.0 
   1600x1200      60.0 
   1280x1024      60.0 
   1280x960       60.0 
   1024x768       60.0 
   800x600        60.3 
   640x480        59.9 
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
LVDS1 connected
   1600x900       60.0 +   40.0 
   1440x900       59.9 
   1360x768       59.8     60.0 
   1152x864       60.0 
   1024x768       60.0 
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 connected 1920x1200+0+0 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0 
   1680x1050      60.0 
   1600x900       60.0 
   1280x1024      60.0 
   1440x900       59.9 
   1280x800       59.8 
   1280x720       60.0 
   1024x768       60.0 
   800x600        60.3     56.2 
   640x480        60.0 
VIRTUAL1 disconnected
  1024x768 (0x2ce)   65.0MHz
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0x2cf)   40.0MHz
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  640x480 (0x2d0)   25.2MHz
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
  1920x1200 (0x2c8)  154.0MHz
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock   74.0KHz
        v: height 1200 start 1203 end 1209 total 1235           clock   60.0Hz
  1680x1050 (0x2ca)  146.2MHz
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock   65.3KHz
        v: height 1050 start 1053 end 1059 total 1089           clock   60.0Hz
  1280x1024 (0x2cc)  108.0MHz
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz


Cheers,
Yuriy
<div><div dir="ltr">I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr:<br><br>xrandr --output LVDS1 --off<br>xrandr --output HDMI-0 --right-of VGA1<br>xrandr --output VGA1 --right-of LVDS1<br><br><br><br>&nbsp; But mod+{w,e,r} does not work and the only way to have windows on one of my screens is to move floating window. Xinerama shows only right monitor:<br>ghc -e "Graphics.X11.openDisplay [] &gt;&gt;= Graphics.X11.Xinerama.getScreenInfo"<br><div>[Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height = 1200}]<br><br>
</div>
<div>Is it possible to somehow overwrite getScreenInfo for xmonad or configure Xinerama propertly? <br>
</div>
<div>
<br>nvidia-setting can only see one screen and one display.<br>xrandr output shows one huge  3840 x 1200 display and all screens:<br><br>Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384<br>LVDS-0 disconnected primary (normal left inverted right x axis y axis)<br>DP-0 disconnected (normal left inverted right x axis y axis)<br>DP-1 disconnected (normal left inverted right x axis y axis)<br>HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm<br>&nbsp;&nbsp; 1920x1200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0*+<br>&nbsp;&nbsp; 1920x1080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1680x1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1600x1200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1280x1024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1280x960&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1024x768&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 800x600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.3&nbsp; <br>&nbsp;&nbsp; 640x480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.9&nbsp; <br>DP-2 disconnected (normal left inverted right x axis y axis)<br>DP-3 disconnected (normal left inverted right x axis y axis)<br>LVDS1 connected<br>&nbsp;&nbsp; 1600x900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0 +&nbsp;&nbsp; 40.0&nbsp; <br>&nbsp;&nbsp; 1440x900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.9&nbsp; <br>&nbsp;&nbsp; 1360x768&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.8&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1152x864&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1024x768&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 800x600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.3&nbsp;&nbsp;&nbsp;&nbsp; 56.2&nbsp; <br>&nbsp;&nbsp; 640x480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.9&nbsp; <br>VGA1 connected 1920x1200+0+0 518mm x 324mm<br>&nbsp;&nbsp; 1920x1200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0*+<br>&nbsp;&nbsp; 1920x1080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1680x1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1600x900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1280x1024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1440x900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.9&nbsp; <br>&nbsp;&nbsp; 1280x800&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59.8&nbsp; <br>&nbsp;&nbsp; 1280x720&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 1024x768&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>&nbsp;&nbsp; 800x600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.3&nbsp;&nbsp;&nbsp;&nbsp; 56.2&nbsp; <br>&nbsp;&nbsp; 640x480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.0&nbsp; <br>VIRTUAL1 disconnected<br>&nbsp; 1024x768 (0x2ce)&nbsp;&nbsp; 65.0MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp; 1024 start 1048 end 1184 total 1344 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 48.4KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height&nbsp; 768 start&nbsp; 771 end&nbsp; 777 total&nbsp; 806&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 60.0Hz<br>&nbsp; 800x600 (0x2cf)&nbsp;&nbsp; 40.0MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp;&nbsp; 800 start&nbsp; 840 end&nbsp; 968 total 1056 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 37.9KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height&nbsp; 600 start&nbsp; 601 end&nbsp; 605 total&nbsp; 628&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 60.3Hz<br>&nbsp; 640x480 (0x2d0)&nbsp;&nbsp; 25.2MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp;&nbsp; 640 start&nbsp; 656 end&nbsp; 752 total&nbsp; 800 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 31.5KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height&nbsp; 480 start&nbsp; 490 end&nbsp; 492 total&nbsp; 525&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 59.9Hz<br>&nbsp; 1920x1200 (0x2c8)&nbsp; 154.0MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp; 1920 start 1968 end 2000 total 2080 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 74.0KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height 1200 start 1203 end 1209 total 1235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 60.0Hz<br>&nbsp; 1680x1050 (0x2ca)&nbsp; 146.2MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp; 1680 start 1784 end 1960 total 2240 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 65.3KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height 1050 start 1053 end 1059 total 1089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 60.0Hz<br>&nbsp; 1280x1024 (0x2cc)&nbsp; 108.0MHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: width&nbsp; 1280 start 1328 end 1440 total 1688 skew&nbsp;&nbsp;&nbsp; 0 clock&nbsp;&nbsp; 64.0KHz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v: height 1024 start 1025 end 1028 total 1066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock&nbsp;&nbsp; 60.0Hz<br><br><br>
</div>
<div>Cheers,<br>
</div>
<div>Yuriy<br>
</div>
</div></div>
Steffen Schuldenzucker | 24 May 18:28 2016
Picon

Smart Decorations?

Hi!

I've been experimenting with window decorations (specifically noFrillsDeco).
Since I also have the window title in xmobar, it'd be cool to have 
decorations not shown if there is only one window, similarly to what 
'smartBorders' does for borders.

Has anyone implemented this already? What would be a good place to start?

Thanks,
Best, Steffen
Dave Macias | 13 May 15:41 2016
Picon

Re: XMonad Per Host Keybinding

That did the trick! Thank you very much Sylvain!

-Dave

On Fri, May 13, 2016 at 9:36 AM, Dave Macias <davama-Re5JQEeQqe8@public.gmane.orgm> wrote:
just saw email.
trying  "()" 
need to confirm...
will reply again in a sec

On Fri, May 13, 2016 at 9:34 AM, Dave Macias <davama-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I did try that but i remember it spit out a few errors.
This is the error:

""
xmonad.hs:455:20:
    Couldn't match type ‘[Char]’ with ‘XConfig l0’
    Expected type: XConfig l0
      Actual type: String
    In the expression: hostname
    In the first argument of ‘defaults’, namely
      ‘hostname
         {manageHook = composeAll
                         [manageDocks, manageSpawn, myManageHook, ....],
          startupHook = composeAll
                          [myStartupHook, setWMName "Xmonad", myCaseHook hostname, ....],
          logHook = composeAll
                      [myFadeHook, ewmhDesktopsLogHook, myDzenLogHook xmproc]
                    >> updatePointer (0.5, 0.5) (0, 0)}’
""

Granted line 455 is actually line 71. (in the provided gist config)
The "In the first argument of ‘defaults’, namely" output, that is line 48 if i understand it correctly.

Let me know if i need to provide more of the xmonad.hs config code. (didnt want to flood you with its many lines)

Dave

On Fri, May 13, 2016 at 9:22 AM, Sylvain Henry <sylvain-3mOQBQfmamhQFI55V6+gNQ@public.gmane.org> wrote:

On line 71, put "hostname" just after "myKeys" to make it the first parameter of the "myKeys" function and it should work (hopefully ;)). The other lines look good!

Cheers
Sylvain


On 13/05/2016 14:24, Dave Macias wrote:
Thank you for replying

I did what you suggested and through trial and error, 3/4 lines look good. 
Now line 71 gives me the same error "not in scope"

I cant seem to figure out how to add it as a parameter. (Unless i did the other 3 lines wrong)

Thanks again
Dave

On Thu, May 12, 2016 at 5:27 PM, Sylvain Henry <sylvain-3mOQBQfmamhQFI55V6+gNQ@public.gmane.org> wrote:

Hi,

Indeed "hostname" is not in scope in "myKeys". You can add a "hostname" parameter to "myKeys" and to "defaults" (lines 21, 33, 48 and 71) to pass the "hostname" you retrieve in "main" down to "myKeys"

--
Sylvain


On 12/05/2016 23:04, Dave Macias wrote:
Hello i've googled around to try to figure this out.
I feel im very close.

Im trying to add different actions to identical keybindings depending on the HOST im on. (i use my xmonad.hs file for my desktop and laptop)

Here is a snippet of what i did: (start on line 101)

I get the error "hostname not in scope".

I also have a hook which uses "hostname" and it works but cant add to keybindings.

What am i missing?

Thank you,
Dave


_______________________________________________ xmonad mailing list xmonad-HC+Z4NTRIlBAfugRpC6u6w@public.gmane.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


_______________________________________________
xmonad mailing list
xmonad <at> haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad






<div>
<div dir="ltr">That did the trick! Thank you very much Sylvain!<div><br></div>
<div>-Dave<br>
</div>
</div>
<div class="gmail_extra">
<br><div class="gmail_quote">On Fri, May 13, 2016 at 9:36 AM, Dave Macias <span dir="ltr">&lt;<a href="mailto:davama@..." target="_blank">davama@...m</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div dir="ltr">just saw email.<div>trying &nbsp;"()"&nbsp;</div>
<div>need to confirm...</div>
<div>will reply again in a sec</div>
</div>
<div class="HOEnZb"><div class="h5">
<div class="gmail_extra">
<br><div class="gmail_quote">On Fri, May 13, 2016 at 9:34 AM, Dave Macias <span dir="ltr">&lt;<a href="mailto:davama@..." target="_blank">davama@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div dir="ltr">I did try that but i remember it spit out a few errors.<div>This is the error:</div>
<div><br></div>
<div>""</div>
<div>xmonad.hs:455:20:</div>
<div>&nbsp; &nbsp; Couldn't match type &lsquo;[Char]&rsquo; with &lsquo;XConfig l0&rsquo;</div>
<div>&nbsp; &nbsp; Expected type: XConfig l0</div>
<div>&nbsp; &nbsp; &nbsp; Actual type: String</div>
<div>&nbsp; &nbsp; In the expression: hostname</div>
<div>&nbsp; &nbsp; In the first argument of &lsquo;defaults&rsquo;, namely</div>
<div>&nbsp; &nbsp; &nbsp; &lsquo;hostname</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{manageHook = composeAll</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[manageDocks, manageSpawn, myManageHook, ....],</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startupHook = composeAll</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [myStartupHook, setWMName "Xmonad", myCaseHook hostname, ....],</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logHook = composeAll</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [myFadeHook, ewmhDesktopsLogHook, myDzenLogHook xmproc]</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt;&gt; updatePointer (0.5, 0.5) (0, 0)}&rsquo;</div>
<div>""</div>
<div><br></div>
<div>Granted line 455 is actually line 71. (in the provided gist config)</div>
<div>The "In the first argument of &lsquo;defaults&rsquo;, namely" output, that is line 48 if i understand it correctly.</div>
<div><br></div>
<div>Let me know if i need to provide more of the xmonad.hs config code. (didnt want to flood you with its many lines)</div>
<span><div><br></div>
<div>Dave</div></span>
</div>
<div><div>
<div class="gmail_extra">
<br><div class="gmail_quote">On Fri, May 13, 2016 at 9:22 AM, Sylvain Henry <span dir="ltr">&lt;<a href="mailto:sylvain <at> haskus.fr" target="_blank">sylvain@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">

    

  <div bgcolor="#FFFFFF" text="#000000">
    <p>On line 71, put "hostname" just after "myKeys" to make it the
      first parameter of the "myKeys" function and it should work
      (hopefully ;)). The other lines look good!<br></p>
    <p>Cheers<span><br>
      Sylvain<br></span></p>
<div><div>
    <br><div>On 13/05/2016 14:24, Dave Macias wrote:<br>
</div>
    <blockquote type="cite">
      <div dir="ltr">Thank you for replying
        <div><br></div>
        <div>I did what you suggested and through trial and error, 3/4
          lines look good.&nbsp;</div>
        <div>Now line 71 gives me the same error "not in scope"</div>
        <div><br></div>
        <div>I cant seem to figure out how to add it as a parameter.
          (Unless i did the other 3 lines wrong)</div>
        <div>
          <table></table>
</div>
        <div><br></div>
        <div>Thanks again</div>
        <div>Dave</div>
      </div>
      <div class="gmail_extra">
<br><div class="gmail_quote">On Thu, May 12, 2016 at 5:27 PM,
          Sylvain Henry <span dir="ltr">&lt;<a href="mailto:sylvain <at> haskus.fr" target="_blank">sylvain@...</a>&gt;</span>
          wrote:<br><blockquote class="gmail_quote">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>Hi,</p>
              <p>Indeed "hostname" is not in scope in "myKeys". You can
                add a "hostname" parameter to "myKeys" and to "defaults"
                (lines 21, 33, 48 and 71) to pass the "hostname" you
                retrieve in "main" down to "myKeys"<br></p>
              <p>--<br>
                Sylvain<br></p>
              <div>
                <div> <br><div>On 12/05/2016 23:04, Dave Macias wrote:<br>
</div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Hello i've googled around to try to
                      figure this out.
                      <div>I feel im very close.</div>
                      <div><br></div>
                      <div>Im trying to add different actions to
                        identical keybindings depending on the HOST im
                        on. (i use my xmonad.hs file for my desktop and
                        laptop)</div>
                      <div><br></div>
                      <div>Here is a snippet of what i did: (start on
                        line 101)</div>
                      <div>
<a href="https://gist.github.com/davama/8ec019c5ea19f1f857f37ad140abbf41" target="_blank">https://gist.github.com/davama/8ec019c5ea19f1f857f37ad140abbf41</a><br>
</div>
                      <div><br></div>
                      <div>I get the error "hostname not in scope".</div>
                      <div><br></div>
                      <div>I also have a hook which uses "hostname" and
                        it works but cant add to keybindings.</div>
                      <div><br></div>
                      <div>What am i missing?</div>
                      <div><br></div>
                      <div>Thank you,</div>
                      <div>Dave</div>
                    </div>
                    <br><br>
</div>
                </div>
                _______________________________________________
xmonad mailing list
<a href="mailto:xmonad@..." target="_blank">xmonad@...</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad</a>

              </blockquote>
              <br>
</div>
            <br>
            _______________________________________________<br>
            xmonad mailing list<br><a href="mailto:xmonad@..." target="_blank">xmonad <at> haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad</a><br><br>
</blockquote>
        </div>
        <br>
</div>
    </blockquote>
    <br>
</div></div>
</div>

</blockquote>
</div>
<br>
</div>
</div></div>
</blockquote>
</div>
<br>
</div>
</div></div>
</blockquote>
</div>
<br>
</div>
</div>
Dave Macias | 12 May 23:04 2016
Picon

XMonad Per Host Keybinding

Hello i've googled around to try to figure this out.
I feel im very close.

Im trying to add different actions to identical keybindings depending on the HOST im on. (i use my xmonad.hs file for my desktop and laptop)

Here is a snippet of what i did: (start on line 101)

I get the error "hostname not in scope".

I also have a hook which uses "hostname" and it works but cant add to keybindings.

What am i missing?

Thank you,
Dave
<div><div dir="ltr">Hello i've googled around to try to figure this out.<div>I feel im very close.</div>
<div><br></div>
<div>Im trying to add different actions to identical keybindings depending on the HOST im on. (i use my xmonad.hs file for my desktop and laptop)</div>
<div><br></div>
<div>Here is a snippet of what i did: (start on line 101)</div>
<div>
<a href="https://gist.github.com/davama/8ec019c5ea19f1f857f37ad140abbf41" target="_blank">https://gist.github.com/davama/8ec019c5ea19f1f857f37ad140abbf41</a><br>
</div>
<div><br></div>
<div>I get the error "hostname not in scope".</div>
<div><br></div>
<div>I also have a hook which uses "hostname" and it works but cant add to keybindings.</div>
<div><br></div>
<div>What am i missing?</div>
<div><br></div>
<div>Thank you,</div>
<div>Dave</div>
</div></div>
Chris Bell | 4 May 20:16 2016

Xmobar covered by window on startup screen

Hi all,

I've been running into an interesting problem lately. I use a very basic
xmonad/xmobar setup (system info below); not much more than the sample plus some hotkeys.
Recently, when I start xmonad (either with startx or MOD+q) xmobar is
covered by any windows, as if I did not have manageDocks in my
manageHook function. However, it only does this on the screen/desktop
that is active when xmonad is (re)started.

So, when I first start xmonad on a single-screen machine, workspace 1
(the default startup workspace) will show this issue, but none of the
other workspaces will. I can 'fix' this by changing to workspace 9
(which I rarely use), and restarting xmonad with MOD+q. Then, on
workspace 9, windows will cover xmobar, but not on 1-8. 

On multi-screen desktops, this occurs with ALL initial workspaces - on
my 4-screen desktop, on startup, windows will cover xmobar on workspaces
1-4, but not 5-9 (until I switch to 6-9 and restart xmonad).

I have been experiencing this problem for a few months now, but haven't
mentioned it because the "workaround" does the job, as long as I have
enough unused workspaces. I'd really like to figure out what I broke or
what I need to change...

System Info
OS: Arch Linux (64-bit, of course)
xmonad: v0.12
xmobar: v0.23.1

Xmonad configuration (xmonad.hs): http://pastebin.com/HWhCqYsi

Thanks!

Chris

Gmane