summaryrefslogtreecommitdiff
path: root/scrshot
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-08-06 22:55:00 -0500
committerzachir <zachir@librem.one>2023-08-06 22:55:00 -0500
commitb49fbd12bd77f379fc1bf466531dec20658f7540 (patch)
tree3ec9bc9c881811567d11d1a728c7021987120dcf /scrshot
parenteaf278d39aa7f7a322bdb21feb6af9ea5a5bf9df (diff)
Fully replace bemenu with tofi
Diffstat (limited to 'scrshot')
-rwxr-xr-xscrshot8
1 files changed, 5 insertions, 3 deletions
diff --git a/scrshot b/scrshot
index fe21abd..77174e6 100755
--- a/scrshot
+++ b/scrshot
@@ -7,7 +7,7 @@ output_text () {
while getopts "hwxd:s:o:" o; do case "${o}" in
w)
- DMENU="bemenu"
+ DMENU="tofi"
SCRSH="grim"
;;
x)
@@ -21,10 +21,12 @@ esac done
if [ -z "$DMENU" ]; then
if [ -n "$WAYLAND_DISPLAY" ]; then
- DMENU="bemenu"
+ DMENU="tofi"
+ DEFARGS="--prompt-text"
SCRSH="grim"
elif [ -n "$DISPLAY" ]; then
DMENU="dmenu"
+ DEFARGS="-p"
SCRSH="maim"
else
output_text "Stuck" "Can't tell if Wayland or X, what gives?"
@@ -41,7 +43,7 @@ sleep 0.1
"$SCRSH" $SARG "$TEMPFILE"
if [ -z "$FILENAME" ]; then
- FILENAME="$(echo "$TEMPFILE" | $DMENU $DARGS -p "What to name the file?")"
+ FILENAME="$(echo "$TEMPFILE" | $DMENU $DARGS $DEFARGS "What to name the file?")"
if [ -z "$FILENAME" ]; then
rm -rf "$TEMPFILE"
output_text "Deleted" "No filename selected, file deleted!"