diff options
| author | triethyl <triethylammonium@pm.me> | 2025-10-27 14:23:32 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-10-27 14:23:32 -0400 |
| commit | 939d761c32904c408290d6764930d31e0cc890ab (patch) | |
| tree | b25b0a73d76228f910ebfcb2979b0afa8dc20bd2 /home-manager/features/gui/desktops/niri/parts/scrap-maker.nix | |
| parent | fe7c52513cb49b7e56968bb1d759c7428d1e97f6 (diff) | |
home manager: cleaned up and edited desktop
Diffstat (limited to 'home-manager/features/gui/desktops/niri/parts/scrap-maker.nix')
| -rw-r--r-- | home-manager/features/gui/desktops/niri/parts/scrap-maker.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/home-manager/features/gui/desktops/niri/parts/scrap-maker.nix b/home-manager/features/gui/desktops/niri/parts/scrap-maker.nix new file mode 100644 index 0000000..19cce56 --- /dev/null +++ b/home-manager/features/gui/desktops/niri/parts/scrap-maker.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.features.gui.desktops.niri.parts.scrap-maker; + + scrapDirectory = "~/Sync/vault/scraps"; +in { + options.features.gui.desktops.niri.parts.scrap-maker.enable = lib.mkEnableOption "scrap maker"; + config = lib.mkIf cfg.enable { + home.packages = [ + (pkgs.writers.writeNuBin "scrap-maker" '' + let scrap_text = fuzzel -d -l 0 -p "" -x 8 -y 8 -w 40 + let scrap_name = date now | format date "%s" + let scrap_path = ("${scrapDirectory}" + "/" + $scrap_name + ".md") | path expand + $scrap_text | save $scrap_path + '') + ]; + }; +} |
