waybar for hyprland

This commit is contained in:
Andrea Ciceri 2023-04-20 20:12:50 +02:00
parent e8092681cf
commit 75580df3bc
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 24 additions and 14 deletions

View file

@ -2,22 +2,26 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
font-family: Fira Code;
} }
window#waybar { window#waybar {
background: @theme_bg_color; background: rgba(255, 255, 255, 0.05);
color: @theme_fg_color; color: white;
font-size: 1.2rem;
} }
#workspaces button { #workspaces button {
padding: 0 10px; padding: 0 10px;
/* background: transparent; */ background: transparent;
/* color: @theme_fg_color; */ color: white;
font-size: 2rem;
} }
#workspaces button.focused { #workspaces button.focused, #workspaces button.focused, #workspaces button:hover {
/* background: @theme_bg_color; */ background: transparent;
border-bottom: 3px solid @theme_fg_color; box-shadow: inset 0 -5px white;
/* color: @theme_fg_color; */ /* color: @theme_fg_color; */
} }

View file

@ -1,5 +1,11 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.waybar = { 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; enable = true;
style = builtins.readFile ./style.css; style = builtins.readFile ./style.css;
settings = { settings = {
@ -10,10 +16,10 @@
height = 30; height = 30;
modules-left = [ modules-left = [
"sway/mode" "wlr/mode"
"sway/workspaces" "wlr/workspaces"
]; ];
modules-center = ["sway/window"]; modules-center = ["wlr/window"];
modules-right = [ modules-right = [
"tray" "tray"
"pulseaudio" "pulseaudio"
@ -25,7 +31,7 @@
"clock" "clock"
]; ];
"sway/workspaces" = { "wlr/workspaces" = {
all-outputs = true; all-outputs = true;
disable-scroll-wraparound = true; disable-scroll-wraparound = true;
active-only = true; active-only = true;
@ -41,9 +47,9 @@
sort-by-number = true; sort-by-number = true;
}; };
"sway/mode" = {tooltip = false;}; "wlr/mode" = {tooltip = false;};
"sway/window" = {max_length = 50;}; "wlr/window" = {max_length = 50;};
tray = { tray = {
spacing = 10; spacing = 10;
}; };
@ -93,7 +99,7 @@
format-source-muted = ""; format-source-muted = "";
on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
}; };
"sway/mode" = {format = ''<span style="italic">{}</span>'';}; "wlr/mode" = {format = ''<span style="italic">{}</span>'';};
temperature = { temperature = {
critical-threshold = 80; critical-threshold = 80;
format = "{temperatureC}°C {icon}"; format = "{temperatureC}°C {icon}";