blob: fccebd4d572198dac37ebfe014a60a1492d70695 (
plain)
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
|
{ config, lib, pkgs, ... }:
let
cfg = config.waybar;
in {
options.waybar.enable = lib.mkEnableOption "Enable and configure Waybar";
config = lib.mkIf cfg.enable {
programs.waybar = {
enable = true;
settings = {
mainBar = {
height = 20;
layer = "top";
position = "bottom";
tray = { spacing = 10; };
modules-center = [ "sway/window" ];
modules-left = [ "sway/workspaces" "sway/mode" ];
modules-right = [
"pulseaudio"
"clock"
"tray"
];
clock = {
format-alt = "{:%Y-%m-%d}";
tooltip-format = "{:%Y-%m-%d | %H:%M}";
};
pulseaudio = {
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}";
format-icons = {
default = [ "" "" "" ];
};
};
};
};
style = ''
* {
border: none;
border-radius: 0;
font-family: monospace;
font-size: 12px;
}
window#waybar {
background: #000000;
}
#workspaces button {
padding-left: 5px;
padding-right: 5px;
}
#clock, #pulseaudio, #tray {
padding-left: 5px;
padding-right: 5px;
}
'';
};
};
}
|