[feat] Add catppuccin theme getter

This commit is contained in:
uttarayan21
2024-03-04 04:01:14 +05:30
parent b590e705b5
commit 1d8361356e
9 changed files with 120 additions and 103 deletions

View File

@@ -12,6 +12,9 @@ in
] ++ (if device.isLinux then [ ../linux ] else [ ]) ] ++ (if device.isLinux then [ ../linux ] else [ ])
++ (if !lazy then [ ./nvim ] else [ ]); ++ (if !lazy then [ ./nvim ] else [ ]);
services.swayosd.enable = true;
home.packages = with pkgs; home.packages = with pkgs;
[ [
yt-dlp yt-dlp
@@ -46,11 +49,9 @@ in
(nerdfonts.override { fonts = [ "Hasklig" ]; }) (nerdfonts.override { fonts = [ "Hasklig" ]; })
mpv mpv
] ++ (if device.isLinux then [ ] ++ (if device.isLinux then [
openssl polkit-kde-agent
openssl.dev
dig dig
mullvad mullvad
kdeconnect
steam-run steam-run
(pkgs.catppuccin-gtk.override { (pkgs.catppuccin-gtk.override {
variant = "mocha"; variant = "mocha";
@@ -63,7 +64,6 @@ in
flavor = "mocha"; flavor = "mocha";
}) })
swaynotificationcenter swaynotificationcenter
openocd-rp2040
usbutils usbutils
picotool picotool
handlr-regex handlr-regex
@@ -190,17 +190,11 @@ in
enable = true; enable = true;
config = { theme = "catppuccin"; }; config = { theme = "catppuccin"; };
themes = { themes = {
catppuccin = # catppuccin =
let flavor = "mocha"; # {
in { # src = "${pkgs.catppuccinThemes.bat}";
src = pkgs.fetchFromGitHub { # file = "Catppuccin-mocha.tmTheme";
owner = "catppuccin"; # };
repo = "bat";
rev = "main";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
};
file = "Catppuccin-${flavor}.tmTheme";
};
}; };
}; };

View File

@@ -12,7 +12,7 @@
}), }),
color_scheme = "Catppuccin Mocha", color_scheme = "Catppuccin Mocha",
font_size = 16, font_size = 16,
initial_cols = 120, initial_cols = 200,
hide_tab_bar_if_only_one_tab = true, hide_tab_bar_if_only_one_tab = true,
window_background_opacity = 0.8, window_background_opacity = 0.8,
cursor_blink_rate = 8, cursor_blink_rate = 8,

View File

