1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{
lib,
pkgs,
...
}:
let
inherit (lib) getExe;
in
{
# Enable xmonad and xmonad-contrib.
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};
# Enable xmobar, which will be started from xmonad.
programs.xmobar = {
enable = true;
package = pkgs.unstable.xmobar;
extraConfig =
let
volume = lib.getExe pkgs.unstable.pavucontrol;
in
''
Config
{ font = "JetBrainsMono Nerd Font 9"
, allDesktops = True
, hideOnStart = False
, lowerOnStart = True
, overrideRedirect = True
, persistent = True
, sepChar = "%"
, alignSep = "}{"
, template = "%XMonadLog%}%time%{<action=`${volume}` button=1>%default:Master%</action> | %cpu% | %memory% | %date% "
, commands =
[ Run Cpu ["-t", "CPU: <total>%"] 10
, Run Memory ["-t", "RAM: <usedratio>%"] 10
, Run Date "%m.%d.%Y" "date" 10
, Run Date "%H:%M" "time" 10
, Run Volume "default" "Master" ["-t", "VOL: <volume>%"] 10
, Run XMonadLog
]
}
'';
};
# Generate X11 init scripts.
home.file = with pkgs.unstable; {
".xinitrc".text = ''
[ -f ~/.xprofile ] && . ~/.xprofile
[ -f ~/.Xresources ] && ${getExe xorg.xrdb} -merge ~/.Xresources
exec xmonad
'';
".xprofile".text = ''
${getExe xorg.setxkbmap} -layout us
${getExe xorg.xrandr} --output DP-0 --primary --mode 1920x1080 --rotate normal --rate 165
${getExe xorg.xset} r rate 350 40
${getExe xorg.xsetroot} -cursor_name left_ptr
~/.fehbg
'';
".Xresources".text = "Xcursor.size: 24";
};
# Include these packages.
home.packages = with pkgs.unstable; [
pamixer
];
}
|