diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-14 11:50:41 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-14 11:50:41 +0200 |
commit | 67a2df82d25f52ea0937f4eed355546deae7b4b5 (patch) | |
tree | 40bc358a6d2a6b119e04229b48fd05dd74a5b81d /bin/menuscripts | |
parent | 4fbb921cd8a9da0135e0ddf54da898e080cc8c7e (diff) | |
parent | b0ef0738b3f0cebde9ed6b1d40ca0f7cbb1385a3 (diff) |
Merge branch 'main' of /var/git/dotfiles
Diffstat (limited to 'bin/menuscripts')
-rwxr-xr-x | bin/menuscripts/mhelp | 20 | ||||
-rwxr-xr-x | bin/menuscripts/mpass | 10 |
2 files changed, 13 insertions, 17 deletions
diff --git a/bin/menuscripts/mhelp b/bin/menuscripts/mhelp index e03222b..5963a88 100755 --- a/bin/menuscripts/mhelp +++ b/bin/menuscripts/mhelp @@ -1,5 +1,4 @@ #!/usr/bin/env sh -OPTIONS="/tmp/dmh_options.txt" if [ "$MENUCMD" = "tofi" ] then @@ -16,18 +15,15 @@ fi test -z "$program" && exit 1 -if $program --help > "$OPTIONS" -then - option="$(grep "^ *-[-a-zA-Z0-9]* " "$OPTIONS" | - tr -s ' ' | - sort | - uniq | - column -l 2 -t | - $menucmd | - awk '{print $1}')" -fi +option="$($program --help | + # Parse options + grep "^ *-[-a-zA-Z0-9]* " | + tr -s ' ' | + sort | uniq | + column -l 2 -t | + $menucmd | + awk '{print $1}')" test -z "$option" && exit 1 -rm -f "$OPTIONS" setsid $program $option diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index a50f0fb..4ecd4bc 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -16,10 +16,10 @@ do [ "$choice" ] || break file="$file/$choice" done - test -z "$file" && exit 1 -pass show -c "$file" && - if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null -then + +pass show -c "$file" || exit 1 +notify-send -t 1000 "mpass" "copied <b>$choice</b>" + +[ "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null && # on wayland and cliphist is running cliphist list | head -n 1 | cliphist delete -fi |