waybar: Add custom new workspace button

This makes it easy to both add a new workspace and launch rofi with one
click.
This commit is contained in:
Donovan Glover 2023-05-14 09:24:48 -04:00
parent f272fa0c2c
commit 3622c56d88
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -540,7 +540,7 @@
position = "left";
width = 45;
spacing = 8;
modules-left = [ "wlr/workspaces" ];
modules-left = [ "wlr/workspaces" "custom/new-workspace" ];
modules-center = [ "hyprland/window" ];
modules-right =
[ "tray" "wireplumber" "backlight" "battery" "clock" ];
@ -572,6 +572,10 @@
"format" = "{icon}";
"format-icons" = ["" ""];
};
"custom/new-workspace" = {
"format" = "+";
"on-click" = "hyprctl dispatch workspace empty && rofi -show drun";
};
};
};
style = lib.mkForce ''
@ -632,6 +636,13 @@
font-size: 24px;
}
#custom-new-workspace {
font-family: "Font Awesome 6 Free Solid";
padding-top: 8px;
padding-bottom: 8px;
color: alpha(@base0A, 0.67);
}
#clock {
font-size: 18px;
font-weight: bold;