improved waybar

This commit is contained in:
Rouven Seifert 2023-05-18 23:17:26 +02:00
parent 98dcbcd724
commit 1244ba2adf
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
3 changed files with 27 additions and 11 deletions

View file

@ -23,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1684321175, "lastModified": 1684442239,
"narHash": "sha256-V4EbM+jK7pvjKBaj0dgAiW9ultzDE27Nz5fRyu/ceMk=", "narHash": "sha256-8wD+fQpNULCF9a88E1Knw3MtXWqvyhn8u/859QSSoE4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "59659243cd4ababda605e79b4a9c2e6d83e24c86", "rev": "c10403a5739d6275334710903fe709bc8d587980",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -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 # no addressed to me, to me, group, cc, sent by me, mailing list
set to_chars="➜" set to_chars="➜"
# unchanged mailbox, changed, read only, attach mode # unchanged mailbox, changed, read only, attach mode
set status_chars = " " # set status_chars = " "
ifdef crypt_chars set crypt_chars = "" ifdef crypt_chars set crypt_chars = ""
set flag_chars = " " set flag_chars = " "
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"

View file

@ -1,5 +1,7 @@
{ config, pkgs, hyprland, ... }: { config, pkgs, hyprland, ... }:
{ {
# waybar needs hyprctl
systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin";
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
@ -9,7 +11,7 @@
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 26; height = 26;
modules-left = [ "wlr/workspaces" ]; modules-left = [ "wlr/workspaces" "hyprland/window" ];
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ]; modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ];
network = { network = {
format-wifi = " {essid} ({signalStrength}%)"; format-wifi = " {essid} ({signalStrength}%)";
@ -19,11 +21,19 @@
format-disconnected = "Disconnected "; format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}"; format-alt = "{ifname}: {ipaddr}/{cidr}";
}; };
"wlr/workspaces" = {
format = "{icon}";
on-click = "activate";
};
"hyprland/window" = {
format = " {}";
separate-outputs = true;
};
cpu = { cpu = {
format = "{usage}% "; format = "{usage}% ";
}; };
temperature = { temperature = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
critical-threshold = 80; critical-threshold = 80;
format = "{temperatureC}°C {icon}"; format = "{temperatureC}°C {icon}";
format-icons = [ "" ]; format-icons = [ "" ];
@ -32,13 +42,13 @@
format = "{volume}% {icon} {format_source}"; format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source} "; format-bluetooth = "{volume}% {icon} {format_source} ";
format-bluetooth-muted = " {icon} {format_source}"; format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}"; format-muted = "󰝟 {format_source}";
format-source = " {volume}% "; format-source = " {volume}% ";
format-source-muted = " "; format-source-muted = " ";
format-icons = { format-icons = {
headphone = ""; headphone = "";
headset = ""; headset = "󰋎";
default = [ "" "" "" ]; default = [ "󰕿" "󰖀" "󰕾" ];
}; };
on-click = "pavucontrol"; on-click = "pavucontrol";
}; };
@ -48,7 +58,7 @@
critical = 15; critical = 15;
}; };
format = "{capacity}% {icon} "; format = "{capacity}% {icon} ";
format-charging = "{capacity}% "; format-charging = "{capacity}% 󱊦";
format-plugged = "{capacity}% "; format-plugged = "{capacity}% ";
format-icons = [ "" "" "" "" "" ]; format-icons = [ "" "" "" "" "" ];
}; };
@ -98,6 +108,7 @@
#temperature, #temperature,
#network, #network,
#pulseaudio, #pulseaudio,
#window,
#tray{ #tray{
border-radius: 30px; border-radius: 30px;
padding: 0 10px; padding: 0 10px;
@ -108,6 +119,11 @@
#workspaces { #workspaces {
margin: 0 4px; margin: 0 4px;
} }
#window {
background-color: #${config.colorScheme.colors.base00};
}
#clock { #clock {
background-color: #${config.colorScheme.colors.base00}; background-color: #${config.colorScheme.colors.base00};