{ pkgs, ... }: let colBg = "#282828"; colFg = "#ebdbb2"; colFgDimmed = "#928374"; colWarn = "#d79921"; in { home.packages = [ pkgs.firaCodeNerd ]; programs.waybar = { enable = true; settings = [{ layer = "top"; position = "top"; modules-left = [ "sway/workspaces" "sway/mode" ]; modules-center = [ "clock#time" "clock#date" ]; modules-right = [ "idle_inhibitor" "network" "battery" "tray" ]; modules = { "sway/workspaces" = { disable-scroll = true; all-outputs = true; }; "sway/mode" = { format = "{}"; }; "clock#time" = { interval = 1; format = "{:%T}"; tooltip = false; }; "clock#date" = { format = "{:%d.%m.%y}"; tooltip = false; }; "idle_inhibitor" = { format = "{icon}"; format-icons = { activated = " "; deactivated = " "; }; tooltip = false; }; "battery" = { states = { good = 95; warning = 30; critical = 15; }; format = "{icon} {capacity}%"; format-charging = " {capacity}%"; format-plugged = ""; design-capacity = true; format-icons = [ "" "" "" "" "" ]; tooltip = false; }; "network" = { format-wifi = "{essid} ({signalStrength}%)  "; format-ethernet = "{ifname}: {ipaddr}/{cidr}  "; format-linked = "{ifname} (No IP)  "; format-disconnected = "睊"; tooltip = false; interval = 5; }; }; }]; style = '' * { border: none; border-radius: 0; font-family: FiraCode Nerd Font; font-size: 11px; min-height: 20px; } window#waybar { background-color: ${colBg}; border-bottom: 1px solid #3c3836; color: ${colFg}; } window#waybar.hidden { opacity: 0.2; } /* window#waybar.empty { background-color: transparent; } window#waybar.solo { background-color: #FFFFFF; } */ #workspaces button { padding: 0 5px; background-color: transparent; color: #3c3836; font-weight: bolder; min-width: 20px; } #workspaces button:hover { background-color: #ebdbb2; background-image: none; color: #282828; } #workspaces button.urgent { background-color: #fb4934; } #workspaces button.current_output { color: #928374; } #workspaces button.visible { color: #282828; background-color: #3c3836; } #workspaces button.current_output.visible { color: #282828; background-color: #928374; } #workspaces button.current_output.focused { background-color: #ebdbb2; color: #282828; } #mode { background-color: #fe8019; color: ${colBg}; box-shadow: inset 0 -1px #d65d0e; } #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #mode, #mpd { padding: 0 10px; color: ${colFg}; } #idle_inhibitor { padding: 0px 10px 0px 13px; font-weight: bolder; } #idle_inhibitor.deactivated { color: ${colFgDimmed}; } #idle_inhibitor.activated { /* background-color: ${colWarn}; */ color: ${colWarn}; } #clock.time { font-weight: bolder; padding-right: 2px; } #clock.date { padding-left: 2px; } #window, #workspaces { margin: 0 4px; } /* If workspaces is the leftmost module, omit left margin */ .modules-left > widget:first-child > #workspaces { margin-left: 0; } /* If workspaces is the rightmost module, omit right margin */ .modules-right > widget:last-child > #workspaces { margin-right: 0; } #battery { background-color: transparent; } #battery.warning:not(.charging) { background-color: #fe8019; color: ${colBg}; } #battery.critical:not(.charging) { background-color: #fb4934; color: ${colBg}; } label:focus { background-color: #000000; } #cpu.high { background-color: #2ecc71; color: #000000; } #memory { background-color: #9b59b6; } #backlight { background-color: #90b1b1; } #pulseaudio { background-color: #f1c40f; color: #000000; } #pulseaudio.muted { background-color: #90b1b1; color: #2a5c45; } #custom-media { background-color: #66cc99; color: #2a5c45; min-width: 100px; } #custom-media.custom-spotify { background-color: #66cc99; } #custom-media.custom-vlc { background-color: #ffa000; } #temperature { background-color: #f0932b; } #temperature.critical { background-color: #eb4d4b; } #tray { padding: 0 3px; background-color: transparent; border-left: 1px solid #3c3836; } #tray menu { background-color: ${colBg}; color: ${colFg}; border: 1px solid ${colFg}; padding: 0; margin: 10px; font-weight: bold; } #tray menu menuitem { border-bottom: 1px solid #3c3836; } #tray menu menuitem:last-child { border-bottom: none; } #tray menu menuitem:hover { background-color: ${colFg}; color: ${colBg}; } #mpd { background-color: #66cc99; color: #2a5c45; } #mpd.disconnected { background-color: #f53c3c; } #mpd.stopped { background-color: #90b1b1; } #mpd.paused { background-color: #51a37a; } #language { background: #00b093; color: #740864; padding: 0 5px; margin: 0 5px; min-width: 16px; } ''; }; }