🚂
This commit is contained in:
parent
fcfd36c63b
commit
202611d0b8
18 changed files with 174 additions and 63 deletions
111
hmModules/waybar/default.nix
Normal file
111
hmModules/waybar/default.nix
Normal file
|
@ -0,0 +1,111 @@
|
|||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
package = pkgs.waybar.overrideAttrs (old: {
|
||||
mesonFlags = old.mesonFlags ++ ["-Dexperimental=true"];
|
||||
patchPhase = ''
|
||||
sed -i -e 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp
|
||||
'';
|
||||
});
|
||||
enable = true;
|
||||
style = builtins.readFile ./style.css;
|
||||
settings = {
|
||||
mainBar = {
|
||||
ipc = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
|
||||
modules-left = [
|
||||
"wlr/mode"
|
||||
"wlr/workspaces"
|
||||
];
|
||||
modules-center = ["wlr/window"];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"wlr/workspaces" = {
|
||||
all-outputs = true;
|
||||
disable-scroll-wraparound = true;
|
||||
# format = "{icon}";
|
||||
on-click = "activate";
|
||||
# format-icons = {
|
||||
# "1" = "";
|
||||
# "2" = "";
|
||||
# "3" = "";
|
||||
# "9" = "ﬧ";
|
||||
# urgent = "";
|
||||
# };
|
||||
# sort-by-number = true;
|
||||
};
|
||||
|
||||
"wlr/mode" = {tooltip = false;};
|
||||
|
||||
"wlr/window" = {max_length = 50;};
|
||||
tray = {
|
||||
spacing = 10;
|
||||
};
|
||||
battery = {
|
||||
format = "{capacity}% {icon}";
|
||||
format-alt = "{time} {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-plugged = "{capacity}% ";
|
||||
states = {
|
||||
critical = 15;
|
||||
warning = 30;
|
||||
};
|
||||
};
|
||||
clock = {
|
||||
format-alt = "{:%Y-%m-%d}";
|
||||
tooltip-format = "{:%Y-%m-%d | %H:%M}";
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
tooltip = false;
|
||||
};
|
||||
memory = {format = "{}% ";};
|
||||
network = {
|
||||
interval = 1;
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-icons = {
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
handsfree = "";
|
||||
headphones = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
};
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
"wlr/mode" = {format = ''<span style="italic">{}</span>'';};
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = ["" "" ""];
|
||||
hwmon-path = "/sys/class/thermal/thermal_zone4/temp";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue