Skip to content

Commit

Permalink
Migrate catppuccin theme
Browse files Browse the repository at this point in the history
  • Loading branch information
amadejkastelic committed Jun 29, 2024
1 parent e7ca80f commit 0a4e0be
Show file tree
Hide file tree
Showing 20 changed files with 158 additions and 195 deletions.
180 changes: 90 additions & 90 deletions flake.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@
};

# hyprwm
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
# rev = "fe7b748eb668136dd0558b7c8279bfcd7ab4d759";
};

hypridle = {
url = "github:hyprwm/hypridle";
Expand Down
1 change: 1 addition & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
imports = [
./specialisations.nix
./terminal
./theme
inputs.matugen.nixosModules.default
inputs.nix-index-db.hmModules.nix-index
self.nixosModules.theme
Expand Down
1 change: 0 additions & 1 deletion home/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
wineWowPackages.wayland
ledger-live-desktop
pinentry-gnome3
zoom-us
];
}
2 changes: 0 additions & 2 deletions home/programs/games/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
{
home.packages = with pkgs; [
# inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
#gamescope
winetricks
adwsteamgtk
steam-run
# steamtinkerlaunch
];
}
27 changes: 10 additions & 17 deletions home/programs/gtk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
x11.enable = true;
};

catppuccin.pointerCursor.enable = false;

gtk = {
enable = true;

Expand All @@ -22,24 +24,15 @@

gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";

iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
catppuccin = {
enable = true;
accent = "pink";
flavor = "mocha";
size = "compact";
icon = {
enable = true;
accent = "pink";
};
};

theme = {
name =
if config.theme.name == "light"
then "Catppuccin-Mocha-Compact-Pink"
else "Catppuccin-Mocha-Compact-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["pink"];
size = "compact";
# tweaks = [ "rimless" "black" ];
variant = "mocha";
flavor = "mocha";
};
};
};
Expand Down
35 changes: 3 additions & 32 deletions home/programs/office/zathura.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,10 @@
}: {
programs.zathura = {
enable = true;
options = {
recolor-lightcolor = "rgba(0,0,0,0)";
default-bg = "rgba(0,0,0,0.7)";

font = "Inter 12";
selection-notification = true;

selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
zoom-min = "10";
};

extraConfig =
"include catppuccin-"
+ (
if config.theme.name == "light"
then "latte"
else "mocha"
);
};

xdg.configFile = {
"zathura/catppuccin-latte".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-latte";
hash = "sha256-KuJ4KG5vWP8v4J4eUQfW++XAriSVh15t0rwz9/xPZbk=";
};
"zathura/catppuccin-mocha".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-QZypNMfVlTzMRaQ286DDWL9dAvQZ8INkllzo8t0aHf4=";
catppuccin = {
enable = true;
flavor = "mocha";
};
};
}
4 changes: 1 addition & 3 deletions home/programs/wayland/hyprland/rules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
"immediate, class:.*"

# Games
"workspace name:Gaming, float, center, stayfocused, class:gamescope"
"workspace name:Gaming, float, center, stayfocused, class:cs2"
"workspace name:Gaming, float, center, stayfocused, class:hearthstone"
"workspace name:Gaming, class:gamescope"

# make Firefox PiP window floating and sticky
"float, title:^(Picture-in-Picture)$"
Expand Down
4 changes: 3 additions & 1 deletion home/programs/wayland/hyprland/settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ in {
use_nearest_neighbor = false;
};

debug.disable_logs = true;
debug = {
disable_logs = true;
};
};

wayland.windowManager.hyprland.extraConfig = ''
Expand Down
13 changes: 5 additions & 8 deletions home/services/wayland/mako.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
anchor = "top-center";
defaultTimeout = 3000;

backgroundColor = "#1e1e2e";
textColor = "#cdd6f4";
borderColor = "#f5c2e7";
progressColor = "over #313244";
extraConfig = ''
[urgency=high]
border-color=#fab387
'';
catppuccin = {
enable = true;
flavor = "mocha";
};

