dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

default.nix (3723B)


      1 { style, user, ... }:
      2 {
      3   home-manager.users.${user} = {
      4     wayland.windowManager.hyprland.settings.layerrule = [
      5       "blur on, ignore_alpha 0.19, match:namespace waybar"
      6     ];
      7 
      8     programs.waybar = {
      9       enable = true;
     10       systemd.enable = true;
     11 
     12       settings = {
     13         mainBar = {
     14           layer = "top";
     15           position = "top";
     16           margin-left = 10;
     17           margin-right = 10;
     18           margin-top = 10;
     19           height = 44;
     20           modules-left = [
     21             "hyprland/workspaces"
     22             "hyprland/window"
     23           ];
     24           modules-center = [
     25             "clock#date"
     26             "clock"
     27             "clock#utc"
     28           ];
     29           modules-right = [
     30             "battery"
     31             "cpu"
     32             "memory"
     33             "disk"
     34             "tray"
     35           ];
     36           "hyprland/workspaces" = {
     37             format = "{name}";
     38             on-click = "activate";
     39             sort-by = "number";
     40           };
     41           "clock#date" = {
     42             interval = 1;
     43             format = "󰃭 {:%a, %b %d}";
     44           };
     45           clock = {
     46             interval = 1;
     47             format = " {:%I:%M:%S %p}";
     48           };
     49           "clock#utc" = {
     50             interval = 1;
     51             format = " {:%I:%M:%S %p}";
     52             timezone = "UTC";
     53           };
     54           cpu = {
     55             interval = 1;
     56             format = " {usage}%";
     57           };
     58           memory = {
     59             interval = 1;
     60             format = " {percentage}%";
     61           };
     62           disk = {
     63             interval = 1;
     64             format = " {percentage_used}%";
     65             path = "/";
     66           };
     67           battery = {
     68             bat = "BAT0";
     69             interval = 1;
     70             states = {
     71               warning = 20;
     72               critical = 10;
     73             };
     74             format = "{icon} {capacity}%";
     75             format-icons = [
     76               ""
     77               ""
     78               ""
     79               ""
     80               ""
     81             ];
     82             tooltip-format = "{timeTo}";
     83           };
     84           tray = {
     85             icon-size = 18;
     86             spacing = 10;
     87           };
     88         };
     89       };
     90 
     91       style = ''
     92         * {
     93           border: none;
     94           font-family: ${style.fonts.mono.family};
     95           font-size: 12pt;
     96         }
     97 
     98         box.module {
     99           margin: 10px;
    100         }
    101 
    102         window#waybar {
    103           border: none;
    104           border-radius: 10px;
    105           color: #${style.colors.fg.hex};
    106           background: ${style.colors.bg.rgba};
    107         }
    108 
    109         .modules-right > widget > *, #window {
    110           padding: 0 10px;
    111         }
    112 
    113         .modules-center > widget > * {
    114           padding: 0 10px;
    115         }
    116 
    117         #tray {
    118           padding: 0;
    119           padding-right: 10px;
    120         }
    121 
    122         #workspaces box {
    123           min-height: 5px;
    124         }
    125 
    126         #workspaces button, #workspaces button:hover, #workspaces button.active, #workspaces button.empty {
    127           box-shadow: inherit;
    128           text-shadow: inherit;
    129           background: transparent;
    130           padding: 0 5px;
    131         }
    132 
    133         #workspaces button label {
    134           color: #${style.colors.fg.hex};
    135           transition: background 0.1s linear;
    136           border-radius: 50%;
    137           min-height: 24px;
    138           min-width: 24px;
    139           border-radius: 50%;
    140         }
    141 
    142         #workspaces button:hover label {
    143           background: #${style.colors.fg.hex};
    144           color: #${style.colors.bg.hex};
    145         }
    146 
    147         #workspaces button.active label {
    148           background: #${style.colors.fg.hex};
    149           color: #${style.colors.bg.hex};
    150         }
    151 
    152         #workspaces button.empty label {
    153           color: #${style.colors.lo.hex};
    154         }
    155       '';
    156     };
    157   };
    158 }