feat: at least now a waybar works :3
This commit is contained in:
parent
b18da85bd7
commit
0b04a81063
5 changed files with 283 additions and 2 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./waybar.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
brightnessctl
|
brightnessctl
|
||||||
playerctl
|
playerctl
|
||||||
hyprshot
|
hyprshot
|
||||||
waybar
|
# waybar
|
||||||
|
|
||||||
# to better find execs
|
# to better find execs
|
||||||
nix-index
|
nix-index
|
||||||
|
|
|
||||||
194
home/waybar.css
Normal file
194
home/waybar.css
Normal file
|
|
@ -0,0 +1,194 @@
|
||||||
|
/* =============================================================================
|
||||||
|
*
|
||||||
|
* Waybar configuration
|
||||||
|
*
|
||||||
|
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
*
|
||||||
|
* =========================================================================== */
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Keyframes
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@keyframes blink-warning {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: orange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink-critical {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Base styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* Reset all styles */
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The whole bar */
|
||||||
|
#waybar {
|
||||||
|
background: #323232;
|
||||||
|
color: white;
|
||||||
|
font-family: Cantarell, Noto Sans, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each module */
|
||||||
|
#battery,
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#custom-keyboard-layout,
|
||||||
|
#memory,
|
||||||
|
#mode,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#temperature,
|
||||||
|
#tray {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Module styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning.discharging {
|
||||||
|
animation-name: blink-warning;
|
||||||
|
animation-duration: 3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical.discharging {
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.critical {
|
||||||
|
color: red;
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background: #64727D;
|
||||||
|
border-top: 2px solid white;
|
||||||
|
/* To compensate for the top border and still have vertical centering */
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify {
|
||||||
|
color: rgb(102, 220, 105);
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
border-top: 2px solid transparent;
|
||||||
|
/* To compensate for the top border and still have vertical centering */
|
||||||
|
padding-bottom: 2px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
border-color: #4c7899;
|
||||||
|
color: white;
|
||||||
|
background-color: #285577;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
border-color: #c9545d;
|
||||||
|
color: #c9545d;
|
||||||
|
}
|
||||||
86
home/waybar.nix
Normal file
86
home/waybar.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
style = ./waybar.css;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "bottom";
|
||||||
|
position = "top";
|
||||||
|
output = [
|
||||||
|
"DP-3" "DP-4" "DP-5"
|
||||||
|
"DP-6" "DP-7" "DP-8"
|
||||||
|
"DP-1"
|
||||||
|
"eDP-1"
|
||||||
|
];
|
||||||
|
|
||||||
|
modules-left = ["sway/workspaces" "sway/mode" "cpu" "memory"];
|
||||||
|
modules-center = [];
|
||||||
|
modules-right = ["pulseaudio" "backlight" "network" "battery" "clock"];
|
||||||
|
|
||||||
|
|
||||||
|
cpu = {
|
||||||
|
interval = 15;
|
||||||
|
format = " {}%";
|
||||||
|
max-length = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
memory = {
|
||||||
|
interval = 30;
|
||||||
|
format = " {}%";
|
||||||
|
max-length = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio" = {
|
||||||
|
format = "{volume}% {icon}";
|
||||||
|
format-bluetooth = "{volume}% {icon}";
|
||||||
|
format-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
hands-free = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = ["" ""];
|
||||||
|
};
|
||||||
|
scroll-step = 1;
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
};
|
||||||
|
|
||||||
|
backlight = {
|
||||||
|
tooltip = false;
|
||||||
|
format = " {}%";
|
||||||
|
interval = 1;
|
||||||
|
on-scroll-up = "brightnessctl s 1515";
|
||||||
|
on-scroll-down = "brightnessctl s 1";
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
format = "{ifname}";
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
format-disconnected = "";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
tooltip-format-ethernet = "{ifname} ";
|
||||||
|
tooltip-format-disconnected = "Disconnected";
|
||||||
|
max-length = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
format = "{capacity}% {icon}";
|
||||||
|
"format-icons" = ["" "" "" "" ""];
|
||||||
|
};
|
||||||
|
|
||||||
|
clock = {
|
||||||
|
"format-alt" = "{:%a, %d. %b %H:%M}";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
programs.zsh.ohMyZsh.theme = "agnoster";
|
programs.zsh.ohMyZsh.theme = "agnoster";
|
||||||
|
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
os-update = "unbuffer sudo nixos-rebuild switch --flake '/home/rhea/nix-config' --log-format internal-json -v |& nom --json";
|
os-update = "unbuffer sudo nixos-rebuild switch --flake '/home/rhea/nix-config' |& nom";
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue