[Nix-dev] xmonad
Bas van Dijk
v.dijk.bas at gmail.com
Thu Oct 30 11:59:14 CET 2008
Hello,
I'm not satisfied with how xmonad is integrated with nixos.
The issue is that xmonad isn't only a windowmanager but is also used
to start applications (via key bindings). That is why the recommended
way ( http://xmonad.org/tour.html ) of starting xmonad is by running
it as the last command in your ~/.xsession. That also has the
advantage that when you close xmonad (by M-shift-q) you come back to
the loginmanager.
I can't figure out how the set the xserver options: sessionType,
windowManager and sessionStarter to create this situation.
Then I read in upstart-jobs/xserver.nix that the users ~/.xsession is
also sourced. So I thought I can just put `xmonad` in my ~/.xsession
and it should just work.
However when reading further I see that after sourcing the users
~/.xsession other commands (windowmanager and sessionCmd) are
executed. I don't like that because when I close xmonad I expect to
return to the loginmanager.
So I modified xserver.nix so that when ~/.xsession exists it is
executed and nothing else:
-----------------------------------------------------------------------------------------------------------
root at nixos /etc/nixos/nixos # svn diff upstart-jobs/xserver.nix
Index: upstart-jobs/xserver.nix
===================================================================
--- upstart-jobs/xserver.nix (revision 13157)
+++ upstart-jobs/xserver.nix (working copy)
@@ -221,7 +221,7 @@
### Allow user to override system-wide configuration
if test -f ~/.xsession; then
source ~/.xsession;
- fi
+ else
### Start a window manager.
@@ -299,7 +299,7 @@
done
''}
-
+ fi
''; # */
-----------------------------------------------------------------------------------------------------------
Is this a good solution to my problem?
regards,
Bas
More information about the nix-dev
mailing list