From bf54007f62beb5bf889da69574c4fea74bdc59aa Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Sun, 15 Feb 2026 02:01:39 +0100 Subject: add chwal dgenpass dgoogle dwiki --- dgenpass | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 dgenpass (limited to 'dgenpass') diff --git a/dgenpass b/dgenpass new file mode 100755 index 0000000..4f802ce --- /dev/null +++ b/dgenpass @@ -0,0 +1,29 @@ +#!/bin/sh + +PASSWORD_LENGTH=24 +DMENU_PROMPT="Enter password name:" +NOTIFY_TITLE="dgenpass" + +# Ask for a password name +name=$(echo "" | dmenu -i -p "$DMENU_PROMPT") + +# Exit if user cancels +[ -z "$name" ] && exit 1 + +# Generate random password +password=$(tr -dc 'A-Za-z0-9!@#$%^&*()_+-=' /dev/null 2>&1; then + echo -n "$password" | xclip -selection clipboard +elif command -v wl-copy >/dev/null 2>&1; then + echo -n "$password" | wl-copy +fi + +# Notify user +if command -v notify-send >/dev/null 2>&1; then + notify-send "$NOTIFY_TITLE" "Password for '$name' saved and copied to clipboard" +fi -- cgit v1.2.3