summaryrefslogtreecommitdiff
path: root/common/programs/rofi.nix
blob: d0abd1a10eda84d7eded2f48a3bf967678cdcda6 (plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
  config,
  pkgs,
  lib,
  ...
}:
{
  programs.rofi = {
    enable = true;
    font = "IosevkaInput";
    # plugins = with pkgs; [ rofi-emoji ];
    theme = "~/.config/rofi/themes/config.rasi";
    extraConfig = {
      show-icons = true;
      # drun-display-format = "{name}";
    };
  };

  home.packages = [
    pkgs.rofi-power-menu
  ];

  xdg.configFile = {
    "rofi/shared/colors.rasi" = {
      enable = !config.beeMods.matugen.enable;
      text =
        # rasi
        ''
          * {
              bg:          #212121;
              bg-alt:      #2d2d2d;
              fg:          #ffffffdd;
              fg-dim:      #616161;
              accent:      #80cbc4;
              selected-bg: #424242;
              selected-fg: #80cbc4;
              urgent:      #ef9a9a;
              outline:     #424242;
          }
        '';
    };

    "rofi/themes/config.rasi" = {
      enable = true;
      text =
        # rasi
        ''
          @import "shared/colors.rasi"
          * {
              background-color: transparent;
              text-color:       @fg;
              border:           0px;
              margin:           0px;
              padding:          0px;
              spacing:          0px;
          }

          window {
              background-color: @bg;
              border-radius:    0px;
              border:           2px;
              border-color:     @outline;
              width:            680px;
              padding:          10px;
          }

          mainbox {
              background-color: transparent;
              spacing:          8px;
          }

          inputbar {
              background-color: @bg-alt;
              border-radius:    0px;
              padding:          10px 12px;
              spacing:          8px;
              children:         [entry];
          }

          entry {
              background-color:  transparent;
              text-color:        @fg;
              placeholder-color: @fg-dim;
              placeholder:       "Search...";
              cursor:            text;
              font:              "IosevkaInput 13";
          }

          listview {
              background-color: transparent;
              columns:          1;
              lines:            5;
              spacing:          2px;
              scrollbar:        false;
          }

          element {
              background-color: transparent;
              border-radius:    0px;
              padding:          8px 12px;
              spacing:          12px;
              children:         [element-icon, element-text];
          }

          element normal normal {
              background-color: transparent;
              text-color:       @fg;
          }

          element alternate normal {
              background-color: transparent;
              text-color:       @fg;
          }

          element selected normal {
              background-color: @selected-bg;
              text-color:       @selected-fg;
          }

          element normal urgent {
              text-color: @urgent;
          }

          element selected urgent {
              background-color: @selected-bg;
              text-color:       @urgent;
          }

          element-icon {
              background-color: transparent;
              size:             22px;
          }

          element-text {
              background-color: transparent;
              text-color:       inherit;
              vertical-align:   0.5;
              font:             "IosevkaInput 13";
          }
        '';
    };

  };
}