SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2012-12-05 01:57:12

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

clfswm.  yeah.  i think i'm always destined to come back to xmonad.

i still utterly love clfswm though.  i think there's a little persistent pressure on xmonad development to get around it's limitations that supposedly make it hard for it to have a full infinite-depth fs-like window tree hierarchy... with a little more haskellings, i reckon i can see the path to do that... could even write my own module for it.   if the likes of mosaic and sublayouts etc can exist, then surely it shouldnt be that hard to create another dynamic list on another axis, to accomodate the fs'ness of clfswm.   but besides from that one hurdle, anything clfswm does, can be reproduced in xmonad.
i've never yet gotten around to meddling with any of the menu-type stuff xmonad can do, but i've seen some awesome screenshots at least wink such that i think there can be much more innovative and spacially advanced menus in xmonad.

with xmonad, i dont really need to know any haskell, thanks to all the well advised copy&paste one can get away with from the site.  with clfswm, it seemed i realy needed to be a lot more familiar with lisp before i get to have fun with it.  ... i wonder if that was part of why i've eneded up back in xmonad.  ^_^

i was using i3 for about a month or so between clfswming to xmonading again.  i still kinda use them all from time to time.
... but that's probably going to diminish more and more, as i port more and more of what i liked from i3 and clfswm to xmonad.

xmonad is the tits.  so maliable and adaptive.  it really is not just a wm, but a whole wm library from which to construct your own wm from too.

Offline

Help fund CrunchBang, donate to the project!

#27 2012-12-05 17:12:28

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

