From 68d03fe362b7e0df11662d8d6a1e01eac0bfae77 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 17 Sep 2025 22:07:16 -0400 Subject: refactor: remove modules folder, fully split home and system modules --- home/apps/wofi/default.nix | 27 +++++++++++++++++ home/apps/wofi/style.nix | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 home/apps/wofi/default.nix create mode 100644 home/apps/wofi/style.nix (limited to 'home/apps/wofi') diff --git a/home/apps/wofi/default.nix b/home/apps/wofi/default.nix new file mode 100644 index 0000000..2de9f45 --- /dev/null +++ b/home/apps/wofi/default.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.wofi; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; + + programs.wofi = { + enable = true; + + settings = { + key_expand = "Tab"; + term = "kitty"; + matching = "multi-contains"; + insensitive = true; + gtk_dark = true; + hide_scroll = true; + }; + + style = import ./style.nix {theme = config.theme;}; + }; + }; +} diff --git a/home/apps/wofi/style.nix b/home/apps/wofi/style.nix new file mode 100644 index 0000000..75a0a21 --- /dev/null +++ b/home/apps/wofi/style.nix @@ -0,0 +1,73 @@ +{theme}: let + text = "#${theme.colors.text}"; + base = "#${theme.colors.base}"; + surface = "#${theme.colors.surface}"; + primary = "#${theme.colors.primary}"; + fontSize = "${toString theme.font.size}px"; + 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"; +in '' + * { + font-family: ${theme.font.monospace}; + font-size: ${fontSize}; + } + + /* Window */ + window { + margin: 0px; + border: ${borderWidth} solid ${primary}; + border-radius: ${outerRadius}; + background-color: ${base}; + } + + /* Outer Box */ + #outer-box { + padding: ${outerGap}; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: ${innerGap}; + border: none; + } + + /* Input */ + #input { + margin: ${innerGap}; + padding: ${innerGap}; + border: none; + color: ${text}; + background-color: ${surface}; + border-radius: ${outerRadius}; + } + + #input:focus, + #input:active { + border: ${borderWidth} solid ${primary}; + box-shadow: none; + outline: none; + } + + /* Text */ + #text { + margin: ${innerGap}; + padding: ${innerGap}; + border: none; + color: ${text}; + } + + /* Selected Entry */ + #entry:selected { + background-color: ${primary}; + border-radius: ${outerRadius}; + } + + #entry:selected #text { + color: ${base}; + } + +'' -- cgit v1.2.3-freya