You are not logged in.

#576 2013-08-30 06:01:31

renodesper
Member
From: Bandung
Registered: 2010-12-26
Posts: 30
Website

Re: xmonad Hacking Thread

[OOT Xmonad]
In relation to scientific papers that I will make, I would like to do a survey about the xmonad window manager interface. Perhaps the Archlinux users here who use Xmonad window manager can help give an opinion about the xmonad in the following form: http://pendek.in/qap1

Thank you in advance, if it is deemed irrelevant to post it in here, admin can remove it if necessary. smile


Keep It Simple Stupid!

Offline

#577 2013-08-30 09:49:23

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: xmonad Hacking Thread

Done.
You may consider rephrasing the following question "How high levels of productivity changes do you feel? Mention the reason!" which, despite being the translation given by Google, makes no sense.


Cedric Girard

Offline

#578 2013-09-02 08:56:36

renodesper
Member
From: Bandung
Registered: 2010-12-26
Posts: 30
Website

Re: xmonad Hacking Thread

X-dark wrote:

Done.
You may consider rephrasing the following question "How high levels of productivity changes do you feel? Mention the reason!" which, despite being the translation given by Google, makes no sense.

Ah okay, thanks for telling me. smile


Keep It Simple Stupid!

Offline

#579 2013-12-04 15:55:09

nedludd
Member
Registered: 2009-07-10
Posts: 9

Re: xmonad Hacking Thread

