summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2021-09-14 02:50:44 -0400
committerAndrew Cady <d@jerkface.net>2021-09-14 02:50:44 -0400
commit0dcb486ee123e5e38029551ec9b375ce1d64244e (patch)
tree8776bb7c24c03e16045ae6a6e13276be13264cb1
parentdc3122f0da01a20361e73c77cac7d0f58f859ceb (diff)
cutbuffer final cleanup
-rwxr-xr-xdot/local/bin/cutbuffer_pop8
-rwxr-xr-xdot/local/bin/cutbuffer_push9
2 files changed, 8 insertions, 9 deletions
diff --git a/dot/local/bin/cutbuffer_pop b/dot/local/bin/cutbuffer_pop
index d8ae2ba..d723a27 100755
--- a/dot/local/bin/cutbuffer_pop
+++ b/dot/local/bin/cutbuffer_pop
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2default_basename=cutbuffer_grab 2dest_basename=cutbuffer_grab
3default_extension=txt 3dest_extension=txt
4destdir=$HOME/$default_basename 4destdir=$HOME/$dest_basename
5 5
6chdir_to_destination() 6chdir_to_destination()
7{ 7{
@@ -18,7 +18,7 @@ set -e
18 18
19chdir_to_destination 19chdir_to_destination
20 20
21f=$(find . -maxdepth 1 -type f -name 'cutbuffer_grab.*.txt' -printf "%C@ %h/%f\0" | extract) 21f=$(find . -maxdepth 1 -type f -name "$dest_basename.*.$dest_extension" -printf "%C@ %h/%f\0" | extract)
22 22
23xcb -s 0 < "$f" 23xcb -s 0 < "$f"
24xsel --input < "$f" 24xsel --input < "$f"
diff --git a/dot/local/bin/cutbuffer_push b/dot/local/bin/cutbuffer_push
index 62faf7b..cad9367 100755
--- a/dot/local/bin/cutbuffer_push
+++ b/dot/local/bin/cutbuffer_push
@@ -1,9 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2default_basename=cutbuffer_grab 2dest_basename=cutbuffer_grab
3default_extension=txt 3dest_extension=txt
4date_format=+%F_%H%M%S 4date_format=+%F_%H%M%S
5 5
6destdir=$HOME/$default_basename 6destdir=$HOME/$dest_basename
7 7
8chdir_to_destination() 8chdir_to_destination()
9{ 9{
@@ -13,9 +13,8 @@ chdir_to_destination()
13 13
14choose_destination() 14choose_destination()
15{ 15{
16 local stamp basename extension now
17 now=$(date "$date_format") 16 now=$(date "$date_format")
18 DESTINATION=$default_basename.$now.$default_extension 17 DESTINATION=$dest_basename.$now.$dest_extension
19} 18}
20 19
21set -e 20set -e