Add sc script

This commit is contained in:
Riley Apeldoorn 2022-09-05 10:05:34 +02:00
parent 332bc9ca76
commit ffd48fa9ea
2 changed files with 16 additions and 3 deletions

View file

@ -3,6 +3,7 @@
This directory contains nix derivations for shell scripts I want to use across
devices.
| Filename | Scripts | Description |
| ---------- | -------- | --------------------------- |
| `clip.nix` | `c`, `p` | Copy and paste abstractions |
| Filename | Scripts | Description |
| ---------- | -------- | ------------------------------------------ |
| `clip.nix` | `c`, `p` | Copy and paste abstractions |
| `sc.nix` | `sc` | Area screenshot tool with clip integration |

12
scripts/sc.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }: with pkgs; {
# Take a screenshot of a selected area and put it in the clipboard.
sc = (writeShellApplication {
name = "sc";
runtimeInputs = [ xclip scrot ];
text = ''
scrot -z -s - | tee /tmp/sc.png | xclip -i -sel clip -t image/png
'';
});
}