summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-08 23:31:21 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-08 23:31:21 +0800
commit41e27dcfdd841622dc5bd90dfc96115189bf0d58 (patch)
tree6f7647c8d6c077b6285f9e54dc8c3db166ecee4e
parent9ea8beafb1ec13e4d11a14aaab5b918c530a44cf (diff)
fix(cliphist-rofi-img): made it faster by only getting 100 linesa
-rwxr-xr-xdot-config/rofi/scripts/cliphist-rofi-img6
1 files changed, 4 insertions, 2 deletions
diff --git a/dot-config/rofi/scripts/cliphist-rofi-img b/dot-config/rofi/scripts/cliphist-rofi-img
index c30a627d..70a32aa9 100755
--- a/dot-config/rofi/scripts/cliphist-rofi-img
+++ b/dot-config/rofi/scripts/cliphist-rofi-img
@@ -19,7 +19,9 @@ match(\$0, /^([0-9]+)\s(\[\[\s)?binary.*(jpg|jpeg|png|bmp)/, grp) {
1
EOF
# echo $(cat "$tmp_dir/cliphist")
-# get last 10 lines and merge them
+# format: <id>\t<100 char preview> remove the ID
+
+
# cat "$tmp_dir/cliphist"
-cliphist list | gawk "$prog" &
+cliphist list | head -n 100 | gawk "$prog" &