2024-09-09 00:22:14 +00:00
|
|
|
{
|
2024-09-13 01:50:53 +00:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-09-15 23:22:23 +00:00
|
|
|
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
|
|
|
|
2024-09-13 01:50:53 +00:00
|
|
|
cfg = config.custom.programs.networkmanager-dmenu;
|
|
|
|
in {
|
|
|
|
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
|
|
|
# https://github.com/firecat53/networkmanager-dmenu
|
|
|
|
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
|
|
|
#!! Option not available, files written directly
|
|
|
|
# FIXME: active_chars does not take effect
|
2024-09-15 23:22:23 +00:00
|
|
|
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
2024-09-13 01:50:53 +00:00
|
|
|
[dmenu]
|
2024-09-15 23:22:23 +00:00
|
|
|
dmenu_command = ${menu} --input
|
2024-09-13 01:50:53 +00:00
|
|
|
active_chars = >
|
|
|
|
wifi_icons =
|
|
|
|
format = {icon} {name}
|
|
|
|
'';
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
}
|