]> Git — Sourcephile - julm/julm-nix.git/blob - homes/softwares/xmonad.nix
doom-emacs: reinstall
[julm/julm-nix.git] / homes / softwares / xmonad.nix
1 { pkgs, lib, config, ... }:
2 {
3 config = lib.mkIf config.xsession.windowManager.xmonad.enable {
4 home.file = {
5 ".xmonad/xmobar.hs".source = xmonad/xmobar.hs;
6 };
7 xsession = {
8 scriptPath = ".hm-xsession";
9 initExtra = ''
10 xset dpms 380 640 1200
11 ${pkgs.xorg.xsetroot}/bin/xsetroot -solid black -fg black -bg white -cursor_name left_ptr
12 ${pkgs.rxvt-unicode}/bin/urxvtd -f -o
13 ${pkgs.copyq}/bin/copyq &
14 ${pkgs.pasystray}/bin/pasystray &
15 '';
16 windowManager.xmonad = {
17 haskellPackages = pkgs.haskellPackages;
18 #extraPackages = haskellPackages: [ ];
19 enableContribAndExtras = true;
20 config = xmonad/xmonad.hs;
21 };
22 };
23 services.screen-locker = {
24 enable = true;
25 lockCmd = toString (pkgs.writeShellScript "xsecurelock" ''
26 export PATH=${with pkgs; lib.makeBinPath [coreutils gnugrep xsecurelock xorg.xset]}
27 XSECURELOCK_BLANK_DPMS_STATE=off \
28 XSECURELOCK_BLANK_TIMEOUT=1 \
29 XSECURELOCK_DIM_TIME_MS=2000 \
30 XSECURELOCK_DISCARD_FIRST_KEYPRESS=0 \
31 XSECURELOCK_SAVER=saver_blank \
32 XSECURELOCK_SHOW_DATETIME=1 \
33 XSECURELOCK_SHOW_HOSTNAME=1 \
34 XSECURELOCK_SHOW_USERNAME=1 \
35 XSECURELOCK_WAIT_TIME_MS=2000 \
36 ${pkgs.xsecurelock}/bin/xsecurelock
37 '');
38 #XSECURELOCK_SWITCH_USER_COMMAND="${pkgs.lightdm}/bin/dm-tool switch-to-greeter" \
39 inactiveInterval = lib.mkDefault 3; # minutes
40 xautolock.detectSleep = true;
41 xss-lock.extraOptions = [
42 "--transfer-sleep-lock"
43 #"-n" "${pkgs.xss-lock}/share/doc/xss-lock/dim-screen.sh"
44 ];
45 };
46 home.packages = [
47 pkgs.acpilight
48 pkgs.gmrun
49 pkgs.light
50 pkgs.mate.caja
51 pkgs.copyq
52 pkgs.rxvt-unicode
53 pkgs.scrot
54 pkgs.stalonetray
55 pkgs.wmname
56 pkgs.xmobar
57 pkgs.xorg.xev
58 pkgs.xorg.xhost
59 pkgs.xorg.xmodmap
60 pkgs.xorg.xset
61 pkgs.xsecurelock
62 pkgs.xss-lock
63 ];
64 };
65 }