~ruther/nixos-config

ref: e09f66ea4c31e95a365292a03d39ef3ffcda608b nixos-config/modules/programs/rofi.nix -rw-r--r-- 2.9 KiB
e09f66ea — Rutherther fix: add necessary firewall syncthing settings 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# System Menu
#

{ config, lib, pkgs, ... }:

let
  inherit (config.lib.formats.rasi) mkLiteral;        # Theme.rasi alternative. Add Theme here
  colors = import ../themes/colors.nix;
in
{
  config = lib.mkIf (config.xsession.enable) {
    home = {
      packages = with pkgs; [
        rofi-power-menu
      ];
    };

    programs = {
      rofi = {
        enable = true;
        terminal = "${pkgs.alacritty}/bin/alacritty";           # Alacritty is default terminal emulator
        location = "center";
        font = "FiraCode Nerd Font Mono 11";
        theme =  with colors.scheme.doom; {
          "*" = {
            bg0 = mkLiteral "#${bg}";
            bg1 = mkLiteral "#414868";
            fg0 = mkLiteral "#${text}";
            fg1 = mkLiteral "#${text-alt}";

            background-color = mkLiteral "transparent";
            text-color = mkLiteral "@fg0";

            margin = 0;
            padding = 0;
            spacing = 0;
          };

          "element-icon, element-text, scrollbar" = {
            cursor = mkLiteral "pointer";
          };

          "window" = {
            location = mkLiteral "northwest";
            width = mkLiteral "280px";
            x-offset = mkLiteral "8px";
            y-offset = mkLiteral "34px";

            background-color = mkLiteral "@bg0";
            border = mkLiteral "1px";
            border-color = mkLiteral "@bg1";
            border-radius = mkLiteral "6px";
          };

          "inputbar" = {
            spacing = mkLiteral "8px";
            padding = mkLiteral "4px 8px";
            children = mkLiteral "[ entry ]";
            background-color = mkLiteral "@bg0";
          };

          "entry, element-icon, element-text" = {
            vertical-align = mkLiteral "0.5";
          };

          "textbox" = {
            padding = mkLiteral "4px 8px";
            background-color = mkLiteral "@bg0";
          };

          "listview" = {
            padding = mkLiteral "4px 0px";
            lines = 6;
            columns = 1;
            scrollbar = true;
          };

          "element" = {
            padding = mkLiteral "4px 8px";
            spacing = mkLiteral "8px";
          };

          "element normal urgent" = {
            text-color = mkLiteral "@fg1";
          };

          "element normal active" = {
            text-color = mkLiteral "@fg1";
          };

          "element selected" = {
            text-color = mkLiteral "@bg0"; #1
            background-color = mkLiteral "@fg1";
          };

          "element selected urgent" = {
            background-color = mkLiteral "@fg1";
          };

          "element-icon" = {
            size = mkLiteral "0.8em";
          };

          "element-text" = {
            text-color = mkLiteral "inherit";
          };

          "scrollbar" = {
            handle-width = mkLiteral "4px";
            handle-color = mkLiteral "@fg1";
            padding = mkLiteral "0 4px";
          };
        };
      };
    };
  };
}
Do not follow this link