borderRadius = 16;
};
}
21 changes: 4 additions & 17 deletions home/terminal/programs/bat.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,11 @@ in {
enable = true;
config = {
pager = "less -FR";
theme = "Catppuccin-${variant}";
};
themes = let
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
in {
Catppuccin-mocha = {
inherit src;
file = "Catppuccin-mocha.tmTheme";
};
Catppuccin-latte = {
inherit src;
file = "Catppuccin-latte.tmTheme";
};

catppuccin = {
enable = true;
flavor = "mocha";
};
};

Expand Down
14 changes: 3 additions & 11 deletions home/terminal/programs/btop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@
in {
programs.btop = {
enable = true;
settings.color_theme = "catppuccin_${variant}";
};

xdg.configFile = {
"btop/themes/catppuccin_latte.theme".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/btop/7109eac2884e9ca1dae431c0d7b8bc2a7ce54e54/themes/catppuccin_latte.theme";
hash = "sha256-Dp/4A4USHAri+QgIM/dJFQyLSR6KlWtMc7aYlFgmHr0=";
};
"btop/themes/catppuccin_mocha.theme".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/btop/7109eac2884e9ca1dae431c0d7b8bc2a7ce54e54/themes/catppuccin_mocha.theme";
hash = "sha256-KnXUnp2sAolP7XOpNhX2g8m26josrqfTycPIBifS90Y=";
catppuccin = {
enable = true;
flavor = variant;
};
};
}
7 changes: 7 additions & 0 deletions home/theme/catppuccin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{pkgs, ...}: {
catppuccin = {
enable = true;
accent = "pink";
flavor = "mocha";
};
}
5 changes: 5 additions & 0 deletions home/theme/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
imports = [
./catppuccin.nix
];
}
7 changes: 6 additions & 1 deletion system/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
# don't touch this
system.stateVersion = lib.mkDefault "23.11";

time.timeZone = lib.mkDefault "Europe/Ljubljana";
time = {
timeZone = lib.mkDefault "Europe/Ljubljana";

# Windows dual-boot time fix
hardwareClockInLocalTime = true;
};

# compresses half the ram for use as swap
zramSwap.enable = false;
Expand Down
3 changes: 1 addition & 2 deletions system/hardware/opengl.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{pkgs, ...}: {
# graphics drivers / HW accel
hardware.opengl = {
hardware.graphics = {
enable = true;
driSupport = true;

extraPackages = with pkgs; [
libva
Expand Down
4 changes: 2 additions & 2 deletions system/nix/nh.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{inputs, ...}: {
programs.nh = {
enable = true;
# weekly cleanup
# monthly cleanup
clean = {
enable = true;
extraArgs = "--keep-since 7d";
extraArgs = "--keep-since 30d";
};
flake = "/home/amadejk/Documents/dotfiles";
};
Expand Down
3 changes: 1 addition & 2 deletions system/programs/gaming/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
imports = [
./steam.nix
./gamemode.nix
./gamescope.nix
];

environment.systemPackages = with pkgs; [
mangohud
bottles
gamescope
];

# Downgrade gamescope
nixpkgs.overlays = [
(final: prev: {
gamescope = prev.gamescope.overrideAttrs (old: {
Expand Down
8 changes: 8 additions & 0 deletions system/programs/gaming/gamescope.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{pkgs, ...}: {
programs.gamescope = {
enable = true;
args = [
#"--backend sdl"
];
};
}
7 changes: 2 additions & 5 deletions system/programs/gaming/steam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ in {
programs.steam = {
enable = true;

extest.enable = false;
extest.enable = true;

extraCompatPackages = with pkgs; [
proton-ge-bin
];

gamescopeSession.enable = true;

# fix gamescope inside steam
package = pkgs.steam.override {
extraEnv = {
Expand Down Expand Up @@ -64,8 +62,7 @@ in {
};

hardware = {
# https://github.com/NixOS/nixpkgs/issues/47932#issuecomment-447508411
opengl.driSupport32Bit = true;
graphics.enable32Bit = true;
steam-hardware.enable = true;
};
}

0 comments on commit 0a4e0be

Please sign in to comment.