summaryrefslogtreecommitdiff
path: root/modules/apps/wofi/style.nix
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-27 16:39:14 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-27 16:39:14 -0400
commit2e4c4298cf84f94d68387e8076fd430e9968ce6c (patch)
tree2a43fa6d4659fe2585c75aeec3ee4d5e0a42de2e /modules/apps/wofi/style.nix
parentfmt (diff)
downloaddotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.gz
dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.bz2
dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.zip
refactor
Diffstat (limited to 'modules/apps/wofi/style.nix')
-rw-r--r--modules/apps/wofi/style.nix73
1 files changed, 73 insertions, 0 deletions
diff --git a/modules/apps/wofi/style.nix b/modules/apps/wofi/style.nix
new file mode 100644
index 0000000..75a0a21
--- /dev/null
+++ b/modules/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};
+ }
+
+''