Waybar config + use swaync on hyprland
This commit is contained in:
parent
9663614e3d
commit
e0c1827b07
7 changed files with 198 additions and 4 deletions
|
|
@ -1,3 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.rice) colorPalette;
|
||||
inherit (pkgs.lib) nix-rice;
|
||||
alpha = 0.9;
|
||||
custom = nix-rice.palette.toRGBHex {
|
||||
inherit (colorPalette.primary) background foreground;
|
||||
alpha_background = nix-rice.color.setAlphaRgba alpha colorPalette.primary.background;
|
||||
primary_accent = colorPalette.normal.blue;
|
||||
secondary_accent = colorPalette.normal.cyan;
|
||||
tertiary_accent = colorPalette.primary.yellow;
|
||||
palette = {
|
||||
primary_background_rgba = colorPalette.primary.background;
|
||||
tertiary_background_hex = nix-rice.color.setAlphaRgba alpha colorPalette.primary.background;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
|
@ -25,8 +42,26 @@
|
|||
"battery#bat2"
|
||||
"clock"
|
||||
"tray"
|
||||
"custom/notification"
|
||||
];
|
||||
|
||||
"custom/notification" = {
|
||||
tooltip = "false";
|
||||
format = "{} {icon}";
|
||||
format-icons = {
|
||||
notification = "";
|
||||
none = "";
|
||||
dnd-notification = "";
|
||||
dnd-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
|
||||
on-click = "sleep 0.1 && ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
||||
on-click-right = "sleep 0.1 && ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
|
||||
"keyboard-state" = {
|
||||
"numlock" = true;
|
||||
"capslock" = true;
|
||||
|
|
@ -106,5 +141,68 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: ${pkgs.rice.font.monospace.name};
|
||||
font-size: 10px;
|
||||
min-height: 0;
|
||||
}
|
||||
window#waybar {
|
||||
background: ${custom.alpha_background};
|
||||
}
|
||||
#workspaces {
|
||||
background: ${custom.background};
|
||||
margin: 0 5px;
|
||||
padding: 0.5em;
|
||||
border-radius: 0.5em;
|
||||
color: ${custom.primary_accent}
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0.5em;
|
||||
margin: 0px 3px;
|
||||
border-radius: 0.5em;
|
||||
color: ${custom.primary_accent};
|
||||
background: ${custom.background};
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: ${custom.secondary_accent};
|
||||
color: ${custom.background};
|
||||
border-radius: 0.5em;
|
||||
min-width: 3em;
|
||||
background-size: 400% 400%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: ${custom.foreground};
|
||||
color: ${custom.background};
|
||||
border-radius: 0.5em;
|
||||
min-width: 3em;
|
||||
background-size: 400% 400%;
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #network, #language, #custom-notification {
|
||||
background: ${custom.background};
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
#tray, #pulseaudio, #network, #language, #custom-notification, #cpu, #memory, #temperature, #keyboard-state, #backlight, #battery, #battery#bat2, #clock {
|
||||
color: ${custom.foreground};
|
||||
border-radius: 0.5em;
|
||||
padding: 0.5em;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#clock {
|
||||
background: ${custom.alpha_background};
|
||||
}
|
||||
#window{
|
||||
background: ${custom.palette.tertiary_background_hex};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue