From 1244ba2adfc7b3875375a127d566a01107e6662d Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Thu, 18 May 2023 23:17:26 +0200 Subject: [PATCH] improved waybar --- flake.lock | 6 ++-- .../rouven/modules/accounts/powerline.muttrc | 4 +-- users/rouven/modules/hyprland/waybar.nix | 28 +++++++++++++++---- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 24e363f..c5abfaa 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1684321175, - "narHash": "sha256-V4EbM+jK7pvjKBaj0dgAiW9ultzDE27Nz5fRyu/ceMk=", + "lastModified": 1684442239, + "narHash": "sha256-8wD+fQpNULCF9a88E1Knw3MtXWqvyhn8u/859QSSoE4=", "owner": "nix-community", "repo": "home-manager", - "rev": "59659243cd4ababda605e79b4a9c2e6d83e24c86", + "rev": "c10403a5739d6275334710903fe709bc8d587980", "type": "github" }, "original": { diff --git a/users/rouven/modules/accounts/powerline.muttrc b/users/rouven/modules/accounts/powerline.muttrc index 0fd5fb2..dcc2251 100644 --- a/users/rouven/modules/accounts/powerline.muttrc +++ b/users/rouven/modules/accounts/powerline.muttrc @@ -13,8 +13,8 @@ set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" # no addressed to me, to me, group, cc, sent by me, mailing list set to_chars="➜" # unchanged mailbox, changed, read only, attach mode -set status_chars = " " -ifdef crypt_chars set crypt_chars = " " +# set status_chars = " " +ifdef crypt_chars set crypt_chars = "" set flag_chars = " " set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/hyprland/waybar.nix index 52a78f3..cc9e58e 100644 --- a/users/rouven/modules/hyprland/waybar.nix +++ b/users/rouven/modules/hyprland/waybar.nix @@ -1,5 +1,7 @@ { config, pkgs, hyprland, ... }: { + # waybar needs hyprctl + systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin"; programs.waybar = { enable = true; systemd.enable = true; @@ -9,7 +11,7 @@ layer = "top"; position = "top"; height = 26; - modules-left = [ "wlr/workspaces" ]; + modules-left = [ "wlr/workspaces" "hyprland/window" ]; modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ]; network = { format-wifi = " {essid} ({signalStrength}%)"; @@ -19,11 +21,19 @@ format-disconnected = "Disconnected ⚠"; format-alt = "{ifname}: {ipaddr}/{cidr}"; }; + "wlr/workspaces" = { + format = "{icon}"; + on-click = "activate"; + }; + "hyprland/window" = { + format = " {}"; + separate-outputs = true; + }; cpu = { format = "{usage}% "; }; temperature = { - hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; + hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input"; critical-threshold = 80; format = "{temperatureC}°C {icon}"; format-icons = [ "" ]; @@ -32,13 +42,13 @@ format = "{volume}% {icon} {format_source}"; format-bluetooth = "{volume}% {icon} {format_source} "; format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; + format-muted = "󰝟 {format_source}"; format-source = " {volume}% "; format-source-muted = " "; format-icons = { headphone = ""; - headset = ""; - default = [ "" "" "" ]; + headset = "󰋎"; + default = [ "󰕿" "󰖀" "󰕾" ]; }; on-click = "pavucontrol"; }; @@ -48,7 +58,7 @@ critical = 15; }; format = "{capacity}% {icon} "; - format-charging = "{capacity}% "; + format-charging = "{capacity}% 󱊦"; format-plugged = "{capacity}% "; format-icons = [ "" "" "" "" "" ]; }; @@ -98,6 +108,7 @@ #temperature, #network, #pulseaudio, + #window, #tray{ border-radius: 30px; padding: 0 10px; @@ -108,6 +119,11 @@ #workspaces { margin: 0 4px; } + + #window { + background-color: #${config.colorScheme.colors.base00}; + } + #clock { background-color: #${config.colorScheme.colors.base00};