summaryrefslogtreecommitdiff
path: root/dot/local/bin/cutbuffer_pop
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2021-09-14 11:04:27 -0400
committerAndrew Cady <d@jerkface.net>2021-09-14 11:04:27 -0400
commit6d505fc790ee719cbf7bac03121b006eb74dcb05 (patch)
treed59724dba057b4257d952a6d152305eb85ae4671 /dot/local/bin/cutbuffer_pop
parent847addaf67b82c6e39d9c47518b50c4641212f41 (diff)
refactor cutbuffer to single file
Diffstat (limited to 'dot/local/bin/cutbuffer_pop')
-rwxr-xr-xdot/local/bin/cutbuffer_pop18
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
2dest_basename=cutbuffer_grab
3dest_extension=txt
4destdir=$HOME/$dest_basename
5
6set -e
7mkdir -p "$destdir"
8cd "$destdir"
9
10nameglob=$dest_basename.*.$dest_extension
11f=$(find . -maxdepth 1 -type f -name "$nameglob" -print0 | sort -z -V -r | head -z -n 1 | xargs -0)
12
13xcb -s 0 < "$f"
14xsel --input < "$f"
15
16mkdir -p .popped
17mv "$f" -t .popped
18