@@ -78,8 +78,16 @@
}; };
outputs = { nixpkgs, home-manager, nix-darwin, flake-utils, anyrun, nur outputs =
, neovim-nightly-overlay, ... }@inputs: { nixpkgs
, home-manager
, nix-darwin
, flake-utils
, anyrun
, nur
, neovim-nightly-overlay
, ...
}@inputs:
let let
config_devices = [ config_devices = [
{ {
@@ -165,7 +173,12 @@
}; };
}; };
catppuccinThemes = final: prev: {
catppuccinThemes = ./themes/catppuccin.nix;
};
overlays = [ overlays = [
catppuccinThemes
vimPlugins vimPlugins
tmuxPlugins tmuxPlugins
inputs.neovim-nightly-overlay.overlay inputs.neovim-nightly-overlay.overlay
@@ -174,18 +187,22 @@
inputs.nixneovimplugins.overlays.default inputs.nixneovimplugins.overlays.default
nur.overlay nur.overlay
]; ];
in { in
nixosConfigurations = let devices = nixos_devices; {
nixosConfigurations =
let devices = nixos_devices;
in import ./nixos/device.nix { in import ./nixos/device.nix {
inherit devices inputs nixpkgs home-manager overlays nur; inherit devices inputs nixpkgs home-manager overlays nur;
}; };
darwinConfigurations = let devices = darwin_devices; darwinConfigurations =
let devices = darwin_devices;
in import ./darwin/device.nix { in import ./darwin/device.nix {
inherit devices inputs nixpkgs home-manager overlays nix-darwin; inherit devices inputs nixpkgs home-manager overlays nix-darwin;
}; };
homeConfigurations = let devices = linux_devices; homeConfigurations =
let devices = linux_devices;
in import ./linux/device.nix { in import ./linux/device.nix {
inherit devices inputs nixpkgs home-manager overlays; inherit devices inputs nixpkgs home-manager overlays;
}; };

View File

@@ -1,4 +1,4 @@
{ pkgs, device, nur, ... }: { { pkgs, device, nur, inputs, ... }: {
imports = [ imports = [
../common/firefox.nix ../common/firefox.nix
../linux/hyprland.nix ../linux/hyprland.nix
@@ -7,6 +7,9 @@
../linux/ironbar ../linux/ironbar
../linux/foot.nix ../linux/foot.nix
]; ];
services.kdeconnect.enable = true;
systemd.user.services.spotify-player = { systemd.user.services.spotify-player = {
Install = { WantedBy = [ "graphical-session.target" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; };
Unit = { Unit = {

View File

@@ -1,7 +1,18 @@
{ pkgs, ... }: { { pkgs, ... }: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
source =
let
catppuccin = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "hyprland";
rev = "main";
sha256 = "sha256-9BhZq9J1LmHfAPBqOr64chiAEzS+YV6zqe9ma95V3no";
};
in
"${catppuccin}/themes/mocha.conf";
monitor = [ monitor = [
",preferred,auto,auto" ",preferred,auto,auto"
"DP-1, 2560x1440@170, 0x0, 1, transform, 0" "DP-1, 2560x1440@170, 0x0, 1, transform, 0"
@@ -104,13 +115,11 @@
"QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORM,wayland"
]; ];
exec-once = [ exec-once = [
"${pkgs.swayosd}/bin/swayosd" "${pkgs.swayosd}/bin/swayosd-server"
"${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg" # "${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg"
"${pkgs.ironbar}/bin/ironbar" "${pkgs.ironbar}/bin/ironbar"
"${pkgs.nextcloud-client}/bin/nextcloud --background" "${pkgs.nextcloud-client}/bin/nextcloud --background"
"/usr/lib/polkit-kde-authentication-agent-1" "/usr/lib/polkit-kde-authentication-agent-1"
"${pkgs.kdeconnect}/libexec/kdeconnectd"
# "aa-notify -p -s 1 -w 60 -f /var/log/audit/audit.log"
]; ];
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
@@ -127,16 +136,16 @@
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun" "$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun" "$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, p, pseudo, # dwindle" "$mainMod, p, pseudo, # dwindle"
"$mainMod, v, togglesplit, # dwindle" "$mainMod, v, togglesplit,"
"$mainMod, a, exec, swaync-client -t" "$mainMod, a, exec, swaync-client -t"
"$mainMod, Tab, cyclenext" "$mainMod, Tab, cyclenext"
# Audio # Audio
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume raise" ",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume raise"
",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume lower" ",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume lower"
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd --output-volume mute-toggle" ",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"
",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev" # ",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next" # ",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle" # ",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"
# Screenshot # Screenshot
# "$mainMod,Print, exec, grim" # "$mainMod,Print, exec, grim"

View File

@@ -36,7 +36,7 @@
type = "sys_info"; type = "sys_info";
format = [ format = [
" CPU {cpu_percent}% | {temp_c:coretemp-Package-id-0}°C" " CPU {cpu_percent}% | {temp_c:coretemp-Package-id-0}°C"
" RAM {memory_used}GB/{memory_total}GB ({memory_percent})%" " RAM {memory_used}GB/{memory_total}GB"
]; ];
interval = { interval = {
cpu = 1; cpu = 1;

View File

@@ -7,6 +7,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
security.polkit.enable = true;
services.mullvad-vpn.enable = true; services.mullvad-vpn.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
@@ -15,6 +16,32 @@
pkiBundle = "/etc/secureboot"; pkiBundle = "/etc/secureboot";
}; };
services.greetd =
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
in
{
enable = true;
settings = {
default_session = {
command = "${tuigreet} --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
# services.wireplumber.configPackages = with pkgs; [ bluez ]; # services.wireplumber.configPackages = with pkgs; [ bluez ];
# environment.etc = { # environment.etc = {

View File

@@ -0,0 +1,26 @@
{ pkgs, flavor, ... }:
let
mkCatppuccin = { owner ? "catppuccin", item, rev ? "main", sha256 ? pkgs.lib.fakeSha256 }:
pkgs.stdenv.mkDerivation {
pname = item;
version = "0.0.1";
src = pkgs.fetchFromGitHub {
inherit owner rev sha256;
repo = item;
};
};
in
{
bat = mkCatppuccin {
item = "bat";
};
hyprland = mkCatppuccin {
item = "hyprland";
};
starship = mkCatppuccin {
item = "starship";
};
}

View File

@@ -1,59 +0,0 @@
local wezterm = require 'wezterm';
-- wezterm.font("Hasklug Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) -- /Users/fs0c131y/Library/Fonts/Hasklug Nerd Font Complete.otf, CoreText
return {
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
-- font = wezterm.font_with_fallback({
-- "Hasklig",
-- "Symbols Nerd Font Mono"
-- }),
font_size = 16,
colors = {
-- The default text color
foreground = "#f8f8f2",
-- The default background color
-- background = "#282a36",
-- Overrides the cell background color when the current cell is occupied by the
-- cursor and the cursor style is set to Block
cursor_bg = "#f8f8f2",
-- Overrides the text color when the current cell is occupied by the cursor
cursor_fg = "#000",
-- Specifies the border color of the cursor when the cursor style is set to Block,
-- or the color of the vertical or horizontal bar when the cursor style is set to
-- Bar or Underline.
cursor_border = "#52ad70",
-- the foreground color of selected text
selection_fg = "#ffffff",
-- the background color of selected text
selection_bg = "#ffffff",
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
scrollbar_thumb = "#222222",
-- The color of the split lines between panes
split = "#444444",
ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
-- Arbitrary colors of the palette in the range from 16 to 255
indexed = { [136] = "#af8700" },
-- Since: nightly builds only
-- When the IME, a dead key or a leader key are being processed and are effectively
-- holding input pending the result of input composition, change the cursor
-- to this color to give a visual cue about the compose state.
compose_cursor = "orange",
},
-- color_scheme = "Catppuccin Mocha",
initial_cols = 120,
hide_tab_bar_if_only_one_tab = true,
window_background_opacity = 0.8,
cursor_blink_rate = 8,
default_cursor_style = "BlinkingBlock",
default_prog = { "/opt/homebrew/bin/fish", "-l" },
window_padding = {
left = 2,
right = 0,
top = 2,
bottom = 0,
},
window_decorations = "RESIZE",
use_ime = false,
}