aboutsummaryrefslogtreecommitdiff
path: root/home/rices/cassette-futurism/xfce.nix
blob: 8eca98adf96d52dd6a0a467b7db33e9b123a57eb (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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
{
  config,
  pkgs,
  lib,
  ...
}: let
  vars = import ./variables.nix;
  c = vars.colors;
in {
  # XFCE configuration with manual cassette futurism theming
  # Stylix is disabled for XFCE - all colors set manually

  # GTK theme - manually configured with cassette futurism colors
  gtk = {
    enable = true;

    theme = {
      name = "Adwaita-dark";
      package = pkgs.gnome-themes-extra;
    };

    iconTheme = {
      name = "Adwaita";
      package = pkgs.adwaita-icon-theme;
    };

    font = {
      name = "Noto Sans";
      size = 11;
    };

    gtk2.extraConfig = ''
      gtk-application-prefer-dark-theme = 1
    '';

    gtk3.extraConfig = {
      gtk-application-prefer-dark-theme = 1;
    };

    # Custom CSS for cassette futurism aesthetic
    gtk3.extraCss = ''
      /* Cassette Futurism GTK3 Theme */

      /* Hide menubars globally */
      .menubar {
        opacity: 0;
        min-height: 0;
        padding: 0;
        margin: 0;
      }

      /* Base colors */
      * {
        outline-color: ${c.cyan};
        outline-width: 1px;
      }

      /* Window backgrounds */
      window {
        background-color: ${c.background};
        color: ${c.foreground};
      }

      /* Selections */
      selection {
        background-color: ${c.gray2};
        color: ${c.cyan};
      }

      /* Buttons */
      button {
        background-color: ${c.gray2};
        color: ${c.foreground};
        border: 1px solid ${c.gray4};
      }

      button:hover {
        background-color: ${c.gray3};
        border-color: ${c.cyan};
      }

      button:active {
        background-color: ${c.gray4};
        color: ${c.cyan};
      }

      /* Entry fields */
      entry {
        background-color: ${c.backgroundAlt};
        color: ${c.foreground};
        border: 1px solid ${c.gray3};
        caret-color: ${c.cyan};
      }

      entry:focus {
        border-color: ${c.cyan};
      }

      /* Scrollbars */
      scrollbar {
        background-color: ${c.background};
      }

      scrollbar slider {
        background-color: ${c.gray3};
        border: 1px solid ${c.gray4};
      }

      scrollbar slider:hover {
        background-color: ${c.gray4};
        border-color: ${c.cyan};
      }

      /* Tooltips */
      tooltip {
        background-color: ${c.gray2};
        color: ${c.cyan};
        border: 1px solid ${c.cyan};
      }

      /* Sidebar */
      .sidebar {
        background-color: ${c.backgroundAlt};
      }
    '';

    gtk4.extraCss = ''
      /* Cassette Futurism GTK4 Theme */

      /* Hide menubars */
      .menubar {
        opacity: 0;
        min-height: 0;
        padding: 0;
        margin: 0;
      }

      /* Base window styling */
      window {
        background-color: ${c.background};
        color: ${c.foreground};
      }
    '';
  };

  # XFCE Terminal color scheme - CRT cassette futurism
  programs.xfce4-terminal = {
    enable = true;
    settings = {
      "Configuration" = {
        FontName = "JetBrainsMono Nerd Font 11";
        MiscAlwaysShowTabs = false;
        MiscBell = false;
        MiscBellUrgent = false;
        MiscBordersDefault = true;
        MiscCursorBlinks = true;
        MiscCursorShape = "TERMINAL_CURSOR_SHAPE_BLOCK";
        MiscDefaultGeometry = "100x30";
        MiscInheritGeometry = false;
        MiscMenubarDefault = false;
        MiscMouseAutohide = false;
        MiscMouseWheelZoom = true;
        MiscToolbarDefault = false;
        MiscConfirmClose = true;
        MiscCycleTabs = true;
        MiscTabCloseButtons = true;
        MiscTabCloseMiddleClick = true;
        MiscTabPosition = "GTK_POS_TOP";
        MiscHighlightUrls = true;
        MiscMiddleClickOpensUri = false;
        MiscCopyOnSelect = false;
        MiscShowRelaunchDialog = true;
        MiscRewrapOnResize = true;
        MiscUseShiftArrowsToScroll = false;
        MiscSlimTabs = false;
        MiscNewTabAdjacent = false;
        ScrollingLines = 999999;

        # Cassette futurism colors (Base16)
        ColorForeground = c.foreground;
        ColorBackground = c.background;
        ColorCursor = c.cyan;
        ColorSelection = c.gray2;
        ColorSelectionUseDefault = false;

        # 16-color palette for terminal
        ColorPalette = lib.concatStringsSep ";" [
          c.background      # 0: black
          c.error           # 1: red (hot pink)
          c.success         # 2: green (CRT green)
          c.warning         # 3: yellow (amber)
          c.purple          # 4: blue (purple)
          c.magenta         # 5: magenta
          c.cyan            # 6: cyan
          c.foregroundAlt   # 7: white (amber)
          c.gray3           # 8: bright black
          c.hotPink         # 9: bright red
          c.foreground      # 10: bright green
          c.yellow          # 11: bright yellow
          c.purple          # 12: bright blue
          c.magenta         # 13: bright magenta
          c.cyan            # 14: bright cyan
          "#FFFFFF"         # 15: bright white
        ];
      };
    };
  };

  # XFCE configuration via xfconf
  xfconf.settings = {
    # Panel configuration
    xfce4-panel = {
      panels = [
        {
          position = "p=8;x=0;y=0"; # Top panel
          size = 32;
          length = 100;
          autohide = false;
          background-style = 0;
          background-rgba = [0.06 0.06 0.06 0.95]; # Near-black with slight transparency
        }
      ];

      # Panel plugins appearance
      plugins = {
        # Make sure clock uses system font
        "plugin-1" = {
          digital-format = "%H:%M";
        };
      };
    };

    # Window Manager (xfwm4) - cassette futurism theme
    xfwm4 = {
      general = {
        # Disable built-in compositor (picom handles effects)
        use_compositing = false;

        # Window snapping
        snap_to_border = true;
        snap_to_windows = true;
        snap_width = 10;

        # Fonts
        title_font = "JetBrainsMono Nerd Font Bold 11";

        # Window decorations theme
        theme = "Default";

        # Button layout
        button_layout = "O|HMC";

        # Title alignment
        title_alignment = "left";

        # Opacity settings
        inactive_opacity = 90;
        move_opacity = 85;
        resize_opacity = 85;
        popup_opacity = 95;

        # Focus settings
        click_to_focus = true;
        focus_new = true;
        raise_on_click = true;
        raise_on_focus = false;
      };
    };

    # Desktop settings - wallpaper and icons
    xfce4-desktop = {
      backdrop = {
        screen0 = {
          monitor0 = {
            workspace0 = {
              color-style = 0;  # Solid color
              image-style = 3;  # Scaled
              last-image = vars.wallpaper;

              # Backup color (CRT black)
              color1 = [0.06 0.06 0.06 1.0];  # #0F0F0F
              rgba1 = [0.06 0.06 0.06 1.0];
            };
          };
        };
      };

      desktop-icons = {
        # Hide all desktop icons
        file-icons = {
          show-filesystem = false;
          show-home = false;
          show-trash = false;
          show-removable = false;
        };

        # Icon appearance
        icon-size = 48;
        use-custom-font-size = true;
        font-size = 11;
      };
    };

    # Thunar file manager - cassette futurism styling
    thunar = {
      # Hide menubar
      last-menubar-visible = false;

      # Show hidden files by default
      last-show-hidden = true;

      # Icon view as default
      last-view = "ThunarIconView";
      last-icon-view-zoom-level = "THUNAR_ZOOM_LEVEL_NORMAL";

      # Misc settings
      misc-single-click = false;
      misc-folders-first = true;
      misc-directory-specific-settings = true;

      # Side pane
      last-side-pane = "ThunarShortcutsPane";

      # Statusbar
      last-statusbar-visible = true;
    };

    # GTK/X settings
    xsettings = {
      # Dark theme
      "Net/ThemeName" = "Adwaita-dark";
      "Net/IconThemeName" = "Adwaita";
      "Gtk/ApplicationPreferDarkTheme" = 1;

      # Toolbar settings
      "Gtk/ToolbarStyle" = 3;  # Icons only
      "Gtk/ToolbarIconSize" = 3;  # Large icons
      "Gtk/ButtonImages" = true;
      "Gtk/MenuImages" = true;

      # Font rendering
      "Xft/Antialias" = 1;
      "Xft/Hinting" = 1;
      "Xft/HintStyle" = "hintslight";
      "Xft/RGBA" = "rgb";
      "Xft/DPI" = 96;

      # Cursor
      "Gtk/CursorThemeName" = "Bibata-Modern-Classic";
      "Gtk/CursorThemeSize" = 24;
    };

    # Keyboard settings
    keyboards = {
      "Default" = {
        Numlock = true;
      };
    };

    # Mouse/touchpad settings
    pointers = {
      "Default" = {
        Acceleration = 2.0;
        Threshold = 4;
      };
    };
  };

  # Home configuration
  home.packages = with pkgs; [
    # XFCE goodies
    xfce.xfce4-panel
    xfce.xfce4-settings
    xfce.xfce4-power-manager
    xfce.xfce4-notifyd
    xfce.thunar
    xfce.thunar-volman
    xfce.tumbler
    xfce.mousepad
    xfce.ristretto
    xfce.xfce4-screenshooter

    # Themes
    gnome-themes-extra
    adwaita-icon-theme
    bibata-cursors
  ];

  # Session variables
  home.sessionVariables = {
    # Force GTK to use our theme
    GTK_THEME = "Adwaita-dark";
  };
}