blob: c67beea574b48bb1a77ee1027aa57eaefd406022 [file] [log] [blame]
Skyler Turnerdb486c92022-03-06 10:48:24 +00001{ ... }: {
Skyler Turner7b93a372022-03-06 23:29:07 +00002 programs.waybar = {
3 enable = true;
Skyler Turner730f6422022-03-07 22:33:35 +00004 settings = [
5 {
Skyler Turner40e320f2022-03-07 22:50:39 +00006 modules-left = ["sway/workspaces"];
Skyler Turnera8cc07a2022-03-07 22:09:09 +00007
Skyler Turner730f6422022-03-07 22:33:35 +00008 modules-center = ["sway/window"];
Skyler Turnera8cc07a2022-03-07 22:09:09 +00009
Skyler Greyf8cca8f2022-05-24 20:17:21 +010010 modules-right = ["backlight" "pulseaudio" "network" "battery" "clock" "custom/notification" "tray"];
Skyler Turnerf24e20c2022-03-07 22:34:57 +000011
12 modules = {
13 battery.bat = "BAT0";
Skyler Turner217df842022-03-07 22:43:42 +000014 "sway/window" = {
15 max-length = 50;
16 };
Skyler Turnerf8edcb52022-03-07 22:52:47 +000017 clock = {
18 format = "{:%T}";
19 interval = 1;
20 };
Skyler Greyf8cca8f2022-05-24 20:17:21 +010021 "custom/notification" = {
22 tooltip = false;
23 format = "{icon}";
24 format-icons = {
25 notification = "<span foreground='red'><sup></sup></span>";
26 none = "";
27 dnd-notification = "<span foreground='red'><sup></sup></span>";
28 dnd-none = "";
29 };
30 "return-type" = "json";
31 "exec-if" = "which swaync-client";
32 "exec" = "swaync-client -swb";
33 on-click = "swaync-client -t -sw";
34 on-click-right = "swaync-client -d -sw";
35 escape = true;
36 };
Skyler Turnerf24e20c2022-03-07 22:34:57 +000037 };
Skyler Turner730f6422022-03-07 22:33:35 +000038 }
39 ];
Skyler Turner0ac86a22022-03-07 20:58:14 +000040 style = ''
41 window#waybar {
Skyler Turnerc61c9302022-03-07 21:21:03 +000042 background: rgba(0, 0, 0, 0);
Skyler Turnereedfa632022-03-07 21:26:05 +000043 }
44
Skyler Greyf8cca8f2022-05-24 20:17:21 +010045 #custom-notification {
46 font-family: "NotoSansMono Nerd Font";
47 }
48
Skyler Turner3cc09652022-03-07 21:45:32 +000049 window#waybar * * * * {
Skyler Turner500e68c2022-03-07 21:55:00 +000050 background: alpha(@theme_base_color, 0.6);
Skyler Turnereedfa632022-03-07 21:26:05 +000051 color: @theme_text_color;
Skyler Turnerfd265092022-03-07 21:31:38 +000052 padding-left: 10px;
53 padding-right: 10px;
Skyler Turner58712ec2022-03-07 21:30:52 +000054 border-radius: 5px;
Skyler Turnerf3672492022-03-07 22:36:10 +000055 margin: 10px 5px;
Skyler Turner8e615b72022-03-07 23:03:24 +000056 transition: all 0.2s ease-in-out;
Skyler Turner840e57d2022-03-08 10:19:04 +000057 transition: background 0s;
Skyler Turnere77c6422022-03-07 21:43:01 +000058 }
59
Skyler Turner3cc09652022-03-07 21:45:32 +000060 window#waybar * * *:first-child * {
Skyler Turnere77c6422022-03-07 21:43:01 +000061 margin-left: 10px;
62 }
63
Skyler Turner3cc09652022-03-07 21:45:32 +000064 window#waybar * * *:last-child * {
Skyler Turnere77c6422022-03-07 21:43:01 +000065 margin-right: 10px;
Skyler Turner0ac86a22022-03-07 20:58:14 +000066 }
Skyler Turner6cfeaa22022-03-07 21:35:22 +000067
Skyler Turner3cc09652022-03-07 21:45:32 +000068 window#waybar * * * * * {
Skyler Turner6cfeaa22022-03-07 21:35:22 +000069 margin: 0;
Skyler Turnerb6746eb2022-03-07 21:53:50 +000070 background: rgba(0, 0, 0, 0);
Skyler Turner6cfeaa22022-03-07 21:35:22 +000071 }
Skyler Turner217df842022-03-07 22:43:42 +000072
Skyler Turnera076a832022-03-09 09:42:54 +000073 /*window#waybar.solo,window#waybar.empty {
Skyler Turner820f7292022-03-08 10:13:26 +000074 background: alpha(@theme_base_color, 0.6);
75 }
76
77 window#waybar.solo *,window#waybar.empty * {
Skyler Turnerc1c9e8e2022-03-08 10:20:43 +000078 background: rgba(0, 0, 0, 0);
Skyler Turnera076a832022-03-09 09:42:54 +000079 }*/
Skyler Turnerde058762022-03-08 19:05:37 +000080
Skyler Turner044ffc02022-03-07 22:44:10 +000081 #window {
Skyler Turner02e5d9f2022-03-07 22:45:08 +000082 min-width: 50em;
Skyler Turner217df842022-03-07 22:43:42 +000083 }
Skyler Turnercce7ab22022-03-07 22:55:35 +000084
Skyler Turnerce7e2f52022-03-13 12:30:13 +000085 window#waybar * * * #tray * {
86 padding: 0;
87 }
88
Skyler Turner43ce5792022-03-14 21:16:37 +000089 window#waybar * * * #tray menu *:first-child {
90 margin-top: 5px;
91 }
92
93 window#waybar * * * #tray menu *:last-child {
94 margin-bottom: 5px;
95 }
96
97 window#waybar * * * #tray menu * {
98 margin-left: 5px;
99 margin-right: 5px;
100 }
101
102 window#waybar * * * #tray menu * * {
103 margin: 5px;
104 }
105
Skyler Turnere68fd1b2022-03-13 12:23:15 +0000106 window#waybar * * * #tray {
107 padding: 5px;
108 }
109
Skyler Turnerde058762022-03-08 19:05:37 +0000110 window#waybar * * * #tray menu {
Skyler Turner5551e9e2022-03-07 22:56:29 +0000111 background: alpha(@theme_base_color, 0.8);
Skyler Turnercce7ab22022-03-07 22:55:35 +0000112 color: @theme_text_color;
Skyler Turner5551e9e2022-03-07 22:56:29 +0000113 border: 0;
Skyler Turnercce7ab22022-03-07 22:55:35 +0000114 }
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000115
Skyler Turner191289d2022-03-07 23:07:24 +0000116 #tray menu *:hover {
117 background: alpha(@theme_base_color, 1);
118 }
119
Skyler Turner68ecd912022-03-08 19:08:27 +0000120 window#waybar #workspaces {
Skyler Turnerde951712022-03-08 19:10:36 +0000121 padding: 0;
Skyler Turner68ecd912022-03-08 19:08:27 +0000122 }
123
124 window#waybar #workspaces button {
Skyler Turnera8706222022-03-07 23:04:27 +0000125 border: 0;
Skyler Turnerde951712022-03-08 19:10:36 +0000126 margin: 0;
Skyler Turnerb4941982022-03-09 13:47:11 +0000127 padding: 5px;
Skyler Turnera8706222022-03-07 23:04:27 +0000128 }
129
Skyler Turner820f7292022-03-08 10:13:26 +0000130 window#waybar #workspaces button.focused {
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000131 background: alpha(@theme_base_color, 0.8);
132 }
133
Skyler Turner820f7292022-03-08 10:13:26 +0000134 window#waybar #workspaces button.focused:hover {
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000135 background: alpha(@theme_base_color, 0.9);
136 }
137
Skyler Turner820f7292022-03-08 10:13:26 +0000138 window#waybar #workspaces button:hover {
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000139 background: alpha(@theme_base_color, 0.7);
140 }
141
Skyler Turner820f7292022-03-08 10:13:26 +0000142 window#waybar #workspaces button.persistent {
Skyler Turner3d9977b2022-03-07 23:23:14 +0000143 background: alpha(#ffdf00, 0.5);
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000144 }
145
Skyler Turner820f7292022-03-08 10:13:26 +0000146 window#waybar #workspaces button.urgent {
Skyler Turnerdb6c27c2022-03-07 23:02:44 +0000147 background: alpha(red, 0.5);
Skyler Turnercb5d3b72022-03-07 23:00:23 +0000148 }
149
Skyler Turner820f7292022-03-08 10:13:26 +0000150 window#waybar #workspaces button:active {
Skyler Turner88b378d2022-03-07 23:05:09 +0000151 background: alpha(@theme_base_color, 1);
152 }
153
Skyler Turner6d130c22022-03-08 19:25:49 +0000154 #backlight, #pulseaudio, #network, #battery {
Skyler Turner3ad33312022-03-08 19:27:05 +0000155 min-width: 3em;
Skyler Turner6d130c22022-03-08 19:25:49 +0000156 }
Skyler Turner61e45242022-05-14 13:49:02 +0100157
Skyler Greyf8cca8f2022-05-24 20:17:21 +0100158 window#waybar * .modules-right #custom-notification {
Skyler Turner61e45242022-05-14 13:49:02 +0100159 margin-right: 10px;
160 }
161
Skyler Turnere81df7a2022-05-14 14:21:09 +0100162 window#waybar * .modules-right #tray {
Skyler Turner61e45242022-05-14 13:49:02 +0100163 margin-left: 0px;
Skyler Turner61e45242022-05-14 13:49:02 +0100164 }
Skyler Turner0ac86a22022-03-07 20:58:14 +0000165 '';
Skyler Turner7b93a372022-03-06 23:29:07 +0000166
Skyler Greybf9a1b22022-05-25 21:24:27 +0100167 # systemd = {
168 # enable = true; ## Now started in sway.nix
169 # # target = "sway-session.target";
170 #};
Skyler Turner7b93a372022-03-06 23:29:07 +0000171 };
Skyler Turner650440c2022-03-07 00:20:56 +0000172
Skyler Turner741201f2022-03-07 00:30:50 +0000173 systemd.user.targets.sway.Unit.Wants = [ "waybar.service" ];
Skyler Turnerdb486c92022-03-06 10:48:24 +0000174}