| ... | @@ -1,6 +1,176 @@ | ... | @@ -1,6 +1,176 @@ |
| 1 | { ... }: | 1 | { ... }: |
| | 2 | let |
| | 3 | custom = { |
| | 4 | font = "Maple Mono"; |
| | 5 | font_size = "18px"; |
| | 6 | font_weight = "bold"; |
| | 7 | text_color = "#FBF1C7"; |
| | 8 | background_0 = "#1D2021"; |
| | 9 | background_1 = "#282828"; |
| | 10 | border_color = "#928374"; |
| | 11 | red = "#CC241D"; |
| | 12 | green = "#98971A"; |
| | 13 | yellow = "#FABD2F"; |
| | 14 | blue = "#458588"; |
| | 15 | magenta = "#B16286"; |
| | 16 | cyan = "#689D6A"; |
| | 17 | orange = "#D65D0E"; |
| | 18 | opacity = "1"; |
| | 19 | indicator_height = "2px"; |
| | 20 | }; |
| | 21 | in |
| 2 | { | 22 | { |
| 3 | programs.waybar.settings.mainBar = { | 23 | programs.waybar.settings.mainBar = with custom; { |
| 4 | | 24 | position = "top"; |
| | 25 | height = 28; |
| | 26 | margin-top = 0; |
| | 27 | margin-bottom = 0; |
| | 28 | margin-left = 0; |
| | 29 | margin-right = 0; |
| | 30 | modules-left = [ |
| | 31 | "custom/launcher" |
| | 32 | "hyprland/workspaces" |
| | 33 | "tray" |
| | 34 | ]; |
| | 35 | modules-center = [ "clock" ]; |
| | 36 | modules-right = [ |
| | 37 | "cpu" |
| | 38 | "memory" |
| | 39 | "pulseaudio" |
| | 40 | "network" |
| | 41 | "battery" |
| | 42 | "hyprland/language" |
| | 43 | "custom/notification" |
| | 44 | "custom/power-menu" |
| | 45 | ]; |
| | 46 | clock = { |
| | 47 | calendar = { |
| | 48 | format = { |
| | 49 | today = "<span color='#98971A'><b>{}</b></span>"; |
| | 50 | }; |
| | 51 | }; |
| | 52 | format = " {:%H:%M}"; |
| | 53 | tooltip = "true"; |
| | 54 | tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; |
| | 55 | format-alt = " {:%d/%m}"; |
| | 56 | }; |
| | 57 | "hyprland/workspaces" = { |
| | 58 | active-only = false; |
| | 59 | disable-scroll = true; |
| | 60 | format = "{icon}"; |
| | 61 | on-click = "activate"; |
| | 62 | format-icons = { |
| | 63 | sort-by-number = true; |
| | 64 | }; |
| | 65 | persistent-workspaces = { |
| | 66 | "1" = [ ]; |
| | 67 | "2" = [ ]; |
| | 68 | "3" = [ ]; |
| | 69 | "4" = [ ]; |
| | 70 | "5" = [ ]; |
| | 71 | }; |
| | 72 | }; |
| | 73 | cpu = { |
| | 74 | format = "<span foreground='${green}'> </span> {usage}%"; |
| | 75 | format-alt = "<span foreground='${green}'> </span> {avg_frequency} GHz"; |
| | 76 | interval = 2; |
| | 77 | on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; |
| | 78 | }; |
| | 79 | memory = { |
| | 80 | format = "<span foreground='${cyan}'> </span>{}%"; |
| | 81 | format-alt = "<span foreground='${cyan}'> </span>{used} GiB"; # |
| | 82 | interval = 2; |
| | 83 | on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; |
| | 84 | }; |
| | 85 | disk = { |
| | 86 | # path = "/"; |
| | 87 | format = "<span foreground='${orange}'> </span>{percentage_used}%"; |
| | 88 | interval = 60; |
| | 89 | on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; |
| | 90 | }; |
| | 91 | network = { |
| | 92 | format-wifi = "<span foreground='${magenta}'> </span> {signalStrength}%"; |
| | 93 | format-ethernet = "<span foreground='${magenta}'> </span>"; |
| | 94 | tooltip-format = "Connected to {essid} {ifname} via {gwaddr}"; |
| | 95 | format-linked = "{ifname} (No IP)"; |
| | 96 | format-disconnected = "<span foreground='${magenta}'> </span>"; |
| | 97 | }; |
| | 98 | tray = { |
| | 99 | icon-size = 20; |
| | 100 | spacing = 8; |
| | 101 | }; |
| | 102 | pulseaudio = { |
| | 103 | format = "{icon} {volume}%"; |
| | 104 | format-muted = "<span foreground='${blue}'> </span> {volume}%"; |
| | 105 | format-icons = { |
| | 106 | default = [ "<span foreground='${blue}'> </span>" ]; |
| | 107 | }; |
| | 108 | scroll-step = 2; |
| | 109 | on-click = "${pkgs.pamixer}/bin/pamixer -t"; |
| | 110 | on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol"; |
| | 111 | }; |
| | 112 | # battery = { |
| | 113 | # format = "<span foreground='${yellow}'>{icon}</span> {capacity}%"; |
| | 114 | # format-icons = [ |
| | 115 | # " " |
| | 116 | # " " |
| | 117 | # " " |
| | 118 | # " " |
| | 119 | # " " |
| | 120 | # ]; |
| | 121 | # format-charging = "<span foreground='${yellow}'> </span>{capacity}%"; |
| | 122 | # format-full = "<span foreground='${yellow}'> </span>{capacity}%"; |
| | 123 | # format-warning = "<span foreground='${yellow}'> </span>{capacity}%"; |
| | 124 | # interval = 5; |
| | 125 | # states = { |
| | 126 | # warning = 20; |
| | 127 | # }; |
| | 128 | # format-time = "{H}h{M}m"; |
| | 129 | # tooltip = true; |
| | 130 | # tooltip-format = "{time}"; |
| | 131 | # }; |
| | 132 | "hyprland/language" = { |
| | 133 | tooltip = true; |
| | 134 | tooltip-format = "Keyboard layout"; |
| | 135 | format = "<span foreground='#FABD2F'> </span> {}"; |
| | 136 | format-fr = "FR"; |
| | 137 | format-en = "US"; |
| | 138 | on-click = "${pkgs.hyprland}/bin/hyprctl switchxkblayout at-translated-set-2-keyboard next"; |
| | 139 | }; |
| | 140 | "custom/launcher" = { |
| | 141 | format = ""; |
| | 142 | on-click = "random-wallpaper"; |
| | 143 | on-click-right = "${pkgs.rofi}/bin/rofi -show drun"; |
| | 144 | tooltip = "true"; |
| | 145 | tooltip-format = "Random Wallpaper"; |
| | 146 | }; |
| | 147 | "custom/notification" = { |
| | 148 | tooltip = true; |
| | 149 | tooltip-format = "Notifications"; |
| | 150 | format = "{icon}"; |
| | 151 | format-icons = { |
| | 152 | notification = "<span foreground='red'><sup></sup></span>"; |
| | 153 | none = ""; |
| | 154 | dnd-notification = "<span foreground='red'><sup></sup></span>"; |
| | 155 | dnd-none = ""; |
| | 156 | inhibited-notification = "<span foreground='red'><sup></sup></span>"; |
| | 157 | inhibited-none = ""; |
| | 158 | dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>"; |
| | 159 | dnd-inhibited-none = ""; |
| | 160 | }; |
| | 161 | return-type = "json"; |
| | 162 | exec-if = "which swaync-client"; |
| | 163 | exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb"; |
| | 164 | on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; |
| | 165 | on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"; |
| | 166 | escape = true; |
| | 167 | }; |
| | 168 | "custom/power-menu" = { |
| | 169 | tooltip = true; |
| | 170 | tooltip-format = "Power menu"; |
| | 171 | format = "<span foreground='${red}'> </span>"; |
| | 172 | on-click = "power-menu"; |
| | 173 | }; |
| 5 | }; | 174 | }; |
| | 175 | |
| 6 | } | 176 | } |