Idea for a fun project, if you use i3 in particular. Write a way to configure i3 that is fully type-checked. Eg. as Haskell code (or Dhall) that compiles to the i3 configuration file. Kind of like xmonad, but compiles to conf file instead of executable. Bonus points for IDE support via Language Server Protocol (autocomplete, etc.); well, if we use Haskell that's automatically ensured by haskell-language-server?
I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per works...
@TheMatten Just 3? Not 4? In i3 you hit Ctrl+h and it opens the new windows across horizontally. No limits to number of columns or rows, hence "flexible". But I'll give xmonad another try, now that I'm comfortable with Haskell; it probably will require substantial Haskell code to get it to do what I want.
TheMatten Just 3? Not 4? In i3 you hit Ctrl+h and it opens the new windows across horizontally. No limits to number of columns or rows, hence "flexible". But I'll give xmonad another try, now that I'm comfortable with Haskell; it probably will require substantial Haskell code to get it to do what I want.
Idea for a fun project, if you use
i3
in particular. Write a way to configure i3 that is fully type-checked. Eg. as Haskell code (or Dhall) that compiles to the i3 configuration file. Kind of like xmonad, but compiles to conf file instead of executable. Bonus points for IDE support via Language Server Protocol (autocomplete, etc.); well, if we use Haskell that's automatically ensured by haskell-language-server?Dhall also features a LSP implementation that can provides autocompletion, and it is working quite well without any configuration.
That would be indeed a interesting project
There is a 4 years old attempt here: https://github.com/vlad-shatskyi/i3wm-config-haskell
Can we free monads (polysemy) to define this DSL?
If we have a library/app like this, we can extend it further by enabling people to write "plugins" in Haskell.
Actually, that can also happen independent (at runtime) via https://github.com/leshow/i3ipc#readme
Why would one bind i3 when there xmonad :flushed:
Last I tried xmonad was as a Haskell n00b. I couldn't figure out flexible colums layout like you can do in i3. Maybe I should give it another try.
btw, whatever happened to https://github.com/waymonad/waymonad ? seems like inactive for a year
Abandonned i guess :shrug:♂️
Am probably one of the person that know the least haskell and manage to make work Xmonad :wink:
Sridhar Ratnakumar said:
I found https://unix.stackexchange.com/questions/48679/how-do-i-enable-a-three-column-layout-in-xmonad
BTW, how does XMonad work actually?
xmonad.hs
is the WM itself, or it's used by XMonad to load config and custom features in some way?xmonad.hs:
so it's the WM itself, taking a configuration value
@TheMatten Just 3? Not 4? In i3 you hit
Ctrl+h
and it opens the new windows across horizontally. No limits to number of columns or rows, hence "flexible". But I'll give xmonad another try, now that I'm comfortable with Haskell; it probably will require substantial Haskell code to get it to do what I want.I also want to edit my xmonad configuration (xmonad.hs) using haskell-language-server for full IDE support. I smell an awesome blog post coming ...
"Edit your WM configuration with autocomplete, etc. Can your WM do this?"
Sridhar Ratnakumar said:
I looked through
xmonad-contrib
and there seems to be one more layout - https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Layout-MultiColumns.htmlhttps://twitter.com/sridca/status/1331701938556166150
Editing @xmonad "configuration" with full IDE support in @code thanks to @nixos_org, nix and haskell-language-server. Can your window manager do this? https://github.com/srid/nix-config/tree/64e3d5de3383172e95b504dd8e410e62302f3632/nixos/xmonad-srid https://twitter.com/sridca/status/1331701938556166150/photo/1
- Devil May Care (@sridca)Kampouse said:
Thanks for the nudge; I'm now a proud Xmonader :grinning:
https://www.srid.ca/xmonad-conf-ide.html
:flushed: sorry :joy: