diff options
author | sils <sils@sils.li> | 2023-09-11 19:23:15 +0200 |
---|---|---|
committer | sils <sils@sils.li> | 2023-09-11 19:23:15 +0200 |
commit | 9bacd50b07fa7473685bef97a4baec48e5166cf2 (patch) | |
tree | c3c995da669294d35a32b301d2273f4dbea4b88f /users | |
parent | build(flake): update (diff) | |
download | nix-config-9bacd50b07fa7473685bef97a4baec48e5166cf2.tar.gz nix-config-9bacd50b07fa7473685bef97a4baec48e5166cf2.zip |
feat(u/sils/waybar): change complete config and style
This is taken from somebody else, I should probably credit their work....
Diffstat (limited to '')
-rw-r--r-- | users/sils/waybar/default.nix | 115 | ||||
-rw-r--r-- | users/sils/waybar/style.css | 318 |
2 files changed, 165 insertions, 268 deletions
diff --git a/users/sils/waybar/default.nix b/users/sils/waybar/default.nix index cafe20a..29f1ca5 100644 --- a/users/sils/waybar/default.nix +++ b/users/sils/waybar/default.nix @@ -1,45 +1,84 @@ {pkgs, ...}: { programs.waybar = { enable = true; - package = pkgs.waybar; - settings = [ - { - mainBar = { - layer = "top"; - position = "top"; - output = [ - "eDP-1" - "DP-2" - ]; - }; - modules-left = [ - "wlr/workspaces" - "hyprland/submap" - "wlr/taskbar" - ]; - modules-center = [ - "hyprland/window" - ]; - modules-right = [ - "idle_inhibitor" - "memory" - "cpu" - "battery" - "clock" - ]; + settings = { + mainBar = { + layer = "top"; + position = "top"; + modules-left = ["wlr/workspaces"]; + modules-center = []; + modules-right = ["pulseaudio" "network" "backlight" "battery" "clock" "tray" "custom/power"]; + "wlr/workspaces" = { - "format" = "{icon}"; - "on-scroll-up" = "${pkgs.hyprland}/bin/hyprctl dispatch workspace e+1"; - "on-scroll-down" = "${pkgs.hyprland}/bin/hyprctl dispatch workspace e-1"; - "on-click" = "activate"; - }; - "clock" = { - "timezone" = "Europe/Berlin"; - "tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; - "format-alt" = "{:%Y-%m-%d}"; - }; - } - ]; + disable-scroll = true; + sort-by-name = true; + format = "{icon}"; + format-icons = {default = "";}; + }; + + pulseaudio = { + format = " {icon} "; + format-muted = "ﱝ"; + format-icons = ["奄" "奔" "墳"]; + tooltip = true; + tooltip-format = "{volume}%"; + }; + + network = { + format-wifi = " "; + format-disconnected = "睊"; + format-ethernet = " "; + tooltip = true; + tooltip-format = "{signalStrength}%"; + }; + + backlight = { + device = "intel_backlight"; + format = "{icon}"; + format-icons = ["" "" "" "" "" "" "" "" ""]; + tooltip = true; + tooltip-format = "{percent}%"; + }; + + battery = { + states = { + warning = 30; + critical = 15; + }; + format = "{icon}"; + format-charging = ""; + format-plugged = ""; + format-icons = ["" "" "" "" "" "" "" "" "" "" "" ""]; + tooltip = true; + tooltip-format = "{capacity}%"; + }; + + "custom/power" = { + tooltip = false; + on-click = "powermenu"; + format = "襤"; + }; + + clock = { + tooltip-format = '' + <big>{:%Y %B}</big> + <tt><small>{calendar}</small></tt>''; + format-alt = '' + {:%d + %m + %Y}''; + format = '' + {:%H + %M}''; + }; + + tray = { + icon-size = 21; + spacing = 10; + }; + }; + }; + style = ./style.css; systemd = { enable = true; diff --git a/users/sils/waybar/style.css b/users/sils/waybar/style.css index 7cf5539..4fcb40e 100644 --- a/users/sils/waybar/style.css +++ b/users/sils/waybar/style.css @@ -1,281 +1,139 @@ -* { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; - font-size: 13px; -} - -window#waybar { - background-color: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; -} - -window#waybar.hidden { - opacity: 0.2; -} - /* -window#waybar.empty { - background-color: transparent; -} -window#waybar.solo { - background-color: #FFFFFF; -} +* +* Catppuccin Mocha palette +* Maintainer: rubyowo +* */ -window#waybar.termite { - background-color: #3F3F3F; -} +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; + +@define-color text #cdd6f4; +@define-color subtext0 #a6adc8; +@define-color subtext1 #bac2de; + +@define-color surface0 #313244; +@define-color surface1 #45475a; +@define-color surface2 #585b70; + +@define-color overlay0 #6c7086; +@define-color overlay1 #7f849c; +@define-color overlay2 #9399b2; + +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color sapphire #74c7ec; +@define-color sky #89dceb; +@define-color teal #94e2d5; +@define-color green #a6e3a1; +@define-color yellow #f9e2af; +@define-color peach #fab387; +@define-color maroon #eba0ac; +@define-color red #f38ba8; +@define-color mauve #cba6f7; +@define-color pink #f5c2e7; +@define-color flamingo #f2cdcd; +@define-color rosewater #f5e0dc; -window#waybar.chromium { - background-color: #000000; - border: none; +* { + font-family: FantasqueSansMono Nerd Font; + font-size: 10px; + min-height: 0; } -button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px transparent; - /* Avoid rounded borders under each button name */ - border: none; - border-radius: 0; +window#waybar { + background: transparent; } -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ -button:hover { - background: inherit; - box-shadow: inset 0 -3px #ffffff; +#workspaces { + border-radius: 1rem; + background-color: @surface0; + margin-top: 1rem; + margin: 7px 3px 0px 7px; } #workspaces button { - padding: 0 5px; - background-color: transparent; - color: #ffffff; -} - -#workspaces button:hover { - background: rgba(0, 0, 0, 0.2); -} - -#workspaces button.focused { - background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; + color: @pink; + border-radius: 1rem; + padding-left: 6px; + margin: 5px 0; + box-shadow: inset 0 -3px transparent; + transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.68); + background-color: transparent; } -#workspaces button.urgent { - background-color: #eb4d4b; +#workspaces button.active { + color: @flamingo; + border-radius: 1rem; } -#mode { - background-color: #64727D; - border-bottom: 3px solid #ffffff; +#workspaces button:hover { + color: @rosewater; + border-radius: 1rem; } +#tray, +#network, +#backlight, #clock, #battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#network, #pulseaudio, -#wireplumber, -#custom-media, -#tray, -#mode, -#idle_inhibitor, -#scratchpad, -#mpd { - padding: 0 10px; - color: #ffffff; -} - -#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; +#custom-lock, +#custom-power { + background-color: @surface0; + margin: 7px 3px 0px 7px; + padding: 10px 5px 10px 5px; + border-radius: 1rem; } #clock { - background-color: #64727D; + color: @lavender; } #battery { - background-color: #ffffff; - color: #000000; -} - -#battery.charging, #battery.plugged { - color: #ffffff; - background-color: #26A65B; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} - -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -label:focus { - background-color: #000000; -} - -#cpu { - background-color: #2ecc71; - color: #000000; -} - -#memory { - background-color: #9b59b6; + color: @green; } -#disk { - background-color: #964B00; +#battery.charging { + color: @green; } -#backlight { - background-color: #90b1b1; +#battery.warning:not(.charging) { + color: @red; } #network { - background-color: #2980b9; + color: @flamingo; } -#network.disconnected { - background-color: #f53c3c; +#backlight { + color: @yellow; } #pulseaudio { - background-color: #f1c40f; - color: #000000; + color: @pink; } #pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; -} - -#wireplumber { - background-color: #fff0f5; - color: #000000; -} - -#wireplumber.muted { - background-color: #f53c3c; -} - -#custom-media { - background-color: #66cc99; - color: #2a5c45; - min-width: 100px; + color: @red; } -#custom-media.custom-spotify { - background-color: #66cc99; -} - -#custom-media.custom-vlc { - background-color: #ffa000; -} - -#temperature { - background-color: #f0932b; -} - -#temperature.critical { - background-color: #eb4d4b; +#custom-power { + border-radius: 1rem; + color: @red; + margin-bottom: 1rem; } #tray { - background-color: #2980b9; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; + border-radius: 1rem; } -#idle_inhibitor { - background-color: #2d3436; +tooltip { + background: @base; + border: 1px solid @pink; } -#idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; +tooltip label { + color: @text; } - -#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; -} - -#keyboard-state { - background: #97e1ad; - color: #000000; - padding: 0 0px; - margin: 0 5px; - min-width: 16px; -} - -#keyboard-state > label { - padding: 0 5px; -} - -#keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); -} - -#scratchpad { - background: rgba(0, 0, 0, 0.2); -} - -#scratchpad.empty { - background-color: transparent; -} - |