49 lines
1.7 KiB
Nix
49 lines
1.7 KiB
Nix
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
let
|
|
cfg = config.samfelag.modules.desktop.rofi;
|
|
hyprCfg = config.samfelag.modules.desktop.hyprland;
|
|
nix-colors-lib = inputs.nix-colors.lib-contrib { inherit pkgs; };
|
|
in
|
|
{
|
|
options.samfelag.modules.desktop.rofi = {
|
|
enable = lib.mkEnableOption "rofi";
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs;
|
|
if hyprCfg.enable then [
|
|
rofi-wayland
|
|
] else [
|
|
rofi
|
|
];
|
|
|
|
hm.xdg.configFile."rofi/menus".source = ../../config/rofi/menus;
|
|
hm.xdg.configFile."rofi/nix.png".source = nix-colors-lib.nixWallpaperFromScheme {
|
|
scheme = config.colorScheme;
|
|
width = 600;
|
|
height = 600;
|
|
logoScale = 2.0;
|
|
};
|
|
|
|
# Themeing ---------------------------------
|
|
hm.xdg.configFile."rofi/theme.rasi".text = ''
|
|
* {
|
|
font: "Iosevka Nerd Font 10";
|
|
background: #${config.colorScheme.palette.base00};
|
|
background-alt: #${config.colorScheme.palette.base02};
|
|
foreground: #${config.colorScheme.palette.base05};
|
|
selected: #${config.colorScheme.palette.base03};
|
|
active: #${config.colorScheme.palette.base07};
|
|
urgent: #${config.colorScheme.palette.base06};
|
|
}
|
|
'';
|
|
|
|
samfelag.modules.desktop.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
|
"${hyprCfg.mod}, SPACE, exec, $HOME/.config/rofi/menus/launcher/launcher.sh"
|
|
"${hyprCfg.mod}, END, exec, $HOME/.config/rofi/menus/powermenu/powermenu.sh"
|
|
"${hyprCfg.mod} SHIFT, W, exec, $HOME/.config/rofi/menus/wifi/wifi.sh"
|
|
];
|
|
|
|
};
|
|
}
|