Home: Disable ROFI menus depending on networkmanager availability
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
# VPN and Container modules should use this rofi module to enable their menus then
|
# VPN and Container modules should use this rofi module to enable their menus then
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
nixosConfig,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -146,16 +147,18 @@ in {
|
|||||||
|
|
||||||
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);
|
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);
|
||||||
keybinds-menu = pkgs.writeScript "rofi-menu-keybinds" (builtins.readFile ./menus/keybinds.fish);
|
keybinds-menu = pkgs.writeScript "rofi-menu-keybinds" (builtins.readFile ./menus/keybinds.fish);
|
||||||
|
|
||||||
# TODO: Expand on that
|
|
||||||
lectures-menu = pkgs.writeScript "rofi-menu-lectures" (builtins.readFile ./menus/lectures.fish);
|
lectures-menu = pkgs.writeScript "rofi-menu-lectures" (builtins.readFile ./menus/lectures.fish);
|
||||||
in {
|
in {
|
||||||
bindings = {
|
bindings = lib.mergeAttrsList [
|
||||||
|
{
|
||||||
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
||||||
"$mainMod, O" = ["exec, \"${lectures-menu}\""];
|
|
||||||
"$mainMod, M" = ["exec, \"${keybinds-menu}\""];
|
"$mainMod, M" = ["exec, \"${keybinds-menu}\""];
|
||||||
|
# "$mainMod, O" = ["exec, \"${lectures-menu}\""]; # TODO: Broken, expand on that
|
||||||
|
}
|
||||||
|
(lib.optionalAttrs (!nixosConfig.modules.network.useNetworkManager) {
|
||||||
"$mainMod, U" = ["exec, \"${vpn-menu}\""];
|
"$mainMod, U" = ["exec, \"${vpn-menu}\""];
|
||||||
};
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user