#!/bin/sh bookmark_file=~/.cache/bookmarks if [ -z "$1" ] then choice=$(cat $bookmark_file | dmenu -p 'Bookmarks' -l 50 -i | cut -d' ' -f1) [ -z "$choice" ] && exit || xdotool type --delay 0 "$choice" else echo "$1" >> $bookmark_file fi