diff options
| -rwxr-xr-x | chwal | 5 | ||||
| -rwxr-xr-x | dgenpass | 29 | ||||
| -rwxr-xr-x | dgoogle | 6 | ||||
| -rwxr-xr-x | dwiki | 6 |
4 files changed, 46 insertions, 0 deletions
@@ -0,0 +1,5 @@ +#!/bin/bash + +wallpapers="$HOME/pix" +chosen=$(ls $wallpapers | dmenu -i -p "Wallpaper:") +feh --bg-scale "$HOME/pix/$chosen" 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/urandom | head -c "$PASSWORD_LENGTH") + +# Save to pass +echo "$password" | pass insert -f -m "$name" + +# Copy to clipboard +if command -v xclip >/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 @@ -0,0 +1,6 @@ +#!/bin/bash + +: "${BROWSER:=librewolf}" + +query=$(echo "" | dmenu -p "Search Google:") +[ -z "$query" ] || $BROWSER "https://www.google.com/search?q=$query" @@ -0,0 +1,6 @@ +#!/bin/bash + +: "${BROWSER:=librewolf}" + +query=$(echo "" | dmenu -p "Search Wikipedia:") +[ -z "$query" ] || $BROWSER "https://en.wikipedia.org/wiki/$query" |
