https://wiki.haskell.org/index.php?title=Xmonad/Config_archive/Kapil_gnomemenuadd.hs&feed=atom&action=history
Xmonad/Config archive/Kapil gnomemenuadd.hs - Revision history
2024-03-28T18:17:54Z
Revision history for this page on the wiki
MediaWiki 1.35.5
https://wiki.haskell.org/index.php?title=Xmonad/Config_archive/Kapil_gnomemenuadd.hs&diff=50192&oldid=prev
Kapil: Add note about delay
2012-08-26T04:41:56Z
<p>Add note about delay</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:41, 26 August 2012</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 26:</td>
<td colspan="2" class="diff-lineno">Line 26:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- is specified at</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- is specified at</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- https://code.google.com/p/xmonad/issue/detail?id=451</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- https://code.google.com/p/xmonad/issue/detail?id=451</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> -- Increase the delay if it doesn't work for you.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del> io $ threadDelay <del class="diffchange diffchange-inline">105000</del></div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> io $ threadDelay <ins class="diffchange diffchange-inline">200000</ins></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> io $ allocaXEvent $ \e -> do</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> io $ allocaXEvent $ \e -> do</div></td>
</tr>
</table>
Kapil
https://wiki.haskell.org/index.php?title=Xmonad/Config_archive/Kapil_gnomemenuadd.hs&diff=50188&oldid=prev
Kapil: simple modification to XMonad.Config.Gnome to popup Gnome Menu
2012-08-26T03:11:40Z
<p>simple modification to XMonad.Config.Gnome to popup Gnome Menu</p>
<p><b>New page</b></p><div>This gives a hacky solution to<br />
[https://code.google.com/p/xmonad/issues/detail?id=451 Issue 451 in xmonad]<br />
<br />
<haskell><br />
import XMonad<br />
import XMonad.Config.Gnome<br />
import XMonad.Config.Desktop<br />
<br />
import Control.Concurrent (threadDelay)<br />
import qualified Data.Map as M<br />
<br />
main = xmonad $ gnomeConfig {<br />
,keys = addlKeys <+> keys desktopConfig<br />
}<br />
<br />
addlKeys conf@(XConfig {modMask = modm}) = M.fromList $<br />
[ ((modm, xK_F1), gnomeMenu) ]<br />
<br />
gnomeMenu :: X ()<br />
gnomeMenu = withDisplay $ \dpy -> do<br />
rw <- asks theRoot<br />
gnome_panel <- getAtom "_GNOME_PANEL_ACTION"<br />
panel_menu <- getAtom "_GNOME_PANEL_ACTION_MAIN_MENU"<br />
<br />
-- a "magic" delay that just makes this work. The problem<br />
-- is specified at<br />
-- https://code.google.com/p/xmonad/issue/detail?id=451<br />
io $ threadDelay 105000<br />
<br />
io $ allocaXEvent $ \e -> do<br />
setEventType e clientMessage<br />
setClientMessageEvent e rw gnome_panel 32 panel_menu 0<br />
sendEvent dpy rw False structureNotifyMask e<br />
sync dpy False<br />
</haskell></div>
Kapil