m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib/dmenu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dmenu')
-rwxr-xr-xcontrib/dmenu/passmenu9
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 18b2daf..e5635fd 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -6,15 +6,18 @@ typeit=0
otp=0
infer_otp=0
otp_pattern=""
-while [[ $# -gt 0 ]]; do
+finish=0
+while [[ $# -gt 0 && $finish -eq 0 ]]; do
argument="$1"
- shift
case $argument in
--type) typeit=1 ;;
--otp) otp=1 ;;
--infer-otp) infer_otp=1 ;;
- --otp-pattern) otp_pattern="$1"; shift ;;
+ --otp-pattern) shift ; otp_pattern="$1" ;;
+ *) finish=1
esac
+ # Don't shift if we're done with passmenu args - rest of args goes to dmenu
+ [[ $finish -eq 0 ]] && shift
done
if [[ -n $WAYLAND_DISPLAY ]]; then