add waybar config
This commit is contained in:
parent
012bbb717c
commit
f31c27bfe7
6 changed files with 338 additions and 35 deletions
175
users/mara/config/waybar.nix
Normal file
175
users/mara/config/waybar.nix
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
style = ./waybar.css;
|
||||
settings = {
|
||||
topBar = {
|
||||
position = "top";
|
||||
name = "top_bar";
|
||||
reload_style_on_change = true;
|
||||
|
||||
modules-left = [
|
||||
"clock"
|
||||
"custom/sep"
|
||||
"battery"
|
||||
"custom/bat-sep"
|
||||
"network"
|
||||
];
|
||||
modules-center = [
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"memory"
|
||||
"custom/sep"
|
||||
"cpu"
|
||||
"custom/sep"
|
||||
"temperature"
|
||||
"custom/sep"
|
||||
"disk"
|
||||
];
|
||||
|
||||
"custom/sep" = {
|
||||
format = "|";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/bat-sep" = {
|
||||
exec = "${lib.getExe' pkgs.coreutils "ls"} /sys/class/power_supply/* >/dev/null 2>&1 && ${lib.getExe' pkgs.coreutils "printf"} '|'";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
clock = {
|
||||
format = "{:%Y-%m-%d %H:%M}";
|
||||
tooltip = false;
|
||||
};
|
||||
battery = {
|
||||
format = "{capacity}% - {timeTo}";
|
||||
tooltip = false;
|
||||
};
|
||||
network = {
|
||||
format-ethernet = "{ifname} - {bandwidthUpBytes} {bandwidthDownBytes}";
|
||||
format-wifi = "{ifname} ({signalStrength}%) - {bandwidthUpBytes} {bandwidthDownBytes}";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{ipaddr}/{cidr} - [{gwaddr}]";
|
||||
tooltip-wifi-format = "{ipaddr}/{cidr} - [{gwaddr}] \n{essid} - {freqency}GHz ({signaldBm}dBm)";
|
||||
interval = 1;
|
||||
tooltip = true;
|
||||
};
|
||||
mpris = {
|
||||
format = " | {dynamic} | ";
|
||||
dynamic-seperator = " | ";
|
||||
dynamic-len = 32;
|
||||
dynamic-order = [
|
||||
"title"
|
||||
"artist"
|
||||
];
|
||||
tooltip = false;
|
||||
};
|
||||
memory = {
|
||||
format = "{used}GiB/{total}GiB";
|
||||
tooltip = false;
|
||||
interval = 1;
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% {avg_frequency}GHz";
|
||||
tooltip = false;
|
||||
interval = 1;
|
||||
};
|
||||
temperature = {
|
||||
format = "{temperatureC}°C";
|
||||
tooltip = false;
|
||||
interval = 5;
|
||||
};
|
||||
disk = {
|
||||
format = "{free}";
|
||||
tooltip = false;
|
||||
interval = 60;
|
||||
};
|
||||
};
|
||||
bottomBar = {
|
||||
margin = "5";
|
||||
ipc = true;
|
||||
|
||||
position = "bottom";
|
||||
name = "bottom_bar";
|
||||
reload-style-on-change = true;
|
||||
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"custom/sep"
|
||||
"backlight"
|
||||
"custom/back-sep"
|
||||
"idle_inhibitor"
|
||||
"custom/sep"
|
||||
"bluetooth"
|
||||
];
|
||||
modules-center = [
|
||||
"sway/mode"
|
||||
"tray"
|
||||
];
|
||||
modules-right = [
|
||||
"wireplumber"
|
||||
"wireplumber#mic"
|
||||
];
|
||||
|
||||
"custom/sep" = {
|
||||
format = "|";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/back-sep" = {
|
||||
exec = "${lib.getExe' pkgs.coreutils "ls"} /sys/class/backlight/* >/dev/null 2>&1 && ${lib.getExe' pkgs.coreutils "printf"} '|'";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
format = " {name}·{icon} ";
|
||||
format-icons = {
|
||||
"1" = "dev";
|
||||
"2" = "web";
|
||||
"3" = "com";
|
||||
"4" = "mus";
|
||||
default = "ext";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
};
|
||||
all-outputs = true;
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}%";
|
||||
tooltip = false;
|
||||
on-scroll-up = "${lib.getExe pkgs.brightnessctl} s 1%+ >/dev/null";
|
||||
on-scroll-down = "${lib.getExe pkgs.brightnessctl} s 1%- >/dev/null";
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "on";
|
||||
deactivated = "off";
|
||||
};
|
||||
tooltip = false;
|
||||
};
|
||||
bluetooth = {
|
||||
format = "off";
|
||||
format-on = "on: {num_connections}";
|
||||
format-connected = "on: {num_connections}";
|
||||
format-connected-battery = "on: {num_connections} - {device_battery_percentage}%";
|
||||
format-off = "off";
|
||||
format-disabled = "off";
|
||||
on-click = "(${lib.getExe' pkgs.bluez "bluetoothctl"} show | ${lib.getExe' pkgs.findutils "grep"} 'Powered: no' && ${lib.getExe' pkgs.bluez "bluetoothctl"} power on) || ${lib.getExe' pkgs.bluez "bluetoothctl"} power off";
|
||||
on-click-middle = "${lib.getExe pkgs.kitty} ${lib.getExe pkgs.bluetui}";
|
||||
tooltip = false;
|
||||
};
|
||||
"sway/mode" = {
|
||||
format = "{} |";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue