summaryrefslogtreecommitdiff
path: root/modules/desktop/wofi
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-23 22:33:44 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-23 22:33:44 -0400
commit328c741b1aac74020412e99e0dca7c728dbc92fa (patch)
tree461f4ebcd3252d542749a34668defd62de356c73 /modules/desktop/wofi
parentremoved unused packages (diff)
downloaddotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.tar.gz
dotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.tar.bz2
dotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.zip
refactor
Diffstat (limited to 'modules/desktop/wofi')
-rw-r--r--modules/desktop/wofi/default.nix29
-rw-r--r--modules/desktop/wofi/style.nix74
2 files changed, 103 insertions, 0 deletions
diff --git a/modules/desktop/wofi/default.nix b/modules/desktop/wofi/default.nix
new file mode 100644
index 0000000..aa04495
--- /dev/null
+++ b/modules/desktop/wofi/default.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.desktop;
+in {
+ config = mkIf cfg.wofi {
+ default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'";
+
+ home-manager.users.${config.user} = {
+ 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/modules/desktop/wofi/style.nix b/modules/desktop/wofi/style.nix
new file mode 100644
index 0000000..27b7205
--- /dev/null
+++ b/modules/desktop/wofi/style.nix
@@ -0,0 +1,74 @@
+{theme}: let
+ fg = "#${theme.colors.fg}";
+ bg = "#${theme.colors.bg}";
+ surface-fg = "#${theme.colors.surface.fg}";
+ surface-bg = "#${theme.colors.surface.bg}";
+ 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: ${bg};
+ }
+
+ /* Outer Box */
+ #outer-box {
+ padding: ${outerGap};
+ }
+
+ /* Scroll */
+ #scroll {
+ margin: 0px;
+ padding: ${innerGap};
+ border: none;
+ }
+
+ /* Input */
+ #input {
+ margin: ${innerGap};
+ padding: ${innerGap};
+ border: none;
+ color: ${surface-fg};
+ background-color: ${surface-bg};
+ 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: ${fg};
+ }
+
+ /* Selected Entry */
+ #entry:selected {
+ background-color: ${primary};
+ border-radius: ${outerRadius};
+ }
+
+ #entry:selected #text {
+ color: ${bg};
+ }
+
+''