From 0bb07cba5a5a7651bc2184f52ec1508df7e2b072 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 3 Jun 2024 11:43:54 -0400 Subject: [PATCH] feat(ironbar): add module --- user/modules/ironbar/default.nix | 80 ++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 user/modules/ironbar/default.nix diff --git a/user/modules/ironbar/default.nix b/user/modules/ironbar/default.nix new file mode 100644 index 0000000..4304611 --- /dev/null +++ b/user/modules/ironbar/default.nix @@ -0,0 +1,80 @@ +{ + inputs, + lib, + ... +}: { + imports = [ + inputs.ironbar.homeManagerModules.default + ]; + + programs.ironbar = { + enable = true; + config = { + "anchor_to_edges" = true; + position = "top"; + start = [ + { + "type" = "workspaces"; + "all_monitors" = false; + # "name_map" = { + # "1" = "󰙯"; + # "2" = "icon:firefox"; + # "3" = ""; + # "Games" = "icon:steam"; + # "Code" = ""; + # }; + favorites = map (x: toString x) (lib.lists.range 1 8); + } + ]; + center = [ + { + type = "clock"; + } + ]; + end = [ + { + type = "volume"; + format = "{icon}"; + max_volume = 100; + icons = { + volume_high = "󰕾"; + volume_medium = "󰖀"; + volume_low = "󰕿"; + muted = "󰝟"; + }; + } + { + type = "notifications"; + show_count = true; + icons = { + closed_none = "󰍥"; + closed_some = "󱥂"; + closed_dnd = "󱅯"; + open_none = "󰍡"; + open_some = "󱥁"; + open_dnd = "󱅮"; + }; + } + ]; + }; + style = ""; + # package = inputs.ironbar; + systemd = false; + }; + + systemd.user.services.ironbar = { + Unit = { + Description = "Systemd service for Ironbar"; + Requires = ["graphical-session.target"]; + }; + + Service = { + Type = "simple"; + ExecStart = "${inputs.ironbar}/bin/ironbar"; + }; + + Install.WantedBy = [ + "hyprland-session.target" + ]; + }; +}