From 9a9a94d55d3723cb78ef2b3293bcda08e1fd0017 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Sun, 8 Dec 2024 06:16:56 +0100 Subject: [PATCH] added rofi --- modules/wm_and_de/components/rofi.nix | 132 ++++++++++++++++++++++++++ modules/wm_and_de/hyprland.nix | 3 + 2 files changed, 135 insertions(+) create mode 100644 modules/wm_and_de/components/rofi.nix diff --git a/modules/wm_and_de/components/rofi.nix b/modules/wm_and_de/components/rofi.nix new file mode 100644 index 0000000..74c398f --- /dev/null +++ b/modules/wm_and_de/components/rofi.nix @@ -0,0 +1,132 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + rofi-wayland + ]; + + xdg.configFile."rofi/theme.rasi".text = '' + * { + bg-col: #1D2021; + bg-col-light: #282828; + border-col: #A89984; + selected-col: #3C3836; + green: #98971A; + fg-col: #FBF1C7; + fg-col2: #EBDBB2; + grey: #BDAE93; + highlight: @green; + } + ''; + + xdg.configFile."rofi/config.rasi".text = '' + configuration{ + modi: "run,drun,window"; + lines: 5; + cycle: false; + font: "JetBrainsMono NF Bold 15"; + show-icons: true; + icon-theme: "Papirus-dark"; + terminal: "kitty"; + drun-display-format: "{icon} {name}"; + location: 0; + disable-history: true; + hide-scrollbar: true; + display-drun: " Apps "; + display-run: " Run "; + display-window: " Window "; + /* display-Network: " Network"; */ + sidebar-mode: true; + sorting-method: "fzf"; + } + + @theme "theme" + + element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; + } + + window { + height: 600px; + width: 900px; + border: 2px; + border-color: @border-col; + background-color: @bg-col; + } + + mainbox { + background-color: @bg-col; + } + + inputbar { + children: [prompt,entry]; + background-color: @bg-col-light; + border-radius: 5px; + padding: 0px; + } + + prompt { + background-color: @green; + padding: 4px; + text-color: @bg-col-light; + border-radius: 3px; + margin: 10px 0px 10px 10px; + } + + textbox-prompt-colon { + expand: false; + str: ":"; + } + + entry { + padding: 6px; + margin: 10px 10px 10px 5px; + text-color: @fg-col; + background-color: @bg-col; + border-radius: 3px; + } + + listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 6px; + columns: 3; + background-color: @bg-col; + cycle: true; + } + + element { + padding: 8px; + margin: 0px 10px 4px 4px; + background-color: @bg-col; + text-color: @fg-col; + } + + element-icon { + size: 28px; + } + + element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; + border-radius: 3px; + } + + mode-switcher { + spacing: 0; + } + + button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; + } + + button selected { + background-color: @bg-col; + text-color: @green; + } + ''; +} diff --git a/modules/wm_and_de/hyprland.nix b/modules/wm_and_de/hyprland.nix index 06d4f07..3bbaac6 100644 --- a/modules/wm_and_de/hyprland.nix +++ b/modules/wm_and_de/hyprland.nix @@ -1,4 +1,7 @@ {pkgs, ...}: { + import = [ + ./components/rofi.nix + ]; # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver.enable = false;