summaryrefslogtreecommitdiff
path: root/nix/programs/wofi
diff options
context:
space:
mode:
Diffstat (limited to 'nix/programs/wofi')
-rw-r--r--nix/programs/wofi/default.nix24
-rw-r--r--nix/programs/wofi/style.nix80
2 files changed, 104 insertions, 0 deletions
diff --git a/nix/programs/wofi/default.nix b/nix/programs/wofi/default.nix
new file mode 100644
index 0000000..cb08b43
--- /dev/null
+++ b/nix/programs/wofi/default.nix
@@ -0,0 +1,24 @@
+{ config, lib, ... }:
+
+{
+ 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/nix/programs/wofi/style.nix b/nix/programs/wofi/style.nix
new file mode 100644
index 0000000..b73ae28
--- /dev/null
+++ b/nix/programs/wofi/style.nix
@@ -0,0 +1,80 @@
+{ theme }:
+
+let
+
+ accentColor = "#${theme.colors.accent}";
+ textColor = "#${theme.colors.base05}";
+ baseColor = "#${theme.colors.base00}";
+ surfaceColor = "#${theme.colors.base02}";
+ 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 ${accentColor};
+ border-radius: ${outerRadius};
+ background-color: ${baseColor};
+}
+
+/* Outer Box */
+#outer-box {
+ padding: ${outerGap};
+}
+
+/* Scroll */
+#scroll {
+ margin: 0px;
+ padding: ${innerGap};
+ border: none;
+}
+
+/* Input */
+#input {
+ margin: ${innerGap};
+ padding: ${innerGap};
+ border: none;
+ color: ${textColor};
+ background-color: ${surfaceColor};
+ border-radius: ${outerRadius};
+}
+
+#input:focus,
+#input:active {
+ border: ${borderWidth} solid ${accentColor};
+ box-shadow: none;
+ outline: none;
+}
+
+/* Text */
+#text {
+ margin: ${innerGap};
+ padding: ${innerGap};
+ border: none;
+ color: ${textColor};
+}
+
+/* Selected Entry */
+#entry:selected {
+ background-color: ${accentColor};
+ border-radius: ${outerRadius};
+}
+
+#entry:selected #text {
+ color: ${baseColor};
+}
+
+''
+