Just coming back to xmonad after a long spell using awesomeWM.  After updating xmonad to the latest darcs version it seems a couple of things have been added.  Can anyone tell me what to set for "rootMask" and "clientMask" in my XConfig?

    xmonad.hs:330:95:
    Constructor `XConfig' does not have the required strict field(s): clientMask,
                                                                      rootMask
    In the second argument of `($)', namely
      `XConfig
         {terminal = myTerminal, workspaces = withScreens 2 myWorkspaces,
          modMask = myModMask, borderWidth = myBorderWidth,
          normalBorderColor = myNormalBorderColor,
          focusedBorderColor = myFocusedBorderColor,
          focusFollowsMouse = True, clickJustFocuses = True, keys = myKeys,
          mouseBindings = myMouseBindings, logHook = myLogHook top,
          layoutHook = myLayoutHook, manageHook = myManageHook,
          handleEventHook = myEventHook, startupHook = myStartupHook}'
    In a stmt of a 'do' block:
      xmonad
      . withUrgencyHookC
          NoUrgencyHook (urgencyConfig {suppressWhen = Focused})
        . ewmh
      $ XConfig
          {terminal = myTerminal, workspaces = withScreens 2 myWorkspaces,
           modMask = myModMask, borderWidth = myBorderWidth,
           normalBorderColor = myNormalBorderColor,
           focusedBorderColor = myFocusedBorderColor,
           focusFollowsMouse = True, clickJustFocuses = True, keys = myKeys,
           mouseBindings = myMouseBindings, logHook = myLogHook top,
           layoutHook = myLayoutHook, manageHook = myManageHook,
           handleEventHook = myEventHook, startupHook = myStartupHook}
    In the expression:
      do { bottom <- spawnPipe "xmobar";
           top <- spawnPipe topbarCmd;
           xmonad
           . withUrgencyHookC
               NoUrgencyHook (urgencyConfig {suppressWhen = Focused})
             . ewmh
           $ XConfig
               {terminal = myTerminal, workspaces = withScreens 2 myWorkspaces,
                modMask = myModMask, borderWidth = myBorderWidth,
                normalBorderColor = myNormalBorderColor,
                focusedBorderColor = myFocusedBorderColor,
                focusFollowsMouse = True, clickJustFocuses = True, keys = myKeys,
                mouseBindings = myMouseBindings, logHook = myLogHook top,
                layoutHook = myLayoutHook, manageHook = myManageHook,
                handleEventHook = myEventHook, startupHook = myStartupHook} }

Here's the full xmonad.hs: http://preview.tinyurl.com/kgdq7hh

Offline

#580 2014-01-02 17:51:53

yulan6248
Member
Registered: 2013-04-06
Posts: 28

Re: xmonad Hacking Thread

Hi everyone,

I've written two posts on how to build a vim-like xmonad environment. Features include

- 3-dimensional workspace
- window sorting
- shelving
- two-way window history step through
- task group
- advanced prompt
- topical workspace
- float styles
- per-workspace scratchpad
- wallpaper gallery mode

You can find the posts here

1. http://lynnard.tk/blog/2013/11/05/build … -and-more/
2. http://lynnard.tk/blog/2013/12/30/more-xmonad-goodies/

Happy new year and happy hacking!

Offline

#581 2014-01-30 05:23:23

nihonsuki
Member
Registered: 2013-12-30
Posts: 3

Re: xmonad Hacking Thread

What would be immensely cool is if it were possible to switch workspaces by wheeling right and left on xmobar.  Would anyone here know if that was possible, and where to begin?

Offline

#582 2014-01-31 12:44:49

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: xmonad Hacking Thread

It should be doable.
You just need to find what are the button numbers of your horizontal scrollwheel. Then map buttonX and buttonY to nextWS and prevWS.

Last edited by X-dark (2014-01-31 12:45:10)


Cedric Girard

Offline

#583 2014-03-26 08:15:01

jilda
Member
Registered: 2014-03-07
Posts: 6

Re: xmonad Hacking Thread

I want to use gridselectWindow, I am using it like

...
, ((mod4Maks, xK_h),  gridselectWindow defaultGSConfig)
...

I am using bringSelected and spawnSelected without any problems, but I can't find what the type Maybe Window is or how to use it.

I am getting this error:

xmonad.hs:100:41:
    Couldn't match type `Maybe Window' with `()'
    Expected type: X ()
      Actual type: X (Maybe Window)
    In the return type of a call of `gridselectWindow'
    In the expression: gridselectWindow defaultGSConfig
    In the expression:
      ((mod4Mask, xK_h), gridselectWindow defaultGSConfig)

Offline

#584 2014-03-26 09:43:16

Raynman
Member
Registered: 2011-10-22
Posts: 1,092

Re: xmonad Hacking Thread

What do you want to use it for? gridselectWindow returns the selected window, bringSelected is built around this function: it passes an action ('callback function') to withSelectedWindow to do something useful with the selected window.

Maybe represents something that is optional; it's either "Just value" or "Nothing". In this case, the user can cancel the selection procedure. withSelectedWindow is a helper that only runs the action in case the user selected a window (if you use gridselectWindow directly, you have to check for a Nothing yourself). You can use this to build your own action, but perhaps you were looking for goToSelected?

Last edited by Raynman (2014-03-26 09:44:07)

Offline

#585 2014-03-26 10:28:22

jilda
Member
Registered: 2014-03-07
Posts: 6

Re: xmonad Hacking Thread

yes, I want to use something like gotoMenu from WindowBringer (dmenu).
I just want to view a grid of active windows on all wokrspaces and then, when selected one of them, go to this window.
I assumed gridselectWindow will do exactly this, but I am kinda new to haskell and have no idea how to perform a Null check you just described.

Offline

#586 2014-03-26 11:09:06

Raynman
Member
Registered: 2011-10-22
Posts: 1,092

Re: xmonad Hacking Thread

I only added a brief explanation of the Maybe type because you specifically mentioned it, but the main point was that you don't have to concern yourself with values of type Maybe Window; just use the slightly higher-level functions similar to bringSelected instead of dealing with the lower-level gridSelectWindow -- the one I mentioned at the end seems to do what you want.

Another bit of extra info (only if goToSelected is not enough or you want to learn more): from the documentation, you can also click on "Source". Then you can see how withSelectedWindow uses gridselectWindow and only runs an action/callback on the window "w" in the "Just w" case by pattern matching on the Maybe value. But I repeat, because this function checks for Nothing, you can simply give it a function to run on the selected window and you don't have to worry about the case where the user cancels the selection.

Offline

#587 2014-03-26 14:39:48

jilda
Member
Registered: 2014-03-07
Posts: 6

Re: xmonad Hacking Thread

thanks for everything, but after all I used WindowBringer, as it uses dmenu and I can see the whole name of the window, which I couldn't with goToSelected.
Next thing I want to do is something like this:
when I switch between windows I want the layout to make spaces between the windows and when I am finished with selecting a window it goes back to layout with no "useless" spaces.
so in pseudo:

while changeWindowButton.isPressed() {
  layout.makeSpaces(Windows);
}

I configured my xmonad pretty long time ago, and even that I did with help of some tutorial or with complete config file from which I copied it and only edited parts I understood.
I am using this layout:

myLayout = ResizableTall 1 (3/100) (1/2) [] ||| tiled ||| Mirror tiled ||| Full
	where
		tiled = spacing 5 $ Tall nmaster delta ratio
		nmaster = 1
		ratio = 2/3
		delta = 5/100
newLayout = avoidStruts $ smartBorders $ myLayout

//edit: I didn't realize I can change the size of GridSelect cells, I feel stupid like some Windows user, I will take a closer look at it... I need some advice with the layout thing tho smile

Last edited by jilda (2014-03-26 15:04:32)

Offline

#588 2014-08-04 12:38:17

jaanek
Member
Registered: 2014-08-04
Posts: 1

Re: xmonad Hacking Thread

Count-corrupt mentioned some years ago (2010-07-28 00:45:30 with post nr. #375) in current thread that he had some things to still work out like with his config like "making Photoshop's floating dialogs stop moving on their own". I've the same issue & can't figure out how to stop Photoshop floating windows moving on their own. Google did not help me either to solve this problem. Does anyone have a solution for this? I've xmonad v. 0.11. running on arch linux with Photoshop CS5.1.

Offline

#589 2014-11-10 13:16:35

davama
Member
From: NY
Registered: 2014-02-07
Posts: 36

Re: xmonad Hacking Thread

Hello, im trying to have a dzen notification pop up in the center of the screen every time the volume changes. I currently am using a script "volume.sh" to output the state of the master volume to my xmobar. I was googling around and found this toturial very useful http://dmwit.com/volume/ . Unfortunately i dont have the xmonad-extras installed and i honestly would not like to. I would like to avoid cabal as much as possible. So i was wondering if it could output the results of the script into a xmonad "alert" function? I've been messing around with the keybinding but i cant make it work. Not a haskell programmer by all means.


....
 , ((0,       0x1008FF13), readProcess "~/.xmonad/bin/volume.sh" [] [] >>= alert )       -- This gives me an error
--  , ((0,         0x1008FF13), spawn "amixer -q set Master 2%+; ~/.xmonad/bin/volume.sh" >>= alert )  -- This just ouputs a dzen popup of "()" to the center of the screen. 
....
alert = dzenConfig centered . show
centered = onCurr (center 150 66)
    >=> font "-*-helvetica-*-r-*-*-64-*-*-*-*-*-*-*"
    >=> addArgs ["-fg", "#80c0ff"]
    >=> addArgs ["-bg", "#000040"]
....

I would like to leave the "amixer" commnad in the xmonad but it can be moved to the volume.sh if all else fails.

Thank you for your time.

Offline

#590 2015-01-18 10:42:43

flexo3001
Member
From: berlin
Registered: 2012-01-13
Posts: 95

Re: xmonad Hacking Thread

Hey *,
i'm trying to make xmonad a bit more comfortable at the moment. One thing i'm trying out is the action-gridselect. Does anyone know if it's possible to change the bordercolor of the grid? Here's my config so far:
https://github.com/flexo3001/config/blo … /xmonad.hs

Thanks,
flexo


Fight war not wars, destroy power not people!

Offline

#591 2015-01-19 23:04:37

mgmillani
Member
Registered: 2014-04-14
Posts: 13

Re: xmonad Hacking Thread

I'm having trouble using 'withUrgencyHook' with Qt programs (qtox in particular). According to this page, this issue should've been solved. Still, whenever I receive a message the urgency hook does nothing, but the 'QApplication::alert' function is called.
It works as expected for those programs that set the WM_URGENT hint, but Qt uses _NET_WM_STATE_DEMANDS_ATTENTION instead.

Could it be that the issue is back? Or do I need to do something and activate emwh? I do have this in my config:

main = do
  status <- spawnPipe myDzenStatus
  conky  <- spawnPipe myDzenConky
  xmonad $ ewmh defaults {
    logHook = myLogHook status
    }

which should activate ewmh.

By the way, should this _NET_WM_STATE_DEMANDS_ATTENTION be observable through `xprop`? Because I do see the WM_URGENT hint in programs that set it,  but I don't see the _NET_WM_STATE_DEMANDS_ATTENTION in qTox (even using `xprop -spy`).

Offline

Board footer

Powered by FluxBB