Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 1 | { ... }: { |
Skyler Turner | 7b93a37 | 2022-03-06 23:29:07 +0000 | [diff] [blame] | 2 | programs.waybar = { |
| 3 | enable = true; |
Skyler Turner | 730f642 | 2022-03-07 22:33:35 +0000 | [diff] [blame] | 4 | settings = [ |
| 5 | { |
Skyler Turner | 40e320f | 2022-03-07 22:50:39 +0000 | [diff] [blame] | 6 | modules-left = ["sway/workspaces"]; |
Skyler Turner | a8cc07a | 2022-03-07 22:09:09 +0000 | [diff] [blame] | 7 | |
Skyler Turner | 730f642 | 2022-03-07 22:33:35 +0000 | [diff] [blame] | 8 | modules-center = ["sway/window"]; |
Skyler Turner | a8cc07a | 2022-03-07 22:09:09 +0000 | [diff] [blame] | 9 | |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 10 | modules-right = ["backlight" "pulseaudio" "network" "battery" "clock" "custom/notification" "tray"]; |
Skyler Turner | f24e20c | 2022-03-07 22:34:57 +0000 | [diff] [blame] | 11 | |
| 12 | modules = { |
| 13 | battery.bat = "BAT0"; |
Skyler Turner | 217df84 | 2022-03-07 22:43:42 +0000 | [diff] [blame] | 14 | "sway/window" = { |
| 15 | max-length = 50; |
| 16 | }; |
Skyler Turner | f8edcb5 | 2022-03-07 22:52:47 +0000 | [diff] [blame] | 17 | clock = { |
| 18 | format = "{:%T}"; |
| 19 | interval = 1; |
| 20 | }; |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 21 | "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 Turner | f24e20c | 2022-03-07 22:34:57 +0000 | [diff] [blame] | 37 | }; |
Skyler Turner | 730f642 | 2022-03-07 22:33:35 +0000 | [diff] [blame] | 38 | } |
| 39 | ]; |
Skyler Turner | 0ac86a2 | 2022-03-07 20:58:14 +0000 | [diff] [blame] | 40 | style = '' |
| 41 | window#waybar { |
Skyler Turner | c61c930 | 2022-03-07 21:21:03 +0000 | [diff] [blame] | 42 | background: rgba(0, 0, 0, 0); |
Skyler Turner | eedfa63 | 2022-03-07 21:26:05 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 45 | #custom-notification { |
| 46 | font-family: "NotoSansMono Nerd Font"; |
| 47 | } |
| 48 | |
Skyler Turner | 3cc0965 | 2022-03-07 21:45:32 +0000 | [diff] [blame] | 49 | window#waybar * * * * { |
Skyler Turner | 500e68c | 2022-03-07 21:55:00 +0000 | [diff] [blame] | 50 | background: alpha(@theme_base_color, 0.6); |
Skyler Turner | eedfa63 | 2022-03-07 21:26:05 +0000 | [diff] [blame] | 51 | color: @theme_text_color; |
Skyler Turner | fd26509 | 2022-03-07 21:31:38 +0000 | [diff] [blame] | 52 | padding-left: 10px; |
| 53 | padding-right: 10px; |
Skyler Turner | 58712ec | 2022-03-07 21:30:52 +0000 | [diff] [blame] | 54 | border-radius: 5px; |
Skyler Turner | f367249 | 2022-03-07 22:36:10 +0000 | [diff] [blame] | 55 | margin: 10px 5px; |
Skyler Turner | 8e615b7 | 2022-03-07 23:03:24 +0000 | [diff] [blame] | 56 | transition: all 0.2s ease-in-out; |
Skyler Turner | 840e57d | 2022-03-08 10:19:04 +0000 | [diff] [blame] | 57 | transition: background 0s; |
Skyler Turner | e77c642 | 2022-03-07 21:43:01 +0000 | [diff] [blame] | 58 | } |
| 59 | |
Skyler Turner | 3cc0965 | 2022-03-07 21:45:32 +0000 | [diff] [blame] | 60 | window#waybar * * *:first-child * { |
Skyler Turner | e77c642 | 2022-03-07 21:43:01 +0000 | [diff] [blame] | 61 | margin-left: 10px; |
| 62 | } |
| 63 | |
Skyler Turner | 3cc0965 | 2022-03-07 21:45:32 +0000 | [diff] [blame] | 64 | window#waybar * * *:last-child * { |
Skyler Turner | e77c642 | 2022-03-07 21:43:01 +0000 | [diff] [blame] | 65 | margin-right: 10px; |
Skyler Turner | 0ac86a2 | 2022-03-07 20:58:14 +0000 | [diff] [blame] | 66 | } |
Skyler Turner | 6cfeaa2 | 2022-03-07 21:35:22 +0000 | [diff] [blame] | 67 | |
Skyler Turner | 3cc0965 | 2022-03-07 21:45:32 +0000 | [diff] [blame] | 68 | window#waybar * * * * * { |
Skyler Turner | 6cfeaa2 | 2022-03-07 21:35:22 +0000 | [diff] [blame] | 69 | margin: 0; |
Skyler Turner | b6746eb | 2022-03-07 21:53:50 +0000 | [diff] [blame] | 70 | background: rgba(0, 0, 0, 0); |
Skyler Turner | 6cfeaa2 | 2022-03-07 21:35:22 +0000 | [diff] [blame] | 71 | } |
Skyler Turner | 217df84 | 2022-03-07 22:43:42 +0000 | [diff] [blame] | 72 | |
Skyler Turner | a076a83 | 2022-03-09 09:42:54 +0000 | [diff] [blame] | 73 | /*window#waybar.solo,window#waybar.empty { |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 74 | background: alpha(@theme_base_color, 0.6); |
| 75 | } |
| 76 | |
| 77 | window#waybar.solo *,window#waybar.empty * { |
Skyler Turner | c1c9e8e | 2022-03-08 10:20:43 +0000 | [diff] [blame] | 78 | background: rgba(0, 0, 0, 0); |
Skyler Turner | a076a83 | 2022-03-09 09:42:54 +0000 | [diff] [blame] | 79 | }*/ |
Skyler Turner | de05876 | 2022-03-08 19:05:37 +0000 | [diff] [blame] | 80 | |
Skyler Turner | 044ffc0 | 2022-03-07 22:44:10 +0000 | [diff] [blame] | 81 | #window { |
Skyler Turner | 02e5d9f | 2022-03-07 22:45:08 +0000 | [diff] [blame] | 82 | min-width: 50em; |
Skyler Turner | 217df84 | 2022-03-07 22:43:42 +0000 | [diff] [blame] | 83 | } |
Skyler Turner | cce7ab2 | 2022-03-07 22:55:35 +0000 | [diff] [blame] | 84 | |
Skyler Turner | ce7e2f5 | 2022-03-13 12:30:13 +0000 | [diff] [blame] | 85 | window#waybar * * * #tray * { |
| 86 | padding: 0; |
| 87 | } |
| 88 | |
Skyler Turner | 43ce579 | 2022-03-14 21:16:37 +0000 | [diff] [blame] | 89 | 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 Turner | e68fd1b | 2022-03-13 12:23:15 +0000 | [diff] [blame] | 106 | window#waybar * * * #tray { |
| 107 | padding: 5px; |
| 108 | } |
| 109 | |
Skyler Turner | de05876 | 2022-03-08 19:05:37 +0000 | [diff] [blame] | 110 | window#waybar * * * #tray menu { |
Skyler Turner | 5551e9e | 2022-03-07 22:56:29 +0000 | [diff] [blame] | 111 | background: alpha(@theme_base_color, 0.8); |
Skyler Turner | cce7ab2 | 2022-03-07 22:55:35 +0000 | [diff] [blame] | 112 | color: @theme_text_color; |
Skyler Turner | 5551e9e | 2022-03-07 22:56:29 +0000 | [diff] [blame] | 113 | border: 0; |
Skyler Turner | cce7ab2 | 2022-03-07 22:55:35 +0000 | [diff] [blame] | 114 | } |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 115 | |
Skyler Turner | 191289d | 2022-03-07 23:07:24 +0000 | [diff] [blame] | 116 | #tray menu *:hover { |
| 117 | background: alpha(@theme_base_color, 1); |
| 118 | } |
| 119 | |
Skyler Turner | 68ecd91 | 2022-03-08 19:08:27 +0000 | [diff] [blame] | 120 | window#waybar #workspaces { |
Skyler Turner | de95171 | 2022-03-08 19:10:36 +0000 | [diff] [blame] | 121 | padding: 0; |
Skyler Turner | 68ecd91 | 2022-03-08 19:08:27 +0000 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | window#waybar #workspaces button { |
Skyler Turner | a870622 | 2022-03-07 23:04:27 +0000 | [diff] [blame] | 125 | border: 0; |
Skyler Turner | de95171 | 2022-03-08 19:10:36 +0000 | [diff] [blame] | 126 | margin: 0; |
Skyler Turner | b494198 | 2022-03-09 13:47:11 +0000 | [diff] [blame] | 127 | padding: 5px; |
Skyler Turner | a870622 | 2022-03-07 23:04:27 +0000 | [diff] [blame] | 128 | } |
| 129 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 130 | window#waybar #workspaces button.focused { |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 131 | background: alpha(@theme_base_color, 0.8); |
| 132 | } |
| 133 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 134 | window#waybar #workspaces button.focused:hover { |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 135 | background: alpha(@theme_base_color, 0.9); |
| 136 | } |
| 137 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 138 | window#waybar #workspaces button:hover { |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 139 | background: alpha(@theme_base_color, 0.7); |
| 140 | } |
| 141 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 142 | window#waybar #workspaces button.persistent { |
Skyler Turner | 3d9977b | 2022-03-07 23:23:14 +0000 | [diff] [blame] | 143 | background: alpha(#ffdf00, 0.5); |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 144 | } |
| 145 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 146 | window#waybar #workspaces button.urgent { |
Skyler Turner | db6c27c | 2022-03-07 23:02:44 +0000 | [diff] [blame] | 147 | background: alpha(red, 0.5); |
Skyler Turner | cb5d3b7 | 2022-03-07 23:00:23 +0000 | [diff] [blame] | 148 | } |
| 149 | |
Skyler Turner | 820f729 | 2022-03-08 10:13:26 +0000 | [diff] [blame] | 150 | window#waybar #workspaces button:active { |
Skyler Turner | 88b378d | 2022-03-07 23:05:09 +0000 | [diff] [blame] | 151 | background: alpha(@theme_base_color, 1); |
| 152 | } |
| 153 | |
Skyler Turner | 6d130c2 | 2022-03-08 19:25:49 +0000 | [diff] [blame] | 154 | #backlight, #pulseaudio, #network, #battery { |
Skyler Turner | 3ad3331 | 2022-03-08 19:27:05 +0000 | [diff] [blame] | 155 | min-width: 3em; |
Skyler Turner | 6d130c2 | 2022-03-08 19:25:49 +0000 | [diff] [blame] | 156 | } |
Skyler Turner | 61e4524 | 2022-05-14 13:49:02 +0100 | [diff] [blame] | 157 | |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 158 | window#waybar * .modules-right #custom-notification { |
Skyler Turner | 61e4524 | 2022-05-14 13:49:02 +0100 | [diff] [blame] | 159 | margin-right: 10px; |
| 160 | } |
| 161 | |
Skyler Turner | e81df7a | 2022-05-14 14:21:09 +0100 | [diff] [blame] | 162 | window#waybar * .modules-right #tray { |
Skyler Turner | 61e4524 | 2022-05-14 13:49:02 +0100 | [diff] [blame] | 163 | margin-left: 0px; |
Skyler Turner | 61e4524 | 2022-05-14 13:49:02 +0100 | [diff] [blame] | 164 | } |
Skyler Turner | 0ac86a2 | 2022-03-07 20:58:14 +0000 | [diff] [blame] | 165 | ''; |
Skyler Turner | 7b93a37 | 2022-03-06 23:29:07 +0000 | [diff] [blame] | 166 | |
| 167 | systemd = { |
| 168 | enable = true; |
Skyler Turner | 99c87b0 | 2022-03-06 23:30:23 +0000 | [diff] [blame] | 169 | # target = "sway-session.target"; |
Skyler Turner | 7b93a37 | 2022-03-06 23:29:07 +0000 | [diff] [blame] | 170 | }; |
| 171 | }; |
Skyler Turner | 650440c | 2022-03-07 00:20:56 +0000 | [diff] [blame] | 172 | |
Skyler Turner | 741201f | 2022-03-07 00:30:50 +0000 | [diff] [blame] | 173 | systemd.user.targets.sway.Unit.Wants = [ "waybar.service" ]; |
Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 174 | } |