mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 06:50:14 +01:00
feat: move scripts to packages
This commit is contained in:
parent
0a0ebce67a
commit
995a79e600
4 changed files with 12 additions and 19 deletions
|
|
@ -19,24 +19,5 @@
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"/home/${username}/.local/bin/setbg" = {
|
|
||||||
executable = true;
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
magick convert "$1" ~/.local/share/bg.png
|
|
||||||
swww img ~/.local/share/bg.png --transition-type fade
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
"/home/${username}/.local/bin/walp" = {
|
|
||||||
executable = true;
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet.
|
|
||||||
$SIV -t ~/Pictures/wallpapers/others/*
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
setbg = pkgs.writeScriptBin "setbg" (builtins.readFile ./scripts/setbg);
|
||||||
|
walp = pkgs.writeScriptBin "walp" (builtins.readFile ./scripts/walp);
|
||||||
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);
|
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);
|
||||||
notes = pkgs.writeShellScriptBin "notes" (builtins.readFile ./scripts/notes.sh);
|
notes = pkgs.writeShellScriptBin "notes" (builtins.readFile ./scripts/notes.sh);
|
||||||
grabtext = pkgs.writeShellScriptBin "grabtext" (builtins.readFile ./scripts/grabtext.sh);
|
grabtext = pkgs.writeShellScriptBin "grabtext" (builtins.readFile ./scripts/grabtext.sh);
|
||||||
|
|
@ -12,6 +14,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
setbg
|
||||||
|
walp
|
||||||
runbg
|
runbg
|
||||||
notes
|
notes
|
||||||
grabtext
|
grabtext
|
||||||
|
|
|
||||||
4
modules/home/scripts/scripts/setbg
Normal file
4
modules/home/scripts/scripts/setbg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
magick convert "$1" ~/.local/share/bg.png
|
||||||
|
swww img ~/.local/share/bg.png --transition-type fade
|
||||||
4
modules/home/scripts/scripts/walp
Normal file
4
modules/home/scripts/scripts/walp
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet.
|
||||||
|
$SIV -t ~/Pictures/wallpapers/others/*
|
||||||
Loading…
Add table
Add a link
Reference in a new issue