dotfiles

My PC Dotfiles & Website
commit 7683e16a7b77e1949fbbbb132e2f48b58cb4ef8d
parent 3693a527ab10b2c073e3d1329dbf96e50b92fcd5
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri, 11 Apr 2025 03:33:15 +0530

chore: Update `inputs`

Diffstat:

Mflake.lock | 6+++---
Mmodules/gui/desktop/hyprland/apps/settings.nix | 2+-
Mmodules/gui/desktop/hyprland/apps/utilities.nix | 2+-
Dpackages/bibata-hyprcursor/configure.py | 52----------------------------------------------------
Dpackages/bibata-hyprcursor/default.nix | 82-------------------------------------------------------------------------------
Dpackages/bibata-hyprcursor/metadata.nix | 6------
6 files changed, 5 insertions(+), 145 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -1024,11 +1024,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1743975352, - "narHash": "sha256-KWD0XUUsYzGDaAVPOJiEO8Cq5FyH2fMfOHVq7J5mKck=", + "lastModified": 1744317917, + "narHash": "sha256-5JFxVNHllu7QeLidWgm8adHCDfFInRpT0X7/ZE0TorE=", "owner": "maydayv7", "repo": "proprietary", - "rev": "f1652c9e3fe111538b5949b28d80101f92c832af", + "rev": "3c5878e7f1fa2672cc63bb7b18e9d694278c130d", "type": "github" }, "original": { diff --git a/modules/gui/desktop/hyprland/apps/settings.nix b/modules/gui/desktop/hyprland/apps/settings.nix @@ -16,7 +16,7 @@ in { # Desktop Integration stylix.base16Scheme = files.colors.catppuccin; - environment.systemPackages = [pkgs.custom.bibata-hyprcursor]; + environment.systemPackages = [pkgs.custom.cursors]; gui = with theme; { fonts.enable = true; inherit (theme) icons; diff --git a/modules/gui/desktop/hyprland/apps/utilities.nix b/modules/gui/desktop/hyprland/apps/utilities.nix @@ -127,7 +127,7 @@ in { # Shaders ".config/hypr/shaders" = { - source = files.proprietary.shaders; + source = files.proprietary.shaders.path; recursive = true; }; diff --git a/packages/bibata-hyprcursor/configure.py b/packages/bibata-hyprcursor/configure.py @@ -1,52 +0,0 @@ -from sys import argv -import os -from os import path -from pathlib import Path -import tomli -import tomli_w - - -def fallback_value(config, cursor, field): - return (config.get(cursor, None) or {}).get(field, None) or ( - config["fallback_settings"].get(field, None) - ) - - -def filter_none_dict(**kwargs): - return {k: v for k, v in kwargs.items() if v is not None} - - -def construct_meta(config, name, sizes): - meta = filter_none_dict( - define_size=";".join(sizes), - define_override=( - None - if (overrides := fallback_value(config, name, "x11_symlinks")) is None - else ";".join(overrides) - ), - hotspot_x=fallback_value(config, name, "x_hotspot") / 256, - hotspot_y=fallback_value(config, name, "y_hotspot") / 256, - ) - - with open(f"{name}/meta.toml", "wb") as file: - tomli_w.dump({"General": meta}, file) - - -with open(argv[1], "rb") as file: - config = tomli.load(file)["cursors"] - -os.chdir(argv[2]) - -for cursor in os.listdir("."): - if path.isfile(cursor): - name = Path(cursor).stem - - os.mkdir(name) - os.rename(cursor, f"{name}/{cursor}") - - construct_meta(config, name, [f"0,{cursor}"]) - else: - delay = fallback_value(config, cursor, "x11_delay") - construct_meta( - config, cursor, map(lambda c: f"0,{c},{delay}", os.listdir(cursor)) - ) diff --git a/packages/bibata-hyprcursor/default.nix b/packages/bibata-hyprcursor/default.nix @@ -1,82 +0,0 @@ -{ - lib, - pkgs, - variant ? "original", - baseColor ? "#000000", - outlineColor ? "#FFFFFF", - watchBackgroundColor ? "#000000", - colorName ? "classic", - ... -}: -with pkgs; let - metadata = import ./metadata.nix; - capital = str: let A = builtins.substring 0 1 str; in lib.toUpper A + (lib.removePrefix A str); - themeName = "Bibata-${capital variant}-${capital colorName}-Hyprcursor"; -in - assert builtins.elem variant ["modern" "modern-right" "original" "original-right"]; - stdenvNoCC.mkDerivation { - pname = "bibata-hyprcursor"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "ful1e5"; - repo = "Bibata_Cursor"; - inherit (metadata) rev sha256; - }; - - nativeBuildInputs = [ - python3 - python3Packages.tomli - python3Packages.tomli-w - hyprcursor - ]; - - phases = ["unpackPhase" "configurePhase" "buildPhase" "installPhase"]; - unpackPhase = '' - runHook preUnpack - cp $src/configs/${ - if lib.hasSuffix "right" variant - then "right" - else "normal" - }/x.build.toml config.toml - mkdir cursors - for cursor in $src/svg/${variant}/*; do - cp -r $src/svg/${variant}/$(readlink $cursor) cursors - done - chmod -R u+w . - runHook postUnpack - ''; - - configurePhase = '' - runHook preConfigure - cat << EOF > manifest.hl - name = ${themeName} - description = Bibata Cursor Theme packaged for Hyprcursor - version = ${metadata.rev} - cursors_directory = cursors - EOF - find cursors -type f -name '*.svg' | xargs sed -i -e 's/#00FF00/${baseColor}/g' -e 's/#0000FF/${outlineColor}/g' -e 's/#FF0000/${watchBackgroundColor}/g' - python ${./configure.py} config.toml cursors - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - hyprcursor-util --create . --output . - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/icons - cp -r theme_${themeName} $out/share/icons/${themeName} - runHook postInstall - ''; - - meta = with lib; { - description = "Open source, compact, and material designed cursor set in Hyprcursor format"; - homepage = "https://github.com/diniamo/niqspkgs/blob/544c3b2c69fd1b5ab3407e7b35c76060801a8bcf/pkgs/bibata-hyprcursor/default.nix"; - license = licenses.gpl3Only; - maintainers = ["diniamo"]; - }; - } diff --git a/packages/bibata-hyprcursor/metadata.nix b/packages/bibata-hyprcursor/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/ful1e5/Bibata_Cursor"; - release = true; - rev = "v2.0.7"; - sha256 = "sha256-kIKidw1vditpuxO1gVuZeUPdWBzkiksO/q2R/+DUdEc="; -}