alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
desktops.sway: add waybar
author
lassulus
date
10 months ago
(Nov 30, 2025, 4:17 PM CET)
commit
1ee74d8c
1ee74d8c5cacfa4cfcf1cb4a661a587c00670743
parent
b69bf91d
b69bf91dccf4f02e4cd79657997c2918e6c0d10f
+115
-14
1 changed file
Expand all
Collapse all
Unified
Split
2configs
desktops
sway
default.nix
+115
-14
2configs/desktops/sway/default.nix
View file
Reviewed
···
3
3
4
4
term = "/run/current-system/sw/bin/alacritty";
5
5
6
6
+
waybarConfig = pkgs.writeText "waybar-config.json" (builtins.toJSON {
7
7
+
height = 30;
8
8
+
spacing = 4;
9
9
+
modules-left = [ "sway/workspaces" "sway/mode" "sway/scratchpad" ];
10
10
+
modules-center = [ "sway/window" ];
11
11
+
modules-right = [
12
12
+
"idle_inhibitor"
13
13
+
"pulseaudio"
14
14
+
"network"
15
15
+
"cpu"
16
16
+
"memory"
17
17
+
"temperature"
18
18
+
"backlight"
19
19
+
"battery"
20
20
+
"clock"
21
21
+
"tray"
22
22
+
];
23
23
+
24
24
+
"sway/mode".format = "<span style=\"italic\">{}</span>";
25
25
+
26
26
+
"sway/scratchpad" = {
27
27
+
format = "{icon} {count}";
28
28
+
show-empty = false;
29
29
+
format-icons = [ "" "" ];
30
30
+
tooltip = true;
31
31
+
tooltip-format = "{app}: {title}";
32
32
+
};
33
33
+
34
34
+
idle_inhibitor = {
35
35
+
format = "{icon}";
36
36
+
format-icons = {
37
37
+
activated = "";
38
38
+
deactivated = "";
39
39
+
};
40
40
+
};
41
41
+
42
42
+
tray.spacing = 10;
43
43
+
44
44
+
clock = {
45
45
+
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
46
46
+
format-alt = "{:%Y-%m-%d}";
47
47
+
};
48
48
+
49
49
+
cpu = {
50
50
+
format = "{usage}% ";
51
51
+
tooltip = false;
52
52
+
};
53
53
+
54
54
+
memory.format = "{}% ";
55
55
+
56
56
+
temperature = {
57
57
+
critical-threshold = 80;
58
58
+
format = "{temperatureC}°C {icon}";
59
59
+
format-icons = [ "" "" "" ];
60
60
+
};
61
61
+
62
62
+
backlight = {
63
63
+
format = "{percent}% {icon}";
64
64
+
format-icons = [ "" "" "" ];
65
65
+
};
66
66
+
67
67
+
battery = {
68
68
+
states = {
69
69
+
warning = 30;
70
70
+
critical = 15;
71
71
+
};
72
72
+
format = "{capacity}% {icon}";
73
73
+
format-full = "{capacity}% {icon}";
74
74
+
format-charging = "{capacity}% ";
75
75
+
format-plugged = "{capacity}% ";
76
76
+
format-alt = "{time} {icon}";
77
77
+
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
78
78
+
};
79
79
+
80
80
+
network = {
81
81
+
format-wifi = "{essid} ({signalStrength}%) ";
82
82
+
format-ethernet = "{ipaddr}/{cidr} ";
83
83
+
tooltip-format = "{ifname} via {gwaddr} ";
84
84
+
format-linked = "{ifname} (No IP) ";
85
85
+
format-disconnected = "Disconnected ";
86
86
+
format-alt = "{ifname}: {ipaddr}/{cidr}";
87
87
+
};
88
88
+
89
89
+
pulseaudio = {
90
90
+
format = "{volume}% {icon} {format_source}";
91
91
+
format-bluetooth = "{volume}% {icon} {format_source}";
92
92
+
format-bluetooth-muted = " {icon} {format_source}";
93
93
+
format-muted = " {format_source}";
94
94
+
format-source = "{volume}% ";
95
95
+
format-source-muted = "";
96
96
+
format-icons = {
97
97
+
headphone = "";
98
98
+
hands-free = "";
99
99
+
headset = "";
100
100
+
phone = "";
101
101
+
portable = "";
102
102
+
car = "";
103
103
+
default = [ "" "" "" ];
104
104
+
};
105
105
+
on-click = "pavucontrol";
106
106
+
};
107
107
+
});
108
108
+
109
109
+
waybarStyle = pkgs.writeText "waybar-style.css" ''
110
110
+
@import "${pkgs.waybar}/etc/xdg/waybar/style.css";
111
111
+
* {
112
112
+
font-family: "Iosevka Nerd Font", monospace;
113
113
+
}
114
114
+
'';
115
115
+
6
116
in
7
117
{
8
118
imports = [
···
174
284
#
175
285
# Status Bar:
176
286
#
177
177
-
# Read `man 5 sway-bar` for more information about this section.
178
178
-
bar {
179
179
-
position top
180
180
-
181
181
-
# When the status_command prints a new line to stdout, swaybar updates.
182
182
-
# The default just shows the current date and time.
183
183
-
status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done
184
184
-
185
185
-
colors {
186
186
-
statusline #ffffff
187
187
-
background #323232
188
188
-
inactive_workspace #32323200 #32323200 #5c5c5c
189
189
-
}
190
190
-
}
287
287
+
exec_always pkill waybar; exec ${pkgs.waybar}/bin/waybar -c ${waybarConfig} -s ${waybarStyle}
191
288
192
289
default_border pixel 1
193
290
default_floating_border none
···
229
326
bindsym XF86AudioMute exec ${pkgs.pulseaudio.out}/bin/pactl -- set-sink-mute @DEFAULT_SINK@ toggle
230
327
bindsym XF86AudioRaiseVolume exec ${pkgs.pulseaudio.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%
231
328
bindsym XF86AudioLowerVolume exec ${pkgs.pulseaudio.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ -4%
329
329
+
330
330
+
# brightness keys
331
331
+
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
332
332
+
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
232
333
233
334
# background programs
234
335
exec ydotoold