feat: rofi launcher styling

This commit is contained in:
Guz
2025-02-08 18:38:07 -03:00
parent 27c89326c2
commit cae7376926
3 changed files with 35 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
self.homeManagerModules.zen-browser
./apps.nix
./style.nix
./desktop.nix
./keymaps.nix
];

View File

@@ -73,7 +73,13 @@
# Web Browser
"super-w" = {launch = exec ["xdg-open" "https://search.brave.com"];};
# Launcher
"super-s" = {launch = exec ["${rofi}" "-show" "drun" "-show-icons"];};
"super-s" = {
launch = exec [
(lib.getExe (pkgs.writeShellScriptBin "launcher" ''
${rofi} -show drun -theme ${config.xdg.configHome}/rofi/launcher.rasi
''))
];
};
# Toggle fullscreen
"super-f" = {launch = toggleFullscreen "";};
# Toggle floating

27
home/guz-lite/style.nix Normal file
View File

@@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}: {
# Rofi themes
home.file."${config.xdg.configHome}/rofi/launcher.rasi".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/adi1090x/rofi/2e0efe5054ac7eb502a585dd6b3575a65b80ce72/files/launchers/type-1/style-3.rasi";
hash = "sha256-6Zj1mxRDkARdIWiin3J7BPp/vqfktvidUK/yqLN+k1o=";
};
home.file."${config.xdg.configHome}/rofi/shared/colors.rasi".text = with config.lib.stylix.colors; ''
* {
background: #${base02}FF;
background-alt: #${base01}FF;
foreground: #${base05}FF;
selected: #${base02}FF;
active: #${base00}FF;
urgent: #${base08}FF;
}
'';
home.file."${config.xdg.configHome}/rofi/shared/fonts.rasi".text = ''
* {
font: "${config.stylix.fonts.sansSerif.name}";
}
'';
}