From 1ac2a2a8c227827da5c045cbcd0c95c3af227fd1 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 26 Jun 2022 12:56:14 +0200 Subject: desktop/rofi: use wayland package --- usecases/desktop/graphical/rofi.nix | 195 ++++++++++++++++++------------------ 1 file changed, 99 insertions(+), 96 deletions(-) diff --git a/usecases/desktop/graphical/rofi.nix b/usecases/desktop/graphical/rofi.nix index 0013f5c..a4e9ab3 100644 --- a/usecases/desktop/graphical/rofi.nix +++ b/usecases/desktop/graphical/rofi.nix @@ -1,102 +1,105 @@ -inputs: - -{ config, ... }: - -{ +_inputs: { + config, + pkgs, + ... +}: { home-manager.users.minijackson.programs.rofi = { enable = true; + package = with pkgs; rofi-wayland.override {plugins = [rofi-emoji];}; + # TODO: there is a better way - theme = with config.theme.colors; builtins.toFile "theme.rasi" '' - * { - dominant: ${dominant}; - - foreground: ${foreground}; - dim-foreground: ${dimForeground}; - - text-color: @foreground; - border-color: @dim-foreground; - - background-color: ${background}; - light-background: ${lightBackground}; - } - - #window { - padding: 8px; - - border: 1px solid; - background-color: @background; - } - - #mainbox { - border: 0; - padding: 0; - } - - #inputbar { - spacing: 0; - padding: 5px; - border: 0 0 1px 0; - margin: 0 0 8px 0; - children: [ prompt, textbox-prompt-sep, entry ]; - } - - #prompt { - background-color: @background; - text-color: @dim-foreground; - } - - textbox-prompt-sep { - expand: false; - str: ":"; - text-color: @dim-foreground; - margin: 0 8px 0 0; - } - - #message { - spacing: 0; - padding: 5px; - border: 0 0 1px 0; - margin: 0 0 8px 0; - } - - #listview { - spacing: 0; - } - - #element { - border: 0; - padding: 5px; - - background-color: @background; - } - - #element.selected.normal { - background-color: @dominant; - } - - #element.urgent { - background-color: ${fadedRed}; - } - - #element.selected.urgent { - background-color: ${neutralRed}; - } - - #element.active { - background-color: ${dimForeground}; - text-color: ${background}; - } - - #element.selected.active { - background-color: ${foreground}; - text-color: ${background}; - } - - #scrollbar { - width: 4px; - handle-width: 8px; - } - ''; + theme = with config.theme.colors; + builtins.toFile "theme.rasi" '' + * { + dominant: ${dominant}; + + foreground: ${foreground}; + dim-foreground: ${dimForeground}; + + text-color: @foreground; + border-color: @dim-foreground; + + background-color: ${background}; + light-background: ${lightBackground}; + } + + #window { + padding: 8px; + + border: 1px solid; + background-color: @background; + } + + #mainbox { + border: 0; + padding: 0; + } + + #inputbar { + spacing: 0; + padding: 5px; + border: 0 0 1px 0; + margin: 0 0 8px 0; + children: [ prompt, textbox-prompt-sep, entry ]; + } + + #prompt { + background-color: @background; + text-color: @dim-foreground; + } + + textbox-prompt-sep { + expand: false; + str: ":"; + text-color: @dim-foreground; + margin: 0 8px 0 0; + } + + #message { + spacing: 0; + padding: 5px; + border: 0 0 1px 0; + margin: 0 0 8px 0; + } + + #listview { + spacing: 0; + } + + #element { + border: 0; + padding: 5px; + + background-color: @background; + } + + #element.selected.normal { + background-color: @dominant; + } + + #element.urgent { + background-color: ${fadedRed}; + } + + #element.selected.urgent { + background-color: ${neutralRed}; + } + + #element.active { + background-color: ${dimForeground}; + text-color: ${background}; + } + + #element.selected.active { + background-color: ${foreground}; + text-color: ${background}; + } + + #scrollbar { + width: 4px; + handle-width: 8px; + } + ''; }; } -- cgit v1.2.3