summaryrefslogtreecommitdiff
path: root/scrshot
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-07-15 17:51:51 -0500
committerzachir <zachir@librem.one>2025-07-15 17:51:51 -0500
commitafad25de6e51b617388a8367005215b5f46d784c (patch)
treeb897f637cd75c8e5d4d9755e115307d4ce46c26a /scrshot
parent7d60a0023f6eefd5c3f05bffee4f31a01ac4e17f (diff)
Change all menus to dmenu
Diffstat (limited to 'scrshot')
-rwxr-xr-xscrshot10
1 files changed, 2 insertions, 8 deletions
diff --git a/scrshot b/scrshot
index 77174e6..8982b56 100755
--- a/scrshot
+++ b/scrshot
@@ -7,11 +7,9 @@ output_text () {
while getopts "hwxd:s:o:" o; do case "${o}" in
w)
- DMENU="tofi"
SCRSH="grim"
;;
x)
- DMENU="dmenu"
SCRSH="maim"
;;
d) DARG="$OPTARG $DARG" ;;
@@ -19,14 +17,10 @@ while getopts "hwxd:s:o:" o; do case "${o}" in
o) FILENAME="$OPTARG" ;;
esac done
-if [ -z "$DMENU" ]; then
+if [ -z "$SCRSH" ]; then
if [ -n "$WAYLAND_DISPLAY" ]; then
- 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?"
@@ -43,7 +37,7 @@ sleep 0.1
"$SCRSH" $SARG "$TEMPFILE"
if [ -z "$FILENAME" ]; then
- FILENAME="$(echo "$TEMPFILE" | $DMENU $DARGS $DEFARGS "What to name the file?")"
+ FILENAME="$(echo "$TEMPFILE" | dmenu $DARGS -p "What to name the file?")"
if [ -z "$FILENAME" ]; then
rm -rf "$TEMPFILE"
output_text "Deleted" "No filename selected, file deleted!"