From dc6aee448195d32ff9398f5365fd83d8697e0ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Tue, 7 May 2024 17:59:48 +0200 Subject: [PATCH] Home Gen231 @ 2024-05-07-17:59 --- home/jonas/waybar/config.nix | 310 +++++++++++++++++++++++------------ 1 file changed, 203 insertions(+), 107 deletions(-) diff --git a/home/jonas/waybar/config.nix b/home/jonas/waybar/config.nix index 6ef9c4e..0016027 100644 --- a/home/jonas/waybar/config.nix +++ b/home/jonas/waybar/config.nix @@ -17,116 +17,212 @@ in { }; }; - programs.waybar.settings.mainBar = lib.mkIf for_hyprland { - position = "top"; - layer = "top"; - height = 5; - margin-top = 0; - margin-bottom = 0; - margin-left = 0; - margin-right = 0; - modules-left = [ - "custom/launcher" - "hyprland/workspaces" - ]; - modules-center = [ - "hyprland/window" - ]; - modules-right = [ - "clock" - "cpu" - "memory" - "disk" - "battery" - "network" - "tray" - ]; - clock = { - calendar = { - format = {today = "{}";}; + programs.waybar = lib.mkIf for_hyprland { + settings.mainBar = { + position = "top"; + layer = "top"; + height = 5; + margin-top = 0; + margin-bottom = 0; + margin-left = 0; + margin-right = 0; + modules-left = [ + "custom/launcher" + "hyprland/workspaces" + ]; + modules-center = [ + "hyprland/window" + ]; + modules-right = [ + "clock" + "cpu" + "memory" + "disk" + "battery" + "network" + "tray" + ]; + clock = { + calendar = { + format = {today = "{}";}; + }; + format = " {:%H:%M}"; + tooltip = "true"; + tooltip-format = "{:%Y %B}\n{calendar}"; + format-alt = " {:%d/%m}"; }; - format = " {:%H:%M}"; - tooltip = "true"; - tooltip-format = "{:%Y %B}\n{calendar}"; - format-alt = " {:%d/%m}"; - }; - "hyprland/workspaces" = { - active-only = false; - disable-scroll = true; - format = "{icon}"; - on-click = "activate"; - format-icons = { - "1" = "󰈹"; - "2" = ""; - "3" = "󰘙"; - "4" = "󰙯"; - "5" = ""; - "6" = ""; - urgent = ""; - default = ""; - sort-by-number = true; + "hyprland/workspaces" = { + active-only = false; + disable-scroll = true; + format = "{icon}"; + on-click = "activate"; + format-icons = { + "1" = "󰈹"; + "2" = ""; + "3" = "󰘙"; + "4" = "󰙯"; + "5" = ""; + "6" = ""; + urgent = ""; + default = ""; + sort-by-number = true; + }; + persistent-workspaces = { + "1" = []; + "2" = []; + "3" = []; + "4" = []; + "5" = []; + }; }; - persistent-workspaces = { - "1" = []; - "2" = []; - "3" = []; - "4" = []; - "5" = []; + memory = { + format = "󰟜 {}%"; + format-alt = "󰟜 {used} GiB"; #  + interval = 2; + }; + cpu = { + format = " {usage}%"; + format-alt = " {avg_frequency} GHz"; + interval = 2; + }; + disk = { + # path = "/"; + format = "󰋊 {percentage_used}%"; + interval = 60; + }; + network = { + format-wifi = " {signalStrength}%"; + format-ethernet = "󰀂 "; + tooltip-format = "Connected to {essid} {ifname} via {gwaddr}"; + format-linked = "{ifname} (No IP)"; + format-disconnected = "󰖪 "; + }; + tray = { + icon-size = 20; + spacing = 8; + }; + pulseaudio = { + format = "{icon} {volume}%"; + format-muted = "󰖁 {volume}%"; + format-icons = { + default = [" "]; + }; + scroll-step = 5; + on-click = "pamixer -t"; + }; + battery = { + format = "{icon} {capacity}%"; + format-icons = [" " " " " " " " " "]; + format-charging = " {capacity}%"; + format-full = " {capacity}%"; + format-warning = " {capacity}%"; + interval = 5; + states = { + warning = 20; + }; + format-time = "{H}h{M}m"; + tooltip = true; + tooltip-format = "{time}"; + }; + "custom/launcher" = { + format = ""; + on-click = "${pkgs.wofi}/bin/wofi --show drun"; + tooltip = "false"; }; }; - memory = { - format = "󰟜 {}%"; - format-alt = "󰟜 {used} GiB"; #  - interval = 2; - }; - cpu = { - format = " {usage}%"; - format-alt = " {avg_frequency} GHz"; - interval = 2; - }; - disk = { - # path = "/"; - format = "󰋊 {percentage_used}%"; - interval = 60; - }; - network = { - format-wifi = " {signalStrength}%"; - format-ethernet = "󰀂 "; - tooltip-format = "Connected to {essid} {ifname} via {gwaddr}"; - format-linked = "{ifname} (No IP)"; - format-disconnected = "󰖪 "; - }; - tray = { - icon-size = 20; - spacing = 8; - }; - pulseaudio = { - format = "{icon} {volume}%"; - format-muted = "󰖁 {volume}%"; - format-icons = { - default = [" "]; - }; - scroll-step = 5; - on-click = "pamixer -t"; - }; - battery = { - format = "{icon} {capacity}%"; - format-icons = [" " " " " " " " " "]; - format-charging = " {capacity}%"; - format-full = " {capacity}%"; - format-warning = " {capacity}%"; - interval = 5; - states = { - warning = 20; - }; - format-time = "{H}h{M}m"; - tooltip = true; - tooltip-format = "{time}"; - }; - "custom/launcher" = { - format = ""; - on-click = "${pkgs.rofi}/bin/rofi -show drun"; - tooltip = "false"; - }; + style = '' + * { + border: none; + font-family: Font Awesome, Roboto, Arial, sans-serif; + font-size: 13px; + color: #ffffff; + border-radius: 20px; + } + + window { + /*font-weight: bold;*/ + } + window#waybar { + background: rgba(0, 0, 0, 0); + } + /*-----module groups----*/ + .modules-right { + background-color: rgba(0,43,51,0.85); + margin: 2px 10px 0 0; + } + .modules-center { + background-color: rgba(0,43,51,0.85); + margin: 2px 0 0 0; + } + .modules-left { + margin: 2px 0 0 5px; + background-color: rgba(0,119,179,0.6); + } + /*-----modules indv----*/ + #workspaces button { + padding: 1px 5px; + background-color: transparent; + } + #workspaces button:hover { + box-shadow: inherit; + background-color: rgba(0,153,153,1); + } + + #workspaces button.focused { + background-color: rgba(0,43,51,0.85); + } + + #clock, + #battery, + #cpu, + #memory, + #temperature, + #network, + #pulseaudio, + #custom-media, + #tray, + #mode, + #custom-power, + #custom-menu, + #idle_inhibitor { + padding: 0 10px; + } + #mode { + color: #cc3436; + font-weight: bold; + } + #custom-power { + background-color: rgba(0,119,179,0.6); + border-radius: 100px; + margin: 5px 5px; + padding: 1px 1px 1px 6px; + } + /*-----Indicators----*/ + #idle_inhibitor.activated { + color: #2dcc36; + } + #pulseaudio.muted { + color: #cc3436; + } + #battery.charging { + color: #2dcc36; + } + #battery.warning:not(.charging) { + color: #e6e600; + } + #battery.critical:not(.charging) { + color: #cc3436; + } + #temperature.critical { + color: #cc3436; + } + /*-----Colors----*/ + /* + *rgba(0,85,102,1),#005566 --> Indigo(dye) + *rgba(0,43,51,1),#002B33 --> Dark Green + *RGBA(0,153,153,1),#009999 --> PERSIAN GREEN + * + */ + ''; }; }