From 97ebd1624a5578bb0ed43f42800da15ceb5cbefc Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Tue, 12 Apr 2022 10:42:48 +0200 Subject: [PATCH] improved dmenupass, added file explanation to dmenumount --- .local/bin/dmenumount | 3 +++ .local/bin/dmenupass | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount index 1fd27a3..66cfb37 100755 --- a/.local/bin/dmenumount +++ b/.local/bin/dmenumount @@ -5,6 +5,9 @@ # be prompted to give a mountpoint from already existsing directories. If you # input a novel directory, it will prompt you to create that directory. +#File should have two fields: uuid and password location in pass +#The file is tab-seperated +#UUIDs can be found via `lsblk -rpo "name,size,uuid"` UUID_TO_PWD="$XDG_CONFIG_HOME/mount/list" getmount() { \ diff --git a/.local/bin/dmenupass b/.local/bin/dmenupass index 2c14e6f..550096d 100755 --- a/.local/bin/dmenupass +++ b/.local/bin/dmenupass @@ -3,4 +3,9 @@ # This script is the SUDO_ASKPASS variable, meaning that it will be used as a # password prompt if needed. -dmenu -fn Monospace-18 -P -p "$1" <&- && echo +if [ "$1" = "--display" ] || [ -z "$1" ]; then + prompt=Password: +else + prompt="$1" +fi +dmenu -P -p "$prompt" <&-