1

Compare commits

...

2 Commits

4 changed files with 132 additions and 35 deletions

View File

@ -17,7 +17,7 @@
# because it forces en-US keyboard layout. # because it forces en-US keyboard layout.
fcitx.enable = true; fcitx.enable = true;
waybar.monitor = "DP-1"; waybar.monitors = ["DP-1" "DP-2"];
}; };
home = let home = let

View File

@ -140,7 +140,7 @@ in {
# Abbrs only available if package is installed # Abbrs only available if package is installed
(abbrify pkgs.duf { (abbrify pkgs.duf {
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'"; disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
alldisks = "duf"; alldisks = "duf";
}) })

View File

@ -21,11 +21,11 @@ in {
spacing = 0; spacing = 0;
margin = "10px 10px 0px 10px"; margin = "10px 10px 0px 10px";
fixed-center = true; fixed-center = true;
output = ["${waybar.monitor}"]; output = waybar.monitors;
modules-left = ["custom/launcher" "user" "hyprland/window"]; modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
modules-center = ["hyprland/workspaces"]; modules-center = ["systemd-failed-units" "mpris"];
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"]; modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
"custom/launcher" = { "custom/launcher" = {
format = "<span></span>"; format = "<span></span>";
@ -33,45 +33,129 @@ in {
on-click = "rofi -drun-show-actions -show drun"; on-click = "rofi -drun-show-actions -show drun";
}; };
"hyprland/workspaces" = { systemd-failed-units = {
all-outputs = false; hide-on-ok = true;
format = "{name}"; format = " {nr_failed}";
on-click = "activate"; format-ok = "";
sort-by-coordinates = false; system = true;
sort-by-name = true; user = true;
sort-by-number = false;
}; };
"pulseaudio" = { "niri/workspaces" = {
all-outputs = false;
format = "{icon}";
format-icons = {
default = "";
focused = "";
active = "";
};
};
"niri/window" = {
format = "{title}";
separate-outputs = false;
icon = true;
icon-size = 22;
};
mpris = {
format = "<span>󰎇</span> {dynamic}";
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
dynamic-order = ["artist" "title"];
status-icons = {
paused = "󰏤";
};
};
privacy = {
icon-spacing = 4;
icon-size = 16;
transition-duration = 250;
modules = [
{
type = "screenshare";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-out";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-in";
tooltip = true;
tooltip-icon-size = 24;
}
];
ignore-monitor = true;
};
pulseaudio = {
format = "<span>󰕾</span> {volume}%"; format = "<span>󰕾</span> {volume}%";
format-muted = "<span>󰝟</span> "; format-muted = "<span>󰝟</span> ";
on-click = "kitty ncpamixer -t o"; on-click = "kitty --title=WireMix wiremix";
}; };
"network" = { network = {
format = "<span>󰌀</span> {ipaddr}"; format = "<span>󰌀</span> {ipaddr}";
format-disconnected = "<span></span> "; format-disconnected = "<span></span> ";
interface = "enp8s0"; interface = "enp8s0";
tooltip-format = "{ifname} via {gwaddr}"; tooltip = false;
};
disk = {
format = "<span>󰋊</span> {percentage_used}%";
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
}; };
cpu = { cpu = {
states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {load}%"; format = "<span></span> {load}%";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {load}%</span>";
format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
on-click = "kitty --title=Btop btop";
tooltip = false;
}; };
memory = { memory = {
format = "<span></span> {percentage}%"; states = {
"warning" = 65;
"critical" = 85;
}; };
format = "<span></span> {percentage}%";
temperature = { format-warning = "<span color='#${color.hex.yellow}'><span></span> {percentage}%</span>";
format = "<span></span> {temperatureC}°C"; format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
thermal-zone = 3; on-click = "kitty --title=Btop btop";
tooltip = true;
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
}; };
clock = { clock = {
format = "<span>󰥔</span> {:%H:%M}"; format = "<span>󰥔</span> {:%H:%M}";
timezone = "Europe/Berlin"; timezone = "Europe/Berlin";
tooltip-format = "<tt><small>{calendar}</small></tt>"; tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
weeks-pos = "right";
mode-mon-col = 3;
on-scroll = -1;
format = {
months = "<span color='#${color.hex.yellow}'><b>{}</b></span>";
days = "<span color='#${color.hex.flamingo}'><b>{}</b></span>";
weeks = "<span color='#${color.hex.teal}'><b>W{}</b></span>";
weekdays = "<span color='#${color.hex.lavender}'><b>{}</b></span>";
today = "<span color='#${color.hex.accent}'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
}; };
tray = { tray = {
@ -111,21 +195,24 @@ in {
/* Background colors */ /* Background colors */
#custom-launcher {background-color: #${color.hex.accent};} #custom-launcher {background-color: #${color.hex.accent};}
#user {background-color: #${color.hex.pink};}
#window {background-color: #${color.hex.mauve};}
#workspaces button {background-color: #${color.hex.lavender};} #workspaces button {background-color: #${color.hex.lavender};}
#workspaces button.active {background-color: #${color.hex.pink};} #workspaces button.active {background-color: #${color.hex.pink};}
#window {background-color: #${color.hex.maroon};}
#systemd-failed-units {background-color: #${color.hex.red};}
#mpris {background-color: #${color.hex.accent};}
#privacy {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.maroon};} #pulseaudio {background-color: #${color.hex.maroon};}
#network {background-color: #${color.hex.peach};} #network {background-color: #${color.hex.peach};}
#cpu {background-color: #${color.hex.yellow};} #disk {background-color: #${color.hex.yellow};}
#memory {background-color: #${color.hex.green};} #cpu {background-color: #${color.hex.green};}
#temperature {background-color: #${color.hex.teal};} #memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};} #clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};} #tray {background-color: #${color.hex.accent};}
/* Square Widgets */ /* Square Widgets */
#custom-launcher, #custom-launcher,
#workspaces button, #systemd-failed-units,
#mpris,
#tray { #tray {
color: #${color.hex.mantle}; color: #${color.hex.mantle};
font-weight: bold; font-weight: bold;
@ -133,14 +220,24 @@ in {
border-radius: ${border-radius}; border-radius: ${border-radius};
} }
/* Workspaces */
#workspaces button {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 2px 0px 2px;
margin: 8px 2px 8px 2px;
border-radius: ${border-radius};
}
/* Rectangle Widgets */ /* Rectangle Widgets */
#user, #user,
#window, #window,
#pulseaudio, #pulseaudio,
#privacy,
#network, #network,
#disk,
#cpu, #cpu,
#memory, #memory,
#temperature,
#clock { #clock {
color: #${color.hex.mantle}; color: #${color.hex.mantle};
font-weight: bold; font-weight: bold;
@ -159,12 +256,12 @@ in {
/* Tux Icon */ /* Tux Icon */
#custom-launcher { #custom-launcher {
font-size: 26px; font-size: 26px;
padding-right: 10px; padding-right: 13px;
margin: 0px 5px 0px 0px; margin: 0px 5px 0px 0px;
} }
#workspaces button { #systemd-failed-units {
margin: 0px 5px 0px 5px; margin: 0px 5px 0px 0px;
} }
#tray { #tray {

View File

@ -7,9 +7,9 @@ with lib;
with mylib.modules; { with mylib.modules; {
enable = mkEnableOption "Waybar"; enable = mkEnableOption "Waybar";
monitor = mkOption { monitors = mkOption {
type = types.str; type = types.listOf types.str;
example = "HDMI-A-1"; example = ''["HDMI-A-1", "DP-1"]'';
description = "What monitor to display the Waybar on"; description = "What monitor to display the Waybar on";
}; };
} }