Add sc
script
This commit is contained in:
parent
332bc9ca76
commit
ffd48fa9ea
2 changed files with 16 additions and 3 deletions
|
@ -4,5 +4,6 @@ This directory contains nix derivations for shell scripts I want to use across
|
||||||
devices.
|
devices.
|
||||||
|
|
||||||
| Filename | Scripts | Description |
|
| Filename | Scripts | Description |
|
||||||
| ---------- | -------- | --------------------------- |
|
| ---------- | -------- | ------------------------------------------ |
|
||||||
| `clip.nix` | `c`, `p` | Copy and paste abstractions |
|
| `clip.nix` | `c`, `p` | Copy and paste abstractions |
|
||||||
|
| `sc.nix` | `sc` | Area screenshot tool with clip integration |
|
||||||
|
|
12
scripts/sc.nix
Normal file
12
scripts/sc.nix
Normal 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
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue