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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
#+title: Waybar Configuration
Show workspaces on the left, the current window in the centre, and MPD status, audio, cpu and memory status, clock, and system tray on the right.
#+begin_src nix :tangle ~/.flake/home/programs/waybar.nix :mkdirp yes
{ config, pkgs, ... }:
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
height = 30;
spacing = 4;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ];
modules-right = [ "mpd" "pulseaudio" "cpu" "memory" "clock" "tray" ];
mpd = {
format = "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) [{songPosition}|{queueLength}] 🎵";
format-disconnected = "Disconnected 🎵";
format-stopped = "{consumeIcon}Stopped 🎵";
unknown-tag = "N/A";
interval = 2;
state-icons = {
paused = "";
playing = "";
};
tooltip-format = "MPD (connected)";
tooltip-format-disconnected = "MPD (disconnected)";
on-click = "foot -e ncmpcpp";
};
tray = {
icon-size = 21;
spacing = 10;
show-passive-items = true;
};
clock = {
format = "{:%H:%M\t%Y-%m-%d}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {
format = "{}% ";
};
network = {
format-wifi = "";
tooltip = false;
format-ethernet = "";
format-linked = "";
format-disconnected = "⚠";
on-click = "kcmshell5 kcm_networkmanagement";
};
pulseaudio = {
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}";
format-bluetooth-muted = " {icon}";
format-muted = " ";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
};
on-click = "pavucontrol";
};
};
};
style = ''
window#waybar {
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
background: transparent;
color: #ffffff;
text-shadow: 1px 1px #64727D;
transition-property: background-color;
transition-duration: .5s;
}
button {
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
padding: 0 5px;
text-shadow: 1px 1px #64727D;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background: transparent;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#clock,
#cpu,
#memory,
#disk,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#scratchpad,
#mpd {
padding: 0 10px;
}
#window,
#workspaces {
margin: 0 4px;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
'';
};
}
#+end_src
|