Skip to content

Instantly share code, notes, and snippets.

@pbrisbin
Created October 9, 2010 23:57
Show Gist options
  • Save pbrisbin/618738 to your computer and use it in GitHub Desktop.
Save pbrisbin/618738 to your computer and use it in GitHub Desktop.
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer -- one scratchpad
, NS "terminal" spawnTerm findTerm manageTerm -- and a second
]
where
spawnMixer = "ossxmix" -- launch my mixer
findMixer = className =? "Ossxmix" -- its window has a ClassName of "Ossxmix"
manageMixer = customFloating $ W.RationalRect l t w h -- and I'd like it fixed using the geometry below:
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad" -- launch my terminal
findTerm = resource =? "scratchpad" -- its window will be named "scratchpad" (see above)
manageTerm = customFloating $ W.RationalRect l t w h -- and I'd like it fixed using the geometry below
where
-- reusing these variables is ok since they're confined to their own
-- where clauses
h = 0.1 -- height, 10%
w = 1 -- width, 100%
t = 1 - h -- bottom edge
l = (1 - w)/2 -- centered left/right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment