diff options
author | Andrew Cady <d@jerkface.net> | 2021-09-14 11:04:27 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2021-09-14 11:04:27 -0400 |
commit | 6d505fc790ee719cbf7bac03121b006eb74dcb05 (patch) | |
tree | d59724dba057b4257d952a6d152305eb85ae4671 /dot/local/bin/cutbuffer_pop | |
parent | 847addaf67b82c6e39d9c47518b50c4641212f41 (diff) |
refactor cutbuffer to single file
Diffstat (limited to 'dot/local/bin/cutbuffer_pop')
-rwxr-xr-x | dot/local/bin/cutbuffer_pop | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/dot/local/bin/cutbuffer_pop b/dot/local/bin/cutbuffer_pop deleted file mode 100755 index e994342..0000000 --- a/dot/local/bin/cutbuffer_pop +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | dest_basename=cutbuffer_grab | ||
3 | dest_extension=txt | ||
4 | destdir=$HOME/$dest_basename | ||
5 | |||
6 | set -e | ||
7 | mkdir -p "$destdir" | ||
8 | cd "$destdir" | ||
9 | |||
10 | nameglob=$dest_basename.*.$dest_extension | ||
11 | f=$(find . -maxdepth 1 -type f -name "$nameglob" -print0 | sort -z -V -r | head -z -n 1 | xargs -0) | ||
12 | |||
13 | xcb -s 0 < "$f" | ||
14 | xsel --input < "$f" | ||
15 | |||
16 | mkdir -p .popped | ||
17 | mv "$f" -t .popped | ||
18 | |||