[Nix-dev] Launching custom xsession

宋文武 iyzsong at gmail.com
Sat Jul 25 16:27:33 CEST 2015


Ruben Astudillo <ruben.astud at gmail.com> writes:

> On other distros I defined a custom XMonad xsession on the following way.
> I put a xmonadCustom.desktop on /usr/share/xsessions like this
>
>      [Desktop Entry]
>      Encoding=UTF-8
>      Type=XSession
>      Exec=/usr/local/bin/xmonadCustom
>      TryExec=/usr/local/bin/xmonadCustom
>      Name=XMonadCustom
>
> Where xmonadCustom was a script on /usr/local/bin that was of this form
>
>      #!/bin/sh
>
>      numlockx &
>      taffybar &
>      xfce4-clipman &
>      redshift -l -33.03:-71.43 &
>      taralli &
>      pasystray &
>      exec xmonad
>
> I know this was hacky and I would like to know the proper way to set
> something like this on NixOS. On IRC somebody mentioned using systemd
> units but I can't find further info on the wiki. Currently I am using a
> pure xmonad setup by using
>
>       services.xserver.windowManager.xmonad.enable = true;
>
> As said on man configuration.nix. Still would appreciate feedback.
Well, I think you can use the startup hook of XMonad:
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-Script.html

Add  ~/.xmonad/hooks as a shell script, let xmonad launch it.



More information about the nix-dev mailing list