nixos/home/hyprland/waybar/default.nix
Evie Litherland-Smith 740325f707 Add firefox back as default browser
Add firefox and chromium to web workspace, keep nyxt installed as
quick popup browser to use elsewhere

Remove discord workspace, move to apps workspace

Add files workspace for thunar and libreoffice

Add more waybar rewrites - libreoffice programs, thunar, PWAs like
whatsapp web, etc...
2023-12-05 12:47:30 +00:00

173 lines
5.1 KiB
Nix

{ config, pkgs, ... }: {
home.packages = with pkgs; [ networkmanagerapplet bluez ];
systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
programs.waybar = {
enable = true;
style = ./style.css;
systemd = {
enable = true;
target = "hyprland-session.target";
};
settings.main = {
layer = "top";
position = "top";
# Layout
"modules-left" = [
"hyprland/workspaces"
"custom/separator"
"hyprland/window"
"custom/separator"
"mpris"
];
"modules-center" = [ ];
"modules-right" =
[ "pulseaudio" "disk" "cpu" "memory" "clock" "battery" "tray" ];
# Module config
"custom/separator" = { format = "|"; };
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
"1" = "󰫃";
"2" = "󰫄";
"3" = "󰫅";
"4" = "󰫆";
"5" = "󰫇";
"6" = "󰫈";
"emacs" = "";
"web" = "󰀹";
"files" = "󰝰";
"steam" = "󰓓";
"apps" = "󰜫";
"top" = "";
"remote" = "󰢹";
default = "󰋙";
special = "󰁡";
};
show-special = true;
sort-by = "id";
};
"hyprland/window" = {
rewrite = {
"(.*) - GNU Emacs(.*)" = " $1";
"(.*) Mozilla Firefox" = "󰈹 $1";
"(.*) - Chromium" = " $1";
"Nyxt - (.*)" = "󰀹 $1";
"(.*) - Discord" = "󰙯 $1";
"(.*) - Thunar" = "󰝰 $1";
"(.*) - LibreOffice Writer" = "󰈙 $1";
"(.*) - LibreOffice Calc" = "󰡱 $1";
"(.*) - LibreOffice Impress" = "󰐨 $1";
"(.*) - LibreOffice Base" = "󰆼 $1";
"(.*) - LibreOffice Draw" = "󰽉 $1";
"(.*) - LibreOffice Math" = "󰪚 $1";
"Microsoft Teams - (.*)" = "󰊻 $1";
"Microsoft Teams classic" = "󰊻";
"Microsoft 365 - (.*)" = "󰏆 $1";
"WhatsApp Web" = "󰖣";
"Signal" = "󰒢";
"NoMachine - (.*)" = "󰢹 $1";
};
separate-outputs = true;
};
mpris = {
"format" = "{player_icon} <b>{title}</b>";
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
"interval" = 1;
"player-icons" = {
"default" = "󰲸";
"ncspot" = "󰓇";
"emms" = "";
};
"status-icons" = {
"playing" = "󰐊";
"paused" = "󰏤";
"stopped" = "󰓛";
};
"ignored-players" = [ "firefox" "chromium" "mpv" ];
};
pulseaudio = {
scroll-step = 5;
format = "{format_source}/{icon} {volume}%";
format-muted = "{format_source}/󰝟";
format-source = "󰍬";
format-source-muted = "󰍭";
format-icons = {
car = "󰄍";
default = [ "󰕿" "󰖀" "󰕾" ];
hands-free = "󰥰";
headset = "󰋎";
phone = "󰏲";
portable = "󰏳";
headphone = "󰋋";
};
on-click = "pavucontrol";
on-click-middle = "volumectl -m %";
on-click-right = "volumectl %";
on-scroll-up = "volumectl -u + 5";
on-scroll-down = "volumectl -u - 5";
};
disk = {
format = "󰋊 {percentage_used}%";
path = config.home.homeDirectory;
};
cpu = {
format = "󰻠 {usage}%";
tooltip = false;
};
memory = { format = "󰍛 {}%"; };
temperature = {
critical-threshold = 80;
format = "{icon} {temperatureC}°C";
format-icons = [ "󱃃" "󰔏" "󱃂" ];
};
clock = {
format = "{:󰃭 %Y-%m-%d 󰥔 %R}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "left";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'><b>{}</b></span>";
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
backlight = {
format = "{icon}";
tooltip-format = "{percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{icon}";
format-charging = "󰂄";
format-plugged = "󰚥";
tooltip-format = "{time} {capacity}%";
format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
};
tray = {
icon-size = 16;
show-passive-items = true;
spacing = 5;
};
};
};
}