diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-05-22 07:17:57 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-05-22 07:17:57 +0900 |
| commit | 5bfcbf51837380bb54226cad7794e9353c5f05ed (patch) | |
| tree | 995399cebec895d2c26fc1fd9a9ba53bac0e6986 | |
| parent | 74ab83b4305727406d97d5c4becbb52145909334 (diff) | |
modified bin/bookmarks
| -rwxr-xr-x | ar/.local/bin/bookmarks | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ar/.local/bin/bookmarks b/ar/.local/bin/bookmarks index 1e5cfbf..4387966 100755 --- a/ar/.local/bin/bookmarks +++ b/ar/.local/bin/bookmarks @@ -29,6 +29,15 @@ usage() { echo " ${0##*/} -v # Opens browser boomark in private browser window" } +addurls() { + url=$(echo | dmenu -i -p "Enter a url: ") + [ -z "$url" ] && printf "Error: url must be provided\n\n" && exit 0 + + description=$(echo | dmenu -i -p "Enter a description of the url: ") + [ -z "$description" ] && echo "https://$url" >>~/.local/share/thesiah/snippets + [ -n "$description" ] && echo "$description https://$url" >>~/.local/share/thesiah/snippets +} + opentool() { available_tools="" command -v xdg-open 2>/dev/null | grep -v "alias" -q && available_tools="$available_tools xdg-open" @@ -187,8 +196,9 @@ copytoclipboard() { [ $# -eq 0 ] && usage && exit 1 -while getopts "bchopstv" opt; do +while getopts "abchopstv" opt; do case $opt in + a) addurls ;; b) openinbrowser "bookmark" ;; c) geturls "to copy" && copytoclipboard ;; o) geturls "to open in $BROWSER" && openwindow ;; |
