diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-01-05 15:19:33 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-01-05 15:19:33 -0500 |
| commit | 1581a9c31d68e42ebec8e69c84a1a7441155bc90 (patch) | |
| tree | e0d039f565789455127aed179f1bad11cb4f8b90 /home/apps | |
| parent | fix wofi, and switch back to it (diff) | |
| download | dotfiles-nix-1581a9c31d68e42ebec8e69c84a1a7441155bc90.tar.gz dotfiles-nix-1581a9c31d68e42ebec8e69c84a1a7441155bc90.tar.bz2 dotfiles-nix-1581a9c31d68e42ebec8e69c84a1a7441155bc90.zip | |
rofiiiiiiii
Diffstat (limited to 'home/apps')
| -rw-r--r-- | home/apps/default.nix | 1 | ||||
| -rw-r--r-- | home/apps/rofi/config.rasi | 99 | ||||
| -rw-r--r-- | home/apps/rofi/default.nix | 23 | ||||
| -rw-r--r-- | home/apps/rofi/theme.nix | 27 |
4 files changed, 150 insertions, 0 deletions
diff --git a/home/apps/default.nix b/home/apps/default.nix index 58cd117..ebbd605 100644 --- a/home/apps/default.nix +++ b/home/apps/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./rofi ./waybar ./wofi ./alacritty.nix diff --git a/home/apps/rofi/config.rasi b/home/apps/rofi/config.rasi new file mode 100644 index 0000000..8d8b1a4 --- /dev/null +++ b/home/apps/rofi/config.rasi @@ -0,0 +1,99 @@ +configuration { + modi: "drun"; + drun-match-fields: "name"; + matching: "glob"; + sort: true; + show-icons: true; + font: "JetBrainsMono Nerd Font 10"; +} + +@theme "~/.config/rofi/theme.rasi" + +window { + height: 30em; + width: 57em; + padding: @border-width; + background-color: @primary; + border-color: @primary; + border-radius: @outer-radius; +} + +mainbox { + orientation: horizontal; + children: [ "inputbar" , "listbox" ]; + background-color: @base; + border-radius: @outer-radius; +} + +inputbar { + width: 27em; + children: [ "entry" ]; + background-image: @background; +} + +entry { + enabled: false; +} + +listbox { + margin: 1em; + children: [ "dummy" , "listview" , "dummy" ]; + background-color: transparent; +} + +listview { + columns: 1; + lines: 7; + scrollbar: false; + expand: false; + fixed-height: true; + fixed-columns: true; + text-color: @text; + background-color: transparent; +} + +dummy { + background-color: transparent; +} + +element { + spacing: 1em; + padding: 0.5em 0.5em 0.5em 1.5em; + cursor: pointer; + text-color: @text; + background-color: transparent; + border-radius: @inner-radius; +} + +element selected.normal { + text-color: @surface; + background-color: @primary; +} + +element-icon { + size: 2.7em; + cursor: inherit; + text-color: inherit; + background-color: transparent; +} + +element-text { + vertical-align: 0.5; + horizontal-align: 0.0; + text-color: inherit; + background-color: transparent; +} + +error-message { + text-color: @text; + background-color: @base; + text-transform: capitalize; + children: [ "textbox" ]; +} + +textbox { + text-color: @error; + background-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} diff --git a/home/apps/rofi/default.nix b/home/apps/rofi/default.nix new file mode 100644 index 0000000..80c88a2 --- /dev/null +++ b/home/apps/rofi/default.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; + theme = config.theme; + cfg = config.apps.rofi; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkOverride 700 "rofi -show drun"; + + home.packages = [ + pkgs.rofi + ]; + + home.file = { + ".config/rofi/config.rasi".source = ./config.rasi; + ".config/rofi/theme.rasi".text = import ./theme.nix {inherit theme;}; + }; + }; +} diff --git a/home/apps/rofi/theme.nix b/home/apps/rofi/theme.nix new file mode 100644 index 0000000..891b5a3 --- /dev/null +++ b/home/apps/rofi/theme.nix @@ -0,0 +1,27 @@ +{theme}: let + text = "#${theme.colors.text}"; + base = "#${theme.colors.base}"; + surface = "#${theme.colors.surface}"; + primary = "#${theme.colors.primary}"; + error = "#${theme.colors.error}"; + outerGap = "${toString theme.outerGap}px"; + innerGap = "${toString theme.innerGap}px"; + outerRadius = "${toString theme.outerRadius}px"; + innerRadius = "${toString theme.innerRadius}px"; + borderWidth = "${toString theme.borderWidth}px"; + wallpaper = theme.wallpaper; +in '' + * { + primary: ${primary}; + error: ${error}; + base: ${base}; + surface: ${surface}; + text: ${text}; + inner-radius: ${innerRadius}; + outer-radius: ${outerRadius}; + inner-gap: ${innerGap}; + outer-gap: ${outerGap}; + border-width: ${borderWidth}; + background: url("${wallpaper}", height); + } +'' |