From 052405ba92d00163a7159a655b00d0cb0f274fdc Mon Sep 17 00:00:00 2001 From: Nate Anderson Date: Thu, 19 Dec 2024 13:47:39 -0700 Subject: [PATCH] Added catppuccin flake for system theming, swapped vis for cava, fixed wofi screenshot util --- flake.lock | 16 ++++ flake.nix | 15 +++- nate-work/dotfiles/wofi/config.screenshot | 12 ++- nate-work/dotfiles/wofi/macc_style.css | 12 +-- nate-work/modules/home-manager/home.nix | 98 ++++++++++++++-------- nate-work/modules/hypr/hypr_home.nix | 30 ++++--- nate-work/modules/hypr/hyprland.nix | 3 + nate-work/nixos/hardware-configuration.nix | 10 +-- 8 files changed, 126 insertions(+), 70 deletions(-) diff --git a/flake.lock b/flake.lock index f1f5175..fd1154e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "catppuccin": { + "locked": { + "lastModified": 1734397929, + "narHash": "sha256-VCTVpU/RlrI9StxzDnqc1R3ZTQloLVALSkiN/Fgiad4=", + "owner": "catppuccin", + "repo": "nix", + "rev": "21310cde33d3ee8023679dec01a9724a346c63ff", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -112,6 +127,7 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 3c6b8b4..64d1036 100644 --- a/flake.nix +++ b/flake.nix @@ -3,16 +3,16 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; - # nixpkgs-23.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nur.url = "github:nix-community/NUR"; home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + catppuccin.url = "github:catppuccin/nix"; + nur.url = "github:nix-community/NUR"; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nur, home-manager, ... } @ inputs: + outputs = { self, nixpkgs, nixpkgs-unstable, catppuccin, nur, home-manager, ... } @ inputs: let inherit (self) outputs; system = "x86_64-linux"; @@ -45,6 +45,7 @@ inherit inputs outputs timeZone system; }; modules = [ + catppuccin.nixosModules.catppuccin # Setup home manager inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -63,11 +64,17 @@ inherit inputs outputs timeZone system; }; modules = [ + catppuccin.nixosModules.catppuccin # Setup home manager inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.nate = import ./nate-work/modules/home-manager/home.nix; + home-manager.users.nate = { + imports = [ + ./nate-work/modules/home-manager/home.nix + catppuccin.homeManagerModules.catppuccin + ]; + }; home-manager.extraSpecialArgs = { inherit inputs outputs unstablePkgs; }; diff --git a/nate-work/dotfiles/wofi/config.screenshot b/nate-work/dotfiles/wofi/config.screenshot index e492540..a323e59 100644 --- a/nate-work/dotfiles/wofi/config.screenshot +++ b/nate-work/dotfiles/wofi/config.screenshot @@ -1,10 +1,8 @@ -prompt="What to capture?" -hide_search=true hide_scroll=true insensitive=true -width=1 +width=140 +height=200 show=dmenu -lines=3 -location=centre -x=870 -y=455 +location=top_right +x=-200 +y=60 diff --git a/nate-work/dotfiles/wofi/macc_style.css b/nate-work/dotfiles/wofi/macc_style.css index 622e265..fd9583b 100644 --- a/nate-work/dotfiles/wofi/macc_style.css +++ b/nate-work/dotfiles/wofi/macc_style.css @@ -53,7 +53,7 @@ * { font-family: 'Overpass Nerd Font', monospace; - font-size: 14px; + font-size: 18px; } /* Window */ @@ -61,7 +61,7 @@ window { margin: 0px; padding: 10px; border: 0.16em solid @lavender; - border-radius: 0.1em; + border-radius: 0.7em; background-color: @base; animation: slideIn 0.5s ease-in-out both; } @@ -80,7 +80,7 @@ window { /* Inner Box */ #inner-box { margin: 5px; - padding: 10px; + padding: 0px; border: none; background-color: @base; animation: fadeIn 0.5s ease-in-out both; @@ -115,7 +115,7 @@ window { /* Input */ #input { - margin: 5px 20px; + margin: 0px 20px; padding: 10px; border: none; border-radius: 0.1em; @@ -130,7 +130,7 @@ window { } #input * { - outline: 4px solid @red !important; + outline: 4px solid @red; } /* Text */ @@ -160,5 +160,5 @@ window { } #entry:drop(active) { - background-color: @lavender !important; + background-color: @lavender; } \ No newline at end of file diff --git a/nate-work/modules/home-manager/home.nix b/nate-work/modules/home-manager/home.nix index 606c68e..9353630 100644 --- a/nate-work/modules/home-manager/home.nix +++ b/nate-work/modules/home-manager/home.nix @@ -36,6 +36,14 @@ ../apps/firefox/firefox.nix ../hypr/hypr_home.nix ]; + + catppuccin = { + enable = true; + flavor = "macchiato"; + accent = "lavender"; + pointerCursor.enable = true; + }; + home.username = userName; home.homeDirectory = "/home/${userName}"; @@ -81,11 +89,11 @@ delve ### Misc - dbeaver-bin + # dbeaver-bin usbutils cli-visualizer openscad - powertop + libxml2 # # Better Unix @@ -124,10 +132,10 @@ # # Communication # - unstable.slack + # unstable.slack mumble - unstable.signal-desktop - zoom-us + # unstable.signal-desktop + # zoom-us # # Other @@ -173,9 +181,13 @@ }; home.sessionVariables = { - BAT_THEME="Catppuccin Macchiato"; + # BAT_THEME="Catppuccin Macchiato"; EDITOR = "hx"; NIXOS_OZONE_WL = "1"; + XCURSOR_THEME = "catppuccin-macchiato-lavender-cursors"; + XCURSOR_SIZE = "24"; + HYPRCURSOR_THEME = "catppuccin-macchiato-lavender-cursors"; + # HYPRCURSOR_SIZE = "24"; }; # Git setup @@ -189,7 +201,6 @@ pull = { ff = "only"; }; merge = { conflictStyle="zdiff3"; }; push = { autoSetupRemote="true"; }; - delta = { features = "Catppuccin Macchiato"; }; "url \"git@github.com:\"" = { insteadOf = "https://github.com/"; }; @@ -241,50 +252,63 @@ cat="bat --paging=never"; rm="rm -i"; }; + syntaxHighlighting = { + enable = true; + catppuccin.enable = true; + }; }; qt = { enable = true; - platformTheme.name = "qtct"; + platformTheme.name = "kvantum"; style.name = "kvantum"; + style.catppuccin.enable = true; }; gtk = { enable = true; - cursorTheme = { - package = pkgs.catppuccin-cursors.macchiatoLavender; - name = "Catppuccin-Macchiato-Lavender-Cursors"; - }; - iconTheme = { - package = pkgs.catppuccin-papirus-folders; - name = "Papirus-Dark"; - }; - theme = { - name = "catppuccin-macchiato-lavender-compact+rimless"; - package = pkgs.catppuccin-gtk.override { - accents = [ "lavender" ]; - size = "compact"; - tweaks = [ "rimless" ]; - variant = "macchiato"; + catppuccin = { + enable = true; + size = "compact"; + tweaks = [ "rimless" ]; + icon = { + enable = true; }; }; + # cursorTheme = { + # package = pkgs.catppuccin-cursors.macchiatoLavender; + # name = "Catppuccin-Macchiato-Lavender-Cursors"; + # }; + # iconTheme = { + # package = pkgs.catppuccin-papirus-folders; + # name = "Papirus-Dark"; + # }; + # theme = { + # name = "catppuccin-macchiato-lavender-compact+rimless"; + # package = pkgs.catppuccin-gtk.override { + # accents = [ "lavender" ]; + # size = "compact"; + # tweaks = [ "rimless" ]; + # variant = "macchiato"; + # }; + # }; }; # Symlink in gtk and kvantum theme to ~/.config - xdg.configFile = { - "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; - "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; - "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; - "Kvantum/kvantum.kvconfig".text = '' - [General] - theme=Catppuccin-Frappe-Blue - ''; - "Kvantum/Catppuccin-Frappe-Blue".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Frappe-Blue"; - }; + # xdg.configFile = { + # "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; + # "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; + # "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; + # "Kvantum/kvantum.kvconfig".text = '' + # [General] + # theme=Catppuccin-Frappe-Blue + # ''; + # "Kvantum/Catppuccin-Frappe-Blue".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Frappe-Blue"; + # }; - home.file.".icons/default/index.theme".text = '' - [icon theme] - Inherits=Catppuccin-Macchiato-Lavender-Cursors - ''; + # home.file.".icons/default/index.theme".text = '' + # [icon theme] + # Inherits=Catppuccin-Macchiato-Lavender-Cursors + # ''; home.stateVersion = "23.11"; # Please read the comment before changing. } diff --git a/nate-work/modules/hypr/hypr_home.nix b/nate-work/modules/hypr/hypr_home.nix index d885415..36e4481 100644 --- a/nate-work/modules/hypr/hypr_home.nix +++ b/nate-work/modules/hypr/hypr_home.nix @@ -159,12 +159,12 @@ ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, 2560x1600@165, 0x0, 1.00' && nwg-panel" # ", switch:off:[switch name], exec, hyprctl dispatch dpms on eDP-1" ]; - env = [ - "XCURSOR_THEME,catppuccin-macchiato-lavender-cursors" - "XCURSOR_SIZE,24" - "HYPRCURSOR_THEME,catppuccin-macchiato-lavender-cursors" - "HYPRCURSOR_SIZE,24" - ]; + # env = [ + # "XCURSOR_THEME,catppuccin-macchiato-lavender-cursors" + # "XCURSOR_SIZE,24" + # "HYPRCURSOR_THEME,catppuccin-macchiato-lavender-cursors" + # "HYPRCURSOR_SIZE,24" + # ]; windowrulev2 = [ # float keepass windows, put main window in scratch "float, class:^(org.keepassxc.KeePassXC)$" @@ -187,7 +187,7 @@ ]; cursor = { no_hardware_cursors = false; - allow_dumb_copy = true; + # allow_dumb_copy = true; }; misc = { vfr = true; @@ -199,11 +199,13 @@ home.pointerCursor = { name = "catppuccin-macchiato-lavender-cursors"; - package = pkgs.catppuccin-cursors.macchiatoLavender; - size = 24; - gtk.enable = true; - x11.enable = true; + # package = pkgs.catppuccin-cursors.macchiatoLavender; + # size = 24; + # gtk.enable = true; + # x11.enable = true; }; + # home.sessionVariables = { + # }; home.packages = with pkgs; lib.lists.flatten [ [ ### hyprland packages @@ -239,5 +241,11 @@ ] config.hyprhome.homePackages ]; + programs.cava = { + enable = true; + settings = { + smoothing.noise_reduction = 55; + }; + }; }; } diff --git a/nate-work/modules/hypr/hyprland.nix b/nate-work/modules/hypr/hyprland.nix index 9e80b2b..a929a20 100644 --- a/nate-work/modules/hypr/hyprland.nix +++ b/nate-work/modules/hypr/hyprland.nix @@ -16,6 +16,9 @@ in config = lib.mkIf config.hypr.enable { + catppuccin.enable = true; + catppuccin.flavor = "macchiato"; + catppuccin.accent = "lavender"; programs.hyprland.enable = true; # programs.hyprland.package = unstable.hyprland; # programs.hyprland.portalPackage = pkgs.xdg-desktop-portal-hyprland; diff --git a/nate-work/nixos/hardware-configuration.nix b/nate-work/nixos/hardware-configuration.nix index 4a0b004..f7be557 100644 --- a/nate-work/nixos/hardware-configuration.nix +++ b/nate-work/nixos/hardware-configuration.nix @@ -27,11 +27,11 @@ options = [ "fmask=0022" "dmask=0022" ]; }; - fileSystems."/home/nate/kage" = { - device = "192.168.1.169:/kage"; - fsType = "nfs"; - options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ]; # lazy mounting and auto disconnect after 600 seconds - }; + # fileSystems."/home/nate/kage" = { + # device = "192.168.1.169:/kage"; + # fsType = "nfs"; + # options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" "bg" "x-systemd.idle-timeout=600" ]; # lazy mounting and auto disconnect after 600 seconds + # }; swapDevices = [ { device = "/dev/disk/by-label/swap"; }