You are not logged in.
Hi. I'm setting up my xmonad config on arch.
I am 100% new to haskell, but I'm very familiar with other programming languages. (I use c++ most often if it makes sense for the problem)
I was following this tutorial.
After completing the tutorial:
https://ibb.co/sbCbZPv
I am using xmobar-git, xmonad-git, and xmonad-contrib-git from the aur.
xmonad.hs --> http://ix.io/3xpa
.xmobarrc --> http://ix.io/3xpj
I am still new to this so I'm trying to understand everything, but the syntax is very foreign to me and I'm having trouble debugging.
Why is the alsa and the workspaces not working?
Also, for some reason the workspace feature has just disappeared it seems like mod-[1-9] doesn't do anything. I thought that all the defaults stayed the same except for what I change which is why I use the def record right?
Anyway, any insight or ideas would be appreciated.
Last edited by TheJaava (2021-08-31 14:40:17)
Offline
That tutorial might be extra confusing because it's mixing different flavors and/or versions of utility modules, but there are some relevant notes and warnings prefixed with "IF YOU ARE ON A VERSION < 0.17:".
Why is the alsa and the workspaces not working?
As for the workspaces: you have XMonadLog in .xmobarrc, but you use statusBar in xmonad.hs, which pipes the information to xmobar's stdin, so that should be StdinReader. You're also not using myXmobarPP, btw.
I don't know about alsa. It also seems to be waiting for input (so output from alsactl).
Also, for some reason the workspace feature has just disappeared it seems like mod-[1-9] doesn't do anything. I thought that all the defaults stayed the same except for what I change which is why I use the def record right?
With the record update syntax (def { ... } in the myConfig binding) you replace the "keys" value in def with myKeys, which defines only a handful of keybindings. Try https://xmonad.github.io/xmonad-docs/xm … g.html#g:2 (the Emacs-style version is also used in the tutorial).
Offline
Ok, I have fixed everything you have mentioned about the status bar. Now I have my workspaces and layout printed. I noticed the additionalKeys way of changing the keys but I like the way I am organizing my config so that it will be manageable for me. Is there a way to write myKeys based on the default like i think i saw a notation <+> but I am having a hard time finding info on the docs about it.
Offline
I think this should work (note that I removed the unnecessary $ at the end):
myKeys conf@(XConfig {modMask = modMask}) = keys def conf `M.union` M.fromListFor finding info: you can click source next to additionalKeys in the docs to see how they combine existing bindings with a list of new ones. Or note that myKeys should produce a Map and look at its interface. You can also hoogle it. Then you can see that <+> is a synonym for mappend from the Monoid class. Map also has a Monoid instance (with mappend = union), so this operator should also work. You can also use the more standard <> operator (in the Monoid and/or Semigroup module).
Edit: corrected the Union typo
Last edited by Raynman (2021-08-31 15:20:08)
Offline
My new xmonad.hs I was getting an error, but I figured it out. Maybe edit your answer and correct the M.Union to M.union for people coming here for later. but yea I have alsa working now (i needed to set up alsa-tools and install pulseaudio. now I have audio working and displaying in xmobar and I can switch workspaces again. thanks for your help!
Offline