diff --git a/home/rofi/default.nix b/home/rofi/default.nix index 9487a88..544eeb4 100644 --- a/home/rofi/default.nix +++ b/home/rofi/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{ config, lib, ... }: { programs.rofi = { enable = true; cycle = false; @@ -19,6 +19,96 @@ me-accept-entry = "MousePrimary"; }; - theme = lib.mkForce ./launchpad.rasi; + theme = let inherit (config.lib.formats.rasi) mkLiteral; in lib.mkForce { + "*" = { + font = "Noto Sans CJK JP Bold 12"; + + bg0 = mkLiteral "#242424dd"; + bg1 = mkLiteral "#363636"; + bg2 = mkLiteral "#f5f5f520"; + bg3 = mkLiteral "#f5f5f540"; + bg4 = mkLiteral "#0860f2E6"; + + fg0 = mkLiteral "#f5f5f5"; + fg1 = mkLiteral "#f5f5f580"; + + background-color = mkLiteral "transparent"; + foreground = mkLiteral "#f8f8f2"; + text-color = mkLiteral "@fg0"; + padding = mkLiteral "0px"; + margin = mkLiteral "0px"; + }; + + window = { + fullscreen = true; + padding = mkLiteral "1em"; + background-color = mkLiteral "@bg0"; + }; + + mainbox = { + padding = mkLiteral "8px"; + }; + + inputbar = { + background-color = mkLiteral "@bg2"; + + margin = mkLiteral "0px calc( 50% - 230px )"; + padding = mkLiteral "4px 8px"; + spacing = mkLiteral "8px"; + + border = mkLiteral "1px"; + border-radius = mkLiteral "2px"; + border-color = mkLiteral "@bg3"; + + children = map mkLiteral [ "icon-search" "entry" ]; + }; + + prompt = { + enabled = false; + }; + + icon-search = { + expand = false; + filename = "search"; + vertical-align = mkLiteral "0.5"; + }; + + entry = { + placeholder = "Search"; + placeholder-color = mkLiteral "@bg2"; + }; + + listview = { + margin = mkLiteral "48px calc( 50% - 560px )"; + spacing = mkLiteral "48px"; + columns = 5; + fixed-columns = true; + }; + + "element, element-text, element-icon" = { + cursor = mkLiteral "pointer"; + }; + + element = { + padding = mkLiteral "8px"; + spacing = mkLiteral "4px"; + + orientation = mkLiteral "vertical"; + border-radius = mkLiteral "16px"; + }; + + "element selected" = { + background-color = mkLiteral "rgba(248, 248, 242, 0.3)"; + }; + + element-icon = { + size = mkLiteral "5em"; + horizontal-align = mkLiteral "0.5"; + }; + + element-text = { + horizontal-align = mkLiteral "0.5"; + }; + }; }; } diff --git a/home/rofi/launchpad.rasi b/home/rofi/launchpad.rasi deleted file mode 100644 index 1f7913b..0000000 --- a/home/rofi/launchpad.rasi +++ /dev/null @@ -1,97 +0,0 @@ -/* - Based on Newman Sánchez's Launchpad theme. - https://github.com/newmanls/rofi-themes-collection -*/ - -* { - font: "Noto Sans CJK JP Bold 12"; - - bg0: #242424dd; - bg1: #363636; - bg2: #f5f5f520; - bg3: #f5f5f540; - bg4: #0860f2E6; - - fg0: #f5f5f5; - fg1: #f5f5f580; - - background-color: transparent; - foreground: #f8f8f2; - text-color: @fg0; - padding: 0px; - margin: 0px; -} - -window { - fullscreen: true; - padding: 1em; - background-color: @bg0; - background-color: rgba(39, 40, 34, 0.9); -} - -mainbox { - padding: 8px; -} - -inputbar { - background-color: @bg2; - - margin: 0px calc( 50% - 230px ); - padding: 4px 8px; - spacing: 8px; - - border: 1px; - border-radius: 2px; - border-color: @bg3; - - children: [icon-search,entry]; -} - -prompt { - enabled: false; -} - -icon-search { - expand: false; - filename: "search"; - vertical-align: 0.5; -} - -entry { - placeholder: "Search"; - placeholder-color: @bg2; -} - -listview { - margin: 48px calc( 50% - 560px ); - spacing: 48px; - columns: 5; - fixed-columns: true; -} - -element, element-text, element-icon { - cursor: pointer; -} - -element { - padding: 8px; - spacing: 4px; - - orientation: vertical; - border-radius: 16px; -} - -element selected { - background-color: rgba(248, 248, 242, 0.3); -} - -element-icon { - size: 5em; - horizontal-align: 0.5; -} - -element-text { - horizontal-align: 0.5; -} - -// vim:syn=css