here's a nice cleaned up, clearer focussed gamer-keybound tabular boonad.  want to know what a tabular boonad is... here, here is my nice minimal tabular boonad:
(version 1.0 rc2 (dev029)

-- Welcome to Digit's Nice Minimal Tabular Boonad
-- takes some cues from clfswm and i3
-- Digit can usually be found in #witchlinux or #crunchbang on irc.freenode.net
-- GNU GPL, yo!
import XMonad  hiding ( (|||) )
import XMonad.Layout.LayoutCombinators -- hiding ( (|||) )
import XMonad.Util.EZConfig -- allows all kinds, like automated emacs submaps 
import XMonad.Actions.Submap -- allows emacs-like keys
import XMonad.Layout.Tabbed -- obvious integral for the TubularBoonad
import XMonad.Layout.Grid -- yus
import XMonad.Layout.OneBig -- yus
import qualified XMonad.StackSet as W -- does something important i'm sure.
import XMonad.Actions.CycleWS -- gets around
import XMonad.Layout.NoBorders -- prettier when fullscreen
import XMonad.Layout.MultiToggle -- allows fullscreen toggle, without Full layout
import XMonad.Layout.MultiToggle.Instances -- 
import XMonad.Actions.DynamicWorkspaces -- hrmm, is this where withNthWorkspace came from... curious.
import XMonad.Actions.CopyWindow(copy) --this too?
--sublayoutstuff http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SubLayouts.html
import XMonad.Layout.SubLayouts -- oh this makes it oh so sexy.
import XMonad.Layout.WindowNavigation -- hrmm
import XMonad.Layout.BoringWindows -- not so boring, proves handy.  make it so.

main = xmonad $ defaultConfig
     { modMask = mod4Mask -- use tux instead of alt, which is M1(/mod1)
     , terminal = "xterm"
     , normalBorderColor  = "#487855" --487855 mk1 of "inteligent green"
     , focusedBorderColor = "#ff6900"
     , keys = djtemacsKeys
     , layoutHook = djtslayoutHook
     , workspaces = djtWorktops               
     } -- `additionalKeysP` djtemacsKeys

djtslayoutHook = smartBorders $ windowNavigation $ subTabbed $ boringWindows $
                 mkToggle (NOBORDERS ?? FULL ?? EOT) (Grid ||| OneBig (3/4) (3/4))
                 
djtWorktops  = ["1","2","3","4","5","6","7","8","9"]

djtemacsKeys = \c -> mkKeymap c $
     [ ("M-S-<Return>", spawn $ terminal c) --but why bother with yeahconsole ;)
     , ("M-x o", spawn "xteddy")  -- type mod+x then w to pop up 'woohoo!'
     , ("M-<F11>", sendMessage $ Toggle FULL) --fullscreen toggle.  yus.
     , ("M-<F4>", kill) --close a window
     , ("M-<F6>", spawn "xkill") -- no, srsly, close it!
     , ("M-q", spawn "xmonad --recompile && xmonad --restart") --try config changes
--     , ("M-S-q", io (exitWith ExitSuccess)) --meh, dont need, myt slip n press.     
--     , ("M-n", spawn "dmenu-bind.sh")  
     , ("M-<F2>", spawn "~/.config/dmenu/dmenu-bind.sh")       
     , ("M-<F3>", spawn "gmrun")     
--     , ("<Menu>", spawn "8menu")
--     , ("M-<Menu>", spawn "dmenu-bind.sh")
     , ("M-<Space>", sendMessage NextLayout)
       
       --gamer controls w,s,a,d.  also suited for other ~one hand on keyboard, one hand on mouse~ type applications, suchas gimp or blender or audacity, etc.
       --some conventional focus changing keybinds are still here, but de-emphasised, as focus would nominally be changed with mouse using this setup
     , ("M-w", windows W.focusUp) --artistgamer
     , ("M-s", windows W.focusDown) --artistgamer
     , ("M-S-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-C-a", sendMessage $ pullGroup L) --sublayout --artistgamer
     , ("M-C-d", sendMessage $ pullGroup R) --sublayout --artistgamer
     , ("M-C-w", sendMessage $ pullGroup U) --sublayout --artistgamer
     , ("M-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
     , ("M-C-S-e", withFocused (sendMessage . MergeAll)) --sublayout --artstgamer
     , ("M-z", prevWS) --artstgamer
     , ("M-x", nextWS) --artstgamer
     , ("S-M-z", shiftToPrev) --artstgamer
     , ("S-M-x", shiftToNext) --artstgamer
     , ("S-M-w", windows W.swapUp) --artstgamer
     , ("S-M-s", windows W.swapDown) --artstgamer
     , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
     , ("M-<space>", sendMessage NextLayout) --toggle between grid and onebig
     , ("M-<Tab>", windows W.focusDown) -- focus next window --or use mouse
     , ("M-S-<Tab>", windows W.focusUp  ) -- focus previous window --or use mouse
     , ("M-e", windows W.swapMaster) -- move focused window to master pane
     , ("M-t", withFocused $ windows . W.sink) -- re-tile floated window
--     , ("M-C-<Period>", onGroup W.focusUp') --sublayout --not sure wtf anymore
--     , ("M-C-<Comma>", onGroup W.focusDown') --sublayout --not sure wtf anymore
       -- and the boring windows:, ((modm, xK_j), focusDown) -- wtf to implement?
       -- and the boring windows:, ((modm, xK_k), focusUp) -- wtf to implement?
--     , ("M-S-<space>", setLayout $ XMonad.layoutHook conf) --rly need dat?
     ]
     ++
     -- (2012-09-29 15:14:37) dr_bs: 
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-") (['1'..'9'])))) (map (withNthWorkspace W.greedyView) [0..])

     ++
     -- so i extrapolate from dr_bs's above, and from 
     -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-DynamicWorkspaces.html
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-S-") (['1'..'9'])))) (map (withNthWorkspace W.shift) [0..])
     

it's quite different to default xmonad.  quite different from any wm... i dont think there's any that come out-of-the-box anything like this.

it only uses two layouts, Grid, and OneBig.
however, it also uses a tabbed sublayout (so any window can be lots of windows with tabs), and further, it also has fullscreen on mod+F11.

it's keybinds are all shoved over to the left, centered around wsad, like a gamer might have.  give the controls a little chance to settle in... i think it could do with further refinements, but seems quite useable, and almost intuitive, even if i do say so, after having changed half a dozen of them (and more) just today.  smile  enjoy.  i welcome all feedback, especially suggestions regarding the keybinds, and/or suggestions for other layouts that ought be included by default.

(ps, looks much nicer and cleaner compared to that mutant config i posted just prior, dont you agree?)
(pps, ugh, maybe take it somewhere you can see it with syntax highlighting... like http://pastebin.com/LKFFySC9 or http://hpaste.org/78814 (though neither of them look as lovely as it does in my emacs config))

Last edited by Digit (2012-12-05 17:21:34)

Offline

#28 2013-01-14 00:27:50

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

i need somewhere to ramble about xmonad again... n this seems the best place for it, so i'm not boring the crap outta peeps who dont wanna hear it.  ^_^

gridselect!

http://xmonad.org/xmonad-docs/xmonad-co … elect.html

i've been using xmonad most of the time since around 2007/2008, and a few times, i'd bounced past the gridselect page, and gotten intimidated outta trying it.  i mean, if you're dyslexic n your brain tries to swallow page of text non-linearly, whole, then indeed, it is kinda daunting... but, just the first two or three lines, are all that's needed for the basic functionality with defaults.   

AND IT'S LUSH!    XD

very happy with it.   wish i'd tried it sooner.  smile

so anyways, now i have another way to navigate to windows, and another way to launch applications, added to my tabular-boonad.   ^_^   not in the original plan for tabular boonad, but welcome in my config for now, none the less.   very welcome.

it's not a necessity, xmonad never felt lacking without gridselect, but now that i have it, it's a godsend.  smile

here's my latest in the tabular-boonad series.

-- Welcome to Digit's Nice Minimal Tabular Boonad
-- takes some cues from clfswm and i3
-- Digit can usually be found in #witchlinux or #crunchbang on irc.freenode.net
-- GNU GPL, yo!
import XMonad  hiding ( (|||) )
import XMonad.Layout.LayoutCombinators -- hiding ( (|||) )
import XMonad.Util.EZConfig -- allows all kinds, like automated emacs submaps 
import XMonad.Actions.Submap -- allows emacs-like keys
import XMonad.Layout.Tabbed -- obvious integral for the TubularBoonad
import XMonad.Layout.Grid -- yus
import XMonad.Layout.OneBig -- yus
import qualified XMonad.StackSet as W -- does something important i'm sure.
import XMonad.Actions.CycleWS -- gets around
import XMonad.Layout.NoBorders -- prettier when fullscreen
import XMonad.Layout.MultiToggle -- allows fullscreen toggle, without Full layout
import XMonad.Layout.MultiToggle.Instances -- 
import XMonad.Actions.DynamicWorkspaces -- hrmm, is this where withNthWorkspace came from... curious.
import XMonad.Actions.CopyWindow(copy) --this too?
--sublayoutstuff http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SubLayouts.html
import XMonad.Layout.SubLayouts -- oh this makes it oh so sexy.
import XMonad.Layout.WindowNavigation -- hrmm
import XMonad.Layout.BoringWindows -- not so boring, proves handy.  make it so.

-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
import XMonad.Actions.GridSelect -- adds that gui selection menu 2d map thingy

main = xmonad $ defaultConfig
     { modMask = mod4Mask -- use tux instead of alt, which is M1(/mod1)
     , terminal = "st" -- was "xterm"
     , normalBorderColor  = "#487855" --487855 mk1 of "inteligent green"
     , focusedBorderColor = "#ff6900"
     , keys = djtemacsKeys
     , layoutHook = djtslayoutHook
     , workspaces = djtWorktops
     } -- `additionalKeysP` djtemacsKeys

djtsTabConfig = defaultTheme { inactiveBorderColor = "#FF0000"
                                   , activeTextColor = "#00FF00"}

djtslayoutHook = smartBorders 
                 $ windowNavigation 
                 $ subTabbed 
                 $ boringWindows 
                 $
                 mkToggle (MIRROR ?? NOBORDERS ?? FULL ?? EOT) (Grid ||| OneBig (3/4) (3/4))
                 
djtWorktops  = ["1","2","3","4","5","6","7","8","9"]

djtemacsKeys = \c -> mkKeymap c $
     [ ("M-S-<Return>", spawn $ terminal c) --but why bother with yeahconsole ;)
     , ("M-x o", spawn "xteddy")  -- type mod+x then o.   y it no work?
     , ("M-<F11>", sendMessage $ Toggle FULL) --fullscreen toggle.  yus.
     , ("M-S-<F11>", sendMessage $ Toggle MIRROR) --mirror toggle.  yus yus.     
     , ("M-<F4>", kill) --close a window
     , ("M-<F6>", spawn "xkill") -- no, srsly, close it!
     , ("M-q", spawn "xmonad --recompile && xmonad --restart") --try config changes
--     , ("M-S-q", io (exitWith ExitSuccess)) --meh, dont need, myt slip n press.
     , ("M-<F5>", goToSelected defaultGSConfig) -- interim gridselect bind
     , ("M-S-<F5>", spawnSelected defaultGSConfig ["gimp","mypaint","inkscape","blender","iceape","lmms","hydrogen","audacity"]) -- interim gridselect bind
--     , ("M-n", spawn "dmenu-bind.sh")  
     , ("M-<F2>", spawn "~/.config/dmenu/dmenu-bind.sh")       
     , ("M-<F3>", spawn "gmrun")     
--     , ("<Menu>", spawn "8menu")
--     , ("M-<Menu>", spawn "dmenu-bind.sh")
     , ("M-<Space>", sendMessage NextLayout)
       
       --gamer controls w,s,a,d.  also suited for other ~one hand on keyboard, one hand on mouse~ type applications, suchas gimp or blender or audacity, etc.
       --some conventional focus changing keybinds are still here, but de-emphasised, as focus would nominally be changed with mouse using this setup
     , ("M-w", windows W.focusUp) --artistgamer
     , ("M-s", windows W.focusDown) --artistgamer
     , ("M-S-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-C-a", sendMessage $ pullGroup L) --sublayout --artistgamer
     , ("M-C-d", sendMessage $ pullGroup R) --sublayout --artistgamer
     , ("M-C-w", sendMessage $ pullGroup U) --sublayout --artistgamer
     , ("M-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-e", windows W.swapMaster) -- move focused window to master pane     
     , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
     , ("M-C-S-e", withFocused (sendMessage . MergeAll)) --sublayout --artstgamer
     , ("M-z", prevWS) --artstgamer
     , ("M-x", nextWS) --artstgamer
     , ("S-M-z", shiftToPrev) --artstgamer
     , ("S-M-x", shiftToNext) --artstgamer
     , ("S-M-w", windows W.swapUp) --artstgamer
     , ("S-M-s", windows W.swapDown) --artstgamer
     , ("M-<space>", sendMessage NextLayout) --toggle between grid and onebig
     , ("M-<Tab>", windows W.focusDown) -- focus next window --or use mouse
     , ("M-S-<Tab>", windows W.focusUp  ) -- focus previous window --or use mouse
     , ("M-t", withFocused $ windows . W.sink) -- re-tile floated window
--     , ("M-C-<Period>", onGroup W.focusUp') --sublayout --not sure wtf anymore
--     , ("M-C-<Comma>", onGroup W.focusDown') --sublayout --not sure wtf anymore
       -- and the boring windows:, ((modm, xK_j), focusDown) -- wtf to implement?
       -- and the boring windows:, ((modm, xK_k), focusUp) -- wtf to implement?
--     , ("M-S-<space>", setLayout $ XMonad.layoutHook conf) --rly need dat?
     ]
     ++
     -- (2012-09-29 15:14:37) dr_bs: 
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-") (['1'..'9'])))) (map (withNthWorkspace W.greedyView) [0..])

     ++
     -- so i extrapolate from dr_bs's above, and from 
     -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-DynamicWorkspaces.html
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-S-") (['1'..'9'])))) (map (withNthWorkspace W.shift) [0..])
     

rather tempted to churn out a few other variations on the default config with gridselect added.   might get around to that later.  for now, i'm just gleefully rolling around in the joy of having got past my timid procrastination, and have gridselect now.

... i'll probably start tweaking n customising gridselect now...  though... it really is very nice as is, with the defaults.

oh, i suppose i should likely add some screenshots too...


taDJjNQapp starter
(currently just with the shortlist of creative apps off the top of my head)

taDJjNgwindow selector
(am kinda curious to see how it will handle it when i have more open than will fit on screen)

there are maaaany more things i can do with it, having looked briefly through the other stuff on the gridselect page, but these two ways are more than enough for me for now.   smile   feels rather luxurious.   will be better once i get rid of the blue for my uzbl windows.  ^_^

i forsee i shall be making numerous app starter keybinds across my keyboard soon.   smile   much akin to an old plan i had ages back, and one of the guys in #xmond even suggested grid select back then.  heh.  silly me for not following that up back then. smile

onward!



--P.S.
-- taDJjNw results of too-many-windows test...   
-- safe enough... note how the sides dont keep poking out in a diamond when they reach the screen edge.  smile   unlikely to ever fill up the whole screen then.   even with my +40 or so terminals.   
-- -- (also note, i use st now, not xterm... very nice n minimal.   i still have xterm in yeahconsole though.  st alone as only terminal, is a bit too austere n miniml even for me.   st makes even rxvt seem like such a fattie.)

Last edited by Digit (2013-01-14 00:36:44)

Offline

#29 2013-02-07 08:06:43

jess
Member
Registered: 2012-03-26
Posts: 16

Re: My Xmonad Adventures

Hey,

I've been using xmonad as well for the last while too. I found a bitchin setup from a guy called David Brewer on Github. It has a really nice setup using the number pad to define workspaces in a logical manner, and uses xmobar (as opposed to tint2) with a nice keybinding to hide it away when you don't need it. It's also got the GIMP/chat window layouts all set up which means I don't have to tweak it like I do when using vanilla xmonad! smile

I've started modifying it to have a few more Crunchy keybindings, use gmrun for the launcher, switched to some of the default #! apps and look & feel etc. Probably the biggest change is using the super/Windows key rather than the Alt key as the modifier for the xmonad keybindings. I haven't done everything yet, just the stuff that I use most often.

You can access my forked version of Davids repo on GitHub here: https://github.com/jesserobertson/xmonad-conf

You can fork your own version or just download it with git by doing

git clone git@github.com:jesserobertson/xmonad-conf.git ~/.xmonad

Warning: this will overwrite your existing xmonad setup! Do

cp ~/.xmonad ~/.xmonad-backup

first if you've got something you'd rather keep!

There's an installer script in the repo (install-xmonad) whcih you can run if you want. It's pretty basic though, so YMMV.

Anyway, good to see some other Haskellers around the place, even if it's only editing xmonad files! smile


Adde parvum parvo magnus acervus erit - Ovid

Offline

#30 2013-02-15 17:49:19

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

~due to edits, this post is a bit higgletepigglety~

yes!  very glad you popped by with that, jess.  smile

(my haskellings have been on the rise recently, as i start to learn yesod, which besides my skeleton irc infobot, is my first serious (ly fun) non-xmonad haskelling.)

indeed, chat and gimp layouts are a very very welcome addition to any xmonad config... for those of us who use them.

without having tried yours yet, just reading through the github readme, it's very nice to see the #!ness of it.  smile   alas, i have no numberpad, so i'd need to re-tweak that before trying it out.  (oh, wait, no i dont, just got to that part of the documentation that says it still works with the number key row)

i'll hafta remember to take a look at your xrandr stuff for multiple monitor.   i never had trouble back in the day when using xmonad on sabayon, since they made sure the kernel and nvidia drivers worked together, and that nvidia-settings did wonders... after xorg was sorted, xmonad was completely effortless, working out of the box across all three of my monitors.  of course, these days, i'd rather avoid proprietary stuff as much as possible, so your xrandr stuff n the like, may prove very handy.  smile

and, as ever, a great place for further inspiration or a config to use, is http://www.haskell.org/haskellwiki/Xmon … ig_archive
( i started my original xmonad customising adventure from that page, specifically John Goerzen's Configuration and Tutorial which like yours uses xmobar)

a bit more cleaning up, and i'll be considering sending them my config for the config archive, since it's distinct and broadly useful enough.  methinks you should consider the same, from the looks of it, jess.  smile

at the very least, i should get around to taking a leaf out of your book and get my xmonad config up on github ~if only for my own benefit, since i use it on multiple machines, more ideally, with a full walk-through as you've done.   excellent stuff, pedagogy intact, well documented.


...and... threecol might just be the other layout i've been looking for.  smile  so thanks for that too.

Offline

#31 2013-02-16 01:21:11

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

coming around here has set me off again.
just going to take some notes here to get my ball rolling at another attempt to implement a faux hierarchical stack of nested windows, akin to a file-system, as seen in clfswm.

i've been looking at several modules, many of which could prove useful, but to keep it simple...

XMonad.Layout.Combo (or ComboP)
XMonad.Layout.MessageControl

these two, with a clever implementation of each, oughta sort out the principle feature sought-after.

XMonad.Layout.Combo (or ComboP) though may on immediate face value seem too simple for what you are attempting to achieve, it does have the capacity to provide complex multi-nested layouts.

XMonad.Layout.MessageControl will likely prove very useful for controlling nested combo layouts.  it seems its escape feature may help bring you back up and out a level in the window tree.

after you have both those working, consider the likes of http://xmonad.org/xmonad-docs/xmonad-co … ators.html to help make it more navicable.  (navigatable?)
and then perhaps just full layout or XMonad.Layout.Maximize to attempt to re-create the ability of clfswm's to not only move focus up or down (out or in, as i prefer to think of it) the window tree, but also maximise any sublayout.

even then you'd be a long way off from a reasonable re-implementation of clfswm, but certainly a step closer than merely having tabbed sublayouts with the delusion it's like clfswm, because it's not.  XD


Dear Present-Digit, this is your past self talking here, so pay attention.  go do that^ with combo and message layout extensions, just start a fresh xmonad.hs to test out a proof of concept on it, to keep it clean and clear, before attempting to implement in "tabular boonad" (or "i3fsmad", or whatever).  If you dont do this, Future-Digit will be very displeased with you.

time for a break just now tho, so i dont burn out.

Offline

#32 2013-02-28 00:06:32

jess
Member
Registered: 2012-03-26
Posts: 16

Re: My Xmonad Adventures

How did you go with the hierarchical stack of windows? Can I help at all?

Can't say it'd be for me as I tend to prefer the grid where I can see everything on my screen. But it's interesting to think about how you might implement something like that.


Adde parvum parvo magnus acervus erit - Ovid

Offline

#33 2013-03-25 22:17:55

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

the hierarchical stack is not like a visual stack of windows stacked up on each other.  it is more an internal concept in xmonad.  the xmonad stack, as in the list of windows it uses.  it is basically just a list.  what i was aiming for was to be able to tree it [edit: if in doubt about wtf i mean, see clfswm, it will explain it all.]...  it /should/ be possible to accomplish this within the current paradigm, without a fundamental re-write....  but i'm not that addept yet to understand a clear path to do so yet.

anyhoo, in other news... my tabular boonad is now hosted on gitorious.... which might help reduce my need to go off on lengthy diatribes about it here.  ^_^  https://gitorious.org/tabularboonad/tabularboonad

Last edited by Digit (2013-06-30 00:34:41)

Offline

#34 2013-06-29 15:32:37

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

i'm about to start on an adventure to try to get tickr ( http://www.newsrssticker.com/index.php ) to play nice with xmonad.  i thought i'd start writing this up early on as i go, having learned from past experiences.

so far i had the notion of reaching for gaps ( http://xmonad.org/xmonad-docs/xmonad-co … -Gaps.html ) and as it mentions near the start of the XMonad-Layout-Gaps page, i may be better off with ManageDocks ( http://xmonad.org/xmonad-docs/xmonad-co … Docks.html ), though, i suspect tickr is not suitable for that sort of thing... a few searches on tickr and ewmh and struts, proved inconclusively useless.

and that's as far as i am up to writing this far... havnt backed up my xmonad.hs or had a look at how to implement, yet.

...

ok, so poking around, trying with manage hooks first... and... that was easy.  smile    well, fairly easy since i've been using xmonad for years now.  but it's not perfect, the active window highlight is flickering... i'm not sure if this is entirely tickr's fault, or my implementation of managehookery... i'm sure it wasnt flickering before... but then, i changed the refresh rate on tickr, so maybe i just didnt notice it earlier.

here's what my tabularboonad looks like at the moment, here on my gentoo (which i'm kinda developing separately-ish, a semi-fork, a branch, since there are a few quirks and differences that had to be navigated, like different terminal names n whatnot.):

-- Welcome to Digit's Nice Minimal Tabular Boonad
-- takes some cues from clfswm and i3
-- Digit can usually be found in #witchlinux or #crunchbang on irc.freenode.net
-- GNU GPL, yo!
{-# LANGUAGE NoMonomorphismRestriction #-} -- for gridselect customisation
import XMonad  hiding ( (|||) )
import XMonad.Layout.LayoutCombinators -- hiding ( (|||) )
import XMonad.Util.EZConfig -- allows all kinds, like automated emacs submaps 
import XMonad.Actions.Submap -- allows emacs-like keys
import XMonad.Layout.Tabbed -- obvious integral for the TabularBoonad
import XMonad.Layout.Grid -- yus
import XMonad.Layout.OneBig -- yus
import qualified XMonad.StackSet as W -- does something important i'm sure.
import XMonad.Actions.CycleWS -- gets around
import XMonad.Layout.NoBorders -- prettier when fullscreen
import XMonad.Layout.MultiToggle -- allows fullscreen toggle, without Full layout
import XMonad.Layout.MultiToggle.Instances -- 
import XMonad.Actions.DynamicWorkspaces -- hrmm, is this where withNthWorkspace came from... curious.
import XMonad.Actions.CopyWindow(copy) --this too?
--sublayoutstuff http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SubLayouts.html
import XMonad.Layout.SubLayouts -- oh this makes it oh so sexy.
import XMonad.Layout.WindowNavigation -- hrmm
import XMonad.Layout.BoringWindows -- not so boring, proves handy.  make it so.
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
import XMonad.Actions.GridSelect -- adds that gui selection menu 2d map thingy
--import XMonad.StackSet as W -- scratchpad (already got, above)
import XMonad.ManageHook -- scratchpad
import XMonad.Util.NamedScratchpad -- scratchpad
--for tickr
import XMonad.Hooks.ManageDocks --

main = xmonad $ defaultConfig
     { modMask = mod4Mask -- use tux instead of alt, which is M1(/mod1)
     , terminal = "xterm" -- like "rxvt-unicode", "xterm","terminator","urxvt",etc
     , normalBorderColor  = "#487855" --487855 mk1 of "inteligent green"
     , focusedBorderColor = "#ff6900"
     , keys = djtemacsKeys
     , layoutHook = djtslayoutHook
     , workspaces = djtWorktops
     , manageHook = namedScratchpadManageHook scratchpads <+> manageDocks
     , handleEventHook = docksEventHook
     } -- `additionalKeysP` djtemacsKeys

djtsTabConfig = defaultTheme { inactiveBorderColor = "#FF0000"
                                   , activeTextColor = "#00FF00"}

djtslayoutHook = smartBorders 
                 $ windowNavigation 
                 $ subTabbed 
                 $ boringWindows 
                 $
                 avoidStruts (mkToggle (MIRROR ?? NOBORDERS ?? FULL ?? EOT) (Grid ||| OneBig (5/8) (3/5) ||| OneBig (3/4) (3/4)))
                 
djtWorktops  = ["1","2","3","4","5","6","7","8","9"]

-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
--gsconfig1 = defaultGSConfig { gs_cellheight = 19, gs_cellwidth = 144 }
gsconfig2 colorizer = (buildDefaultGSConfig colorizer) { gs_cellheight = 19, gs_cellwidth = 190 }

-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-NamedScratchpad.html
scratchpads = [
-- run htop in xterm, top half, perfect fit.
    NS "htop" "urxvt -e htop" (title =? "htop") 
        (customFloating $ W.RationalRect (0/1) (0/1) (1/1) (1/2)) ,
-- run alsamixer in xterm, bottom half of screen space around edge. 
    NS "alsamixer" "urxvt -e alsamixer" (title =? "alsamixer") 
        (customFloating $ W.RationalRect (1/100) (49/100) (98/100) (1/2)) ,
-- drop-down terminal    like yeahconsole/tilda/guake/yakuake
--    NS "xmoake" "urxvt -e tmux" (title =? "xmoake")
--    NS "urxvt" "urxvt" (title =? "urxvt")
    NS "tmux" "urxvt -e tmux" (title =? "tmux")
        (customFloating $ W.RationalRect (0/1) (0/1) (1/1) (1/2)) ,
-- pop-in terminal chat    like above, but one for chat.    
    NS "chat" "urxvt -e chat" (title =? "chat")
        (customFloating $ W.RationalRect (0/1) (0/1) (1/2) (1/2))
    ] where role = stringProperty "WM_WINDOW_ROLE"

djtemacsKeys = \c -> mkKeymap c $
     [ ("M-S-<Return>", spawn $ terminal c) --but why bother with yeahconsole or scratchpads ;)
--     , ("M-S-<Space>", setLayout djtslayoutHook) -- %!  Reset the layouts on the current workspace to default
     , ("M-S-<Space>", refresh) -- incase stuff gets messy. ^and cos i cant get reset to work.  tried ways.
     , ("M-x o", spawn "xteddy")  -- type mod+x then o.   y it no work?
     , ("M-<F11>", sendMessage $ Toggle FULL) --fullscreen toggle.  yus.
     , ("M-S-<F11>", sendMessage $ Toggle MIRROR) --mirror toggle.  yus yus.     
     , ("M-<F4>", kill) --close a window
     , ("M-<F6>", spawn "xkill") -- no, srsly, close it!
     , ("M-q", spawn "xmonad --recompile && xmonad --restart") --try config changes
--     , ("M-S-q", io (exitWith ExitSuccess)) --meh, dont need, myt slip n press.
     , ("M-<F5>", goToSelected defaultGSConfig) -- interim gridselect bind
     , ("M-S-<F5>", spawnSelected defaultGSConfig ["gimp","mypaint","inkscape","blender","freecad","iceape","lmms","hydrogen","audacity"]) -- interim gridselect bind
--     , ("M-n", spawn "dmenu-bind.sh")  
--     , ("M-r", spawn "~/.config/dmenu/dmenu-bind.sh") --artistgamer
     , ("M-r", spawn "dmenu_run") --artistgamer
--     , ("M-<F2>", spawn "~/.config/dmenu/dmenu-bind.sh") --oldskool
     , ("M-A-r", spawn "gmrun") --artistgamer
--     , ("M-<F3>", spawn "gmrun") --oldskool
--     , ("<Menu>", spawn "8menu")
--     , ("M-<Menu>", spawn "dmenu-bind.sh")
--     , ("M-<Space>", sendMessage NextLayout) --got that below.  double entry.
       
       --gamer controls w,s,a,d.  also suited for other ~one hand on keyboard, one hand on mouse~ type applications, such as gimp or blender or audacity, etc.
       --some conventional focus changing keybinds are still here, but de-emphasised, as focus would nominally be changed with mouse using this setup
     , ("M-w", windows W.focusUp) --artistgamer
     , ("M-s", windows W.focusDown) --artistgamer
     , ("M-S-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-C-a", sendMessage $ pullGroup L) --sublayout --artistgamer
     , ("M-C-d", sendMessage $ pullGroup R) --sublayout --artistgamer
     , ("M-C-w", sendMessage $ pullGroup U) --sublayout --artistgamer
     , ("M-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
     , ("M-e", windows W.swapMaster) -- move focused window to master pane     
     , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
     , ("M-C-S-e", withFocused (sendMessage . MergeAll)) --sublayout --artstgamer
     , ("M-z", prevWS) --artstgamer
     , ("M-x", nextWS) --artstgamer
     , ("S-M-z", shiftToPrev) --artstgamer
     , ("S-M-x", shiftToNext) --artstgamer
     , ("S-M-w", windows W.swapUp) --artstgamer
     , ("S-M-s", windows W.swapDown) --artstgamer
     , ("M-<Space>", sendMessage NextLayout) --toggle between grid and onebig
     , ("M-<Tab>", windows W.focusDown) -- focus next window --or use mouse
     , ("M-S-<Tab>", windows W.focusUp  ) -- focus previous window --or use mouse
     , ("M-t", withFocused $ windows . W.sink) -- re-tile floated window
--     , ("M-C-<Period>", onGroup W.focusUp') --sublayout --not sure wtf anymore
--     , ("M-C-<Comma>", onGroup W.focusDown') --sublayout --not sure wtf anymore
       -- and the boring windows:, ((modm, xK_j), focusDown) -- wtf to implement?
       -- and the boring windows:, ((modm, xK_k), focusUp) -- wtf to implement?
--     , ("M-S-<space>", setLayout $ XMonad.layoutHook conf) --rly need dat?
-- namedscratchpad keybinds     
     , ("<F12>", namedScratchpadAction scratchpads "tmux") -- xmoake scratchpad
     , ("M-<F8>", namedScratchpadAction scratchpads "htop") -- scratchpad 
     , ("M-<F9>", namedScratchpadAction scratchpads "alsamixer") -- scratchpad 
     , ("M-<F7>", namedScratchpadAction scratchpads "chat")  
     ]
     ++
     -- (2012-09-29 15:14:37) dr_bs: 
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-") (['1'..'9'])))) (map (withNthWorkspace W.greedyView) [0..])

     ++
     -- so i extrapolate from dr_bs's above, and from 
     -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-DynamicWorkspaces.html
     zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-S-") (['1'..'9'])))) (map (withNthWorkspace W.shift) [0..])
     

heh, i'll diff around a bit later and see what's worthy of putting on the gitorious of it.   ... or ... should really start using git like it's meant to be used, to help manage all this versioning madness i get upto.

didnt get any further with sussing the clfswm-like "fs"-ism in xmonad. 
if i could implement some window-splitting (i3-like) or layouts within a window (clfswm-like) achieved with sublayouts, layout combo... idk...  as it is, with a simple tabbed sublayout, and the ability to fullscreen... that's kinda part way there.  but it is limited to one level of sublayout.  what i need is sublayouts within sublayouts.   ... and then the ability to set "workspace"-alike keybinds on any window, for quick navigation.   ... or even tie it in with my gridselect menus.

anyhoo, that's enough for now.  i have tickr working, n that makes me happy.   albeit, not on every workspace yet either... and i havn't bothered implementing the toggle keybind yet, partly because it is only on one workspace.  still, its there... now i can populate it with my fave rss feeds, and once again feel like i'm keeping up to date with the goings on in the world.  mmm, tickr.

Offline

#35 2013-06-30 00:32:26

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

o wait no, that was just some tabular boonad tabs making it look like that ubl-browser session was plush up to the tickr bar.  nope.  seems manage dock doesnt work with tickr... unless i did something wrong...  i knew that seemed too easy.

Offline

#36 2014-02-15 00:03:04

joek
#! Junkie
Registered: 2011-09-06
Posts: 497

Re: My Xmonad Adventures

Necro-post time!

I've recently come back to Xmonad, and looking through this thread has inspired me to play around with the XMonad.Layout.SubLayouts module. Very cool.

My current xmonad.hs file looks something like this:

import XMonad
import XMonad.Actions.CycleWindows
import XMonad.Actions.DwmPromote
import XMonad.Actions.CycleWS
import XMonad.Actions.SpawnOn
import XMonad.Hooks.ManageDocks
import XMonad.Util.EZConfig
import XMonad.Layout.NoBorders
import XMonad.Layout.Grid
import XMonad.Layout.Tabbed
import XMonad.Layout.SubLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.PerWorkspace (onWorkspace)

myTerminal = "/usr/bin/urxvt"

-- Define applications which should float by default; 
-- and those which should open on other WS by default
myManageHook = composeAll . concat $
  [ 
    [ className =? i --> doFloat | i <- myFloats ]
  , [ className =? m --> doShift "8" | m <- myMediaShifts ]
  , [ className =? m --> doShift "9" | m <- myChatShifts ]
  ]
  where
    myFloats = ["Gimp","Skype"]
    myMediaShifts = ["Vlc","Rhythmbox"]
    myChatShifts = ["Skype","Xchat"]

-- Layouts: Tall and Grid; tabbed sub-layout
-- If only one window, don't bother with borders for focused
defaultLayout = windowNavigation $ subTabbed $ avoidStruts $ smartBorders (
  Tall 1 (3/100) (1/2) ||| Grid )

myLayouts = defaultLayout

-- 9 workspaces
myWorkspaces =
  map show [1..9]

-- on startup, run conky
myStartupHook = do
  spawn "conky"

main = do
  xmonad $ defaultConfig
    { manageHook = manageDocks <+> myManageHook <+> manageSpawn <+> manageHook defaultConfig
    , layoutHook = myLayouts
    , workspaces = myWorkspaces
    , terminal = myTerminal
    , startupHook = myStartupHook
    } 
    `additionalKeysP` myKeys

    -- list of additional custom keybindings:
myKeys = 
  [ 
  -- various keybindings for starting applications:
    ("M1-q", spawn "slock")
  , ("M4-w", spawn "iceweasel")
  , ("M4-m", spawn "rhythmbox")
  , ("M4-v", spawn "vlc")
  , ("M4-f", spawn "pcmanfm")
  , ("M4-e", spawn "gvim")
  , ("M4-t", spawn myTerminal)
  , ("M1-<Return>", spawn myTerminal)
  , ("M1-S-p", spawn "dmenufm")
  , ("M4-S-m", spawn "mpdmenu")

  -- control volume from keyboard
  , ("M1-S-<comma>", spawn "amixer -q set Master,0 5%-")
  , ("M1-S-<period>", spawn "amixer -q set Master,0 5%+")

  , ("M1-r", restart "xmonad" True)
  , ("M1-S-<Return>", dwmpromote)

  -- A-<L|R> moves to prev/next WS; A-S-<L|R> pushes window there
  , ("M-<Left>", prevWS)
  , ("M-<Right>", nextWS)
  , ("M-S-<Left>", shiftToPrev)
  , ("M-S-<Right>", shiftToNext)

  -- control tab-groups: 
  -- pullGroup pulls window in direction into tabgroup
  -- unMerge takes focused window out of tabgroup
  , ("M-C-k", sendMessage $ pullGroup U)
  , ("M-C-h", sendMessage $ pullGroup L)
  , ("M-C-j", sendMessage $ pullGroup D)
  , ("M-C-l", sendMessage $ pullGroup R)
  , ("M-u", withFocused (sendMessage . UnMerge))
  ]

The configuration file is available here.

Offline

#37 2015-04-20 08:44:28

Digit
#! Die Hard
From: the internet
Registered: 2009-05-26
Posts: 1,083
Website

Re: My Xmonad Adventures

2 and a half years i've been using my tabular boonad config.  wow.
n i still havnt gotten around to sorting out my fangled fs notions.
- further testament to the worthyness as-is, i suppose. 
-- i wouldnt have expected such a quirky config that basically uses layout's for resizing, with no fine tune.
--- it kinda just works, by keeping the matter of window size management very simple.
---- having said that, i have been having notions of shopping around for other layouts again.
----- perhaps if only for the extra practice with the haskelling that i might one day actually manage to make my xmonadfswm extension idea.

hosted on a freedom respecting public git now.  (yes, sadly the word is gitorious is selling out)
https://notabug.org/Digit/TabularBoonad

Last edited by Digit (2015-04-20 08:45:07)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo