feat: move waybar to hyprland

This commit is contained in:
Julien Malka 2024-05-21 22:03:09 +02:00
parent e48abafe43
commit 048edc3aa1
Signed by: Luj
GPG key ID: 6FC74C847011FD83

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
cfg = config.luj.programs.waybar; cfg = config.luj.programs.waybar;
in in
@ -6,9 +11,7 @@ with lib;
{ {
options.luj.programs.waybar = { options.luj.programs.waybar = {
enable = mkEnableOption "Enable waybar"; enable = mkEnableOption "Enable waybar";
interfaceName = mkOption { interfaceName = mkOption { type = lib.types.str; };
type = lib.types.str;
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -18,14 +21,21 @@ with lib;
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
modules-left = [ "custom/nixos" "sway/workspaces" ]; modules-left = [
"custom/nixos"
"hyprland/workspaces"
];
modules-center = [ "clock" ]; modules-center = [ "clock" ];
modules-right = [ "custom/mails" "network" "battery" ]; modules-right = [
"custom/mails"
"network"
"battery"
];
"custom/nixos" = { "custom/nixos" = {
format = " "; format = " ";
tooltip = false; tooltip = false;
}; };
"sway/workspaces" = { "hyprland/workspaces" = {
format = "{name}"; format = "{name}";
tooltip = false; tooltip = false;
all-outputs = true; all-outputs = true;
@ -34,7 +44,17 @@ with lib;
"backlight" = { "backlight" = {
device = "intel_backlight"; device = "intel_backlight";
format = "<span color='#cba6f7'>{icon}</span> {percent}%"; format = "<span color='#cba6f7'>{icon}</span> {percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ]; format-icons = [
""
""
""
""
""
""
""
""
""
];
}; };
"pulseaudio" = { "pulseaudio" = {
format = "<span color='#cba6f7'>{icon}</span> {volume}%"; format = "<span color='#cba6f7'>{icon}</span> {volume}%";
@ -42,7 +62,16 @@ with lib;
tooltip = false; tooltip = false;
format-icons = { format-icons = {
headphone = ""; headphone = "";
default = [ "" "" "󰕾" "󰕾" "󰕾" "" "" "" ]; default = [
""
""
"󰕾"
"󰕾"
"󰕾"
""
""
""
];
}; };
scroll-step = 1; scroll-step = 1;
}; };
@ -63,7 +92,13 @@ with lib;
}; };
"battery" = { "battery" = {
format = "<span color='#cba6f7'>{icon}</span> {capacity}%"; format = "<span color='#cba6f7'>{icon}</span> {capacity}%";
format-icons = [ "" "" "" "" "" ]; format-icons = [
""
""
""
""
""
];
format-charging = "<span color='#cba6f7'></span> {capacity}%"; format-charging = "<span color='#cba6f7'></span> {capacity}%";
tooltip = false; tooltip = false;
}; };