mirror of
https://github.com/danth/stylix
synced 2025-02-16 21:38:40 +00:00
Initial bemenu module
This commit is contained in:
parent
b4840cfc60
commit
30757d4b2d
2 changed files with 35 additions and 0 deletions
|
@ -56,6 +56,7 @@
|
|||
nixosModules.stylix = { pkgs, ... }@args: {
|
||||
imports = [
|
||||
./modules/alacritty.nix
|
||||
./modules/bemenu.nix
|
||||
./modules/console.nix
|
||||
./modules/dunst.nix
|
||||
./modules/feh.nix
|
||||
|
|
34
modules/bemenu.nix
Normal file
34
modules/bemenu.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{pkgs, config, lib, ... }:
|
||||
|
||||
with config.lib.stylix.colors.withHashtag;
|
||||
with config.stylix.fonts;
|
||||
{
|
||||
options.stylix.targets.bemenu = {
|
||||
enable = config.lib.stylix.mkEnableTarget "bemenu" true;
|
||||
fontSize = lib.mkOption { type = lib.types.str; default = ""; }; # optional argument
|
||||
alternate = lib.mkOption { type = lib.types.bool; default = false; };
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = lib.mkIf config.stylix.targets.mako.enable [{
|
||||
home.sessionVariables.BEMENU_OPTS = with config.stylix.targets.bemenu; builtins.concatStringsSep " " [
|
||||
# Inspired from https://git.sr.ht/~h4n1/base16-bemenu_opts
|
||||
"--tb '${base01}'"
|
||||
"--nb '${base01}'"
|
||||
"--fb '${base01}'"
|
||||
"--hb '${base03}'"
|
||||
"--sb '${base03}'"
|
||||
"--hf '${base0A}'"
|
||||
"--sf '${base0B}'"
|
||||
"--tf '${base05}'"
|
||||
"--ff '${base05}'"
|
||||
"--nf '${base05}'"
|
||||
"--scb '${base01}'"
|
||||
"--scf '${base03}'"
|
||||
# Alternating colours, currently set to match primary. Adding a module option to enable or disable alternating in Stylix could be useful
|
||||
"--ab '${if alternate then base00 else base01}'"
|
||||
"--af '${if alternate then base04 else base05}'"
|
||||
|
||||
"--fn '${sansSerif.name} ${fontSize}'"
|
||||
];
|
||||
}];
|
||||
}
|
Loading…
Add table
Reference in a new issue