Themed waybar

This commit is contained in:
Emmet 2023-08-18 22:44:34 -05:00
parent a8f47c5603
commit c9891c5774

View file

@ -4,7 +4,10 @@
imports = [
../../app/terminal/alacritty.nix
../../app/terminal/kitty.nix
( import ../../app/dmenu-scripts/networkmanager-dmenu.nix {dmenu_command = "fuzzel -d"; inherit config lib pkgs;})
(import ../../app/dmenu-scripts/networkmanager-dmenu.nix {
dmenu_command = "fuzzel -d";
inherit config lib pkgs;
})
];
wayland.windowManager.hyprland = {
@ -155,11 +158,8 @@
decoration {
rounding = 8
}
'';
xwayland = {
enable = true;
};
xwayland = { enable = true; };
systemdIntegration = true;
};
@ -292,22 +292,27 @@
mainBar = {
layer = "top";
position = "top";
height = 30;
height = 35;
margin = "7 7 3 7";
# width = 1280;
spacing = 4;
spacing = 2;
modules-left = [ ];
modules-left = [ "battery" "backlight" "pulseaudio" "cpu" "memory" ];
modules-center = [ "wlr/workspaces" ];
modules-right = [ "idle_inhibitor" "pulseaudio" "network" "cpu" "memory" "backlight" "battery" "clock" "tray"];
modules-right = [ "idle_inhibitor" "clock" "tray" ];
"wlr/workspaces" = {
"format" = "{icon}";
"format-icons" = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"1" = "󱚌 ¹";
"2" = "󰈹 ²";
"3" = "󰈮 ³";
"4" = "󱍙 ";
"5" = "";
"6" = "󰄄 ";
"7" = "";
"8" = "";
"9" = "";
};
"persistent_workspaces" = {
"1" = [ ];
@ -325,8 +330,8 @@
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
activated = "󰅶";
deactivated = "󰾪";
};
};
tray = {
@ -334,17 +339,19 @@
"spacing" = 10;
};
clock = {
"interval" = 1;
"format" = "{:%a %Y-%m-%d %I:%M:%S %p}";
"timezone" = "America/New_York";
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
"format-alt" = "{:%Y-%m-%d}";
"tooltip-format" = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
"format-alt" = "{:%I:%M:%S %p}";
};
cpu = {
"format" = "{usage}% ";
"tooltip" = false;
};
memory = {
"format" = "{}% ";
};
memory = { "format" = "{}% "; };
backlight = {
"format" = "{percent}% {icon}";
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
@ -363,14 +370,6 @@
#"format-full" = "";
"format-icons" = [ "" "" "" "" "" ];
};
network = {
"format-wifi" = "{essid} ({signalStrength}%) ";
"format-ethernet" = "{ipaddr}/{cidr} ";
"tooltip-format" = "{ifname} via {gwaddr} ";
"format-linked" = "{ifname} (No IP) ";
"format-disconnected" = "Disconnected ";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
"scroll-step" = 1;
"format" = "{volume}% {icon} {format_source}";
@ -395,45 +394,30 @@
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
font-family: FontAwesome, Inconsolata;
font-size: 20px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.9);
color: #ffffff;
background-color: #'' + config.lib.stylix.colors.base00 + '';
opacity: 0.87;
border-radius: 8px;
color: #'' + config.lib.stylix.colors.base07 + '';
transition-property: background-color;
transition-duration: .5s;
transition-duration: .2s;
}
window > box {
border-radius: 8px;
opacity: 0.87;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 2;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
@ -444,33 +428,27 @@
#workspaces button {
padding: 0 7px;
background-color: transparent;
color: #ffffff;
color: #'' + config.lib.stylix.colors.base04 + '';
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
color: #'' + config.lib.stylix.colors.base07 + '';
}
#workspaces button.active {
background-color: #ff0000;
color: #'' + config.lib.stylix.colors.base08 + '';
}
#workspaces button.focused {
color: #'' + config.lib.stylix.colors.base0A + '';
}
#workspaces button.visible {
background-color: #0000ff;
color: #'' + config.lib.stylix.colors.base07 + '';
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
color: #'' + config.lib.stylix.colors.base09 + '';
}
#clock,
@ -490,7 +468,9 @@
#scratchpad,
#mpd {
padding: 0 10px;
color: #ffffff;
color: #'' + config.lib.stylix.colors.base07 + '';
border: none;
border-radius: 8px;
}
#window,
@ -509,29 +489,27 @@
}
#clock {
background-color: #64727D;
color: #'' + config.lib.stylix.colors.base0D + '';
}
#battery {
background-color: #ffffff;
color: #000000;
color: #'' + config.lib.stylix.colors.base0B + '';
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
color: #'' + config.lib.stylix.colors.base0C + '';
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
background-color: #'' + config.lib.stylix.colors.base07 + '';
color: #'' + config.lib.stylix.colors.base00 + '';
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
background-color: #'' + config.lib.stylix.colors.base08 + '';
color: #'' + config.lib.stylix.colors.base07 + '';
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
@ -540,77 +518,31 @@
}
label:focus {
background-color: #000000;
background-color: #'' + config.lib.stylix.colors.base00 + '';
}
#cpu {
background-color: #2ecc71;
color: #000000;
color: #'' + config.lib.stylix.colors.base0D + '';
}
#memory {
background-color: #9b59b6;
color: #'' + config.lib.stylix.colors.base0E + '';
}
#disk {
background-color: #964B00;
color: #'' + config.lib.stylix.colors.base0F + '';
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
color: #'' + config.lib.stylix.colors.base0A + '';
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
color: #'' + config.lib.stylix.colors.base0C + '';
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
color: #'' + config.lib.stylix.colors.base04 + '';
}
#tray > .passive {
@ -619,67 +551,15 @@
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
color: #'' + config.lib.stylix.colors.base04 + '';
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
color: #'' + config.lib.stylix.colors.base0F + '';
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
'';
};
programs.fuzzel.enable = true;