updates
This commit is contained in:
parent
8ba8fc98ca
commit
e2ee24b57a
13 changed files with 238 additions and 70 deletions
28
packages/sc/default.nix
Normal file
28
packages/sc/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
writeShellScriptBin,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
writeShellScriptBin "sc" ''
|
||||
|
||||
# Take a screenshot with grim and slurp
|
||||
${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp})" /tmp/screenshot.png
|
||||
|
||||
# Upload the screenshot and store the response
|
||||
response=$(${lib.getExe pkgs.curl} -s \
|
||||
-X POST \
|
||||
-H "Accept: application/json" \
|
||||
-H "Authorization: Bearer Z4MYrYtJUb3Y8VvJynkWAw9eBVU3kvvW9gQ50--hROw" \
|
||||
-F "file=@/tmp/screenshot.png" \
|
||||
https://zoeys.computer/api/images/create)
|
||||
|
||||
# Extract the URL using jq and copy to clipboard
|
||||
echo "$response" | ${lib.getExe pkgs.jq} -r '.url' | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
|
||||
# Clean up the temporary file
|
||||
rm /tmp/screenshot.png
|
||||
|
||||
# Notify user
|
||||
echo "Screenshot uploaded and URL copied to clipboard!"
|
||||
''
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
in
|
||||
buildStdenv.mkDerivation rec {
|
||||
pname = "zen-browser-unwrapped";
|
||||
version = "1.0.1-a.12";
|
||||
version = "1.0.1-a.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zen-browser";
|
||||
|
|
@ -159,7 +159,7 @@ in
|
|||
rev = "${version}";
|
||||
leaveDotGit = true;
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-O5S468G+2fF11mnjR8lMSVBOTRe/X5VxfBLAEVh2mA0=";
|
||||
hash = "sha256-z1YIdulvzkbSa266RZwBbYbeHqY22RvdHAdboR9uqig=";
|
||||
};
|
||||
|
||||
firefoxVersion = (lib.importJSON "${src}/surfer.json").version.version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue