Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 1 | { lib, pkgs, ... }: { |
| 2 | home = { |
| 3 | services.polybar = { |
| 4 | enable = true; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 5 | settings = (builtins.listToAttrs (map |
| 6 | (output: { |
| 7 | name = "bar/${output}"; |
| 8 | value = { |
| 9 | "inherit" = "docked base"; |
| 10 | monitor = output; |
| 11 | }; |
| 12 | }) |
| 13 | ([ "HDMI-A-1" "HDMI-A-1-0" ] ++ |
| 14 | (map (num: "DP-" + toString num) (lib.range 1 8)) |
| 15 | ))) // |
| 16 | { |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 17 | "bar/main" = { |
| 18 | "inherit" = "base"; |
Skyler Grey | 1eece6e | 2023-02-13 08:03:30 +0000 | [diff] [blame] | 19 | tray.position = "right"; |
| 20 | }; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 21 | docked = { |
Skyler Grey | 1eece6e | 2023-02-13 08:03:30 +0000 | [diff] [blame] | 22 | monitor-strict = false; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 23 | }; |
| 24 | base = { |
| 25 | modules = { |
| 26 | left = "xmonad"; |
| 27 | right = "date battery"; |
| 28 | }; |
| 29 | font = [ |
| 30 | "Liga Roboto Mono:style=Regular:size=10;2" |
| 31 | "Twitter Color Emoji:style=Regular:antialias=false:scale=8;1" |
| 32 | ]; |
| 33 | background = "\${colors.statusline}"; |
| 34 | padding = 10; |
| 35 | module.margin = 5; |
| 36 | margin.bottom = "\${root.padding}"; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 37 | }; |
| 38 | "module/xmonad" = { |
| 39 | type = "custom/script"; |
| 40 | exec = "${pkgs.xmonad-log}/bin/xmonad-log"; |
| 41 | tail = true; |
| 42 | }; |
| 43 | "module/date" = { |
| 44 | type = "internal/date"; |
| 45 | date = rec { |
| 46 | text = "%Y-%m-%d"; |
| 47 | alt = text; |
| 48 | }; |
| 49 | time = { |
| 50 | text = "%H:%M"; |
| 51 | alt = "%H:%M:%S"; |
| 52 | }; |
| 53 | label = "%date% %time%"; |
| 54 | }; |
Skyler Grey | ed5c5fc | 2023-02-26 13:00:06 +0000 | [diff] [blame] | 55 | "module/battery" = { |
| 56 | type = "internal/battery"; |
| 57 | battery = "BAT1"; |
| 58 | adapter = "ACAD"; |
| 59 | }; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 60 | colors = { |
| 61 | black = "#282c34"; |
| 62 | red = "#e06c75"; |
| 63 | green = "#98c379"; |
| 64 | yellow = "#e5c07b"; |
| 65 | blue = "#61afef"; |
| 66 | purple = "#c678dd"; |
| 67 | cyan = "#56b6c2"; |
| 68 | statusline = "#313640"; |
| 69 | lightgrey = "#474e5d"; |
| 70 | darkred = "#844C55"; |
| 71 | darkyellow = "#877658"; |
| 72 | darkgreen = "#607857"; |
| 73 | darkcyan = "#3F717B"; |
| 74 | darkblue = "#456E92"; |
| 75 | darkpurple = "#775289"; |
| 76 | white = "#dcdfe4"; |
| 77 | }; |
| 78 | }; |
| 79 | script = "polybar &"; |
Skyler Grey | 34021e3 | 2022-11-04 09:28:03 +0000 | [diff] [blame] | 80 | }; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 81 | systemd.user.services.polybar.Install.WantedBy = lib.mkForce [ ]; |
Skyler Grey | 34021e3 | 2022-11-04 09:28:03 +0000 | [diff] [blame] | 82 | }; |
| 83 | } |