TheRepoClub-DotFiles/.local/bin/rofi/bm_add
2024-08-20 18:25:13 +01:00

38 lines
636 B
Bash
Executable File

#!/usr/bin/env bash
#-*-coding:utf-8 -*-
#Auto updated?
# Yes
#File:
# bm_add
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github:
# https://github.com/The-Repo-Club/
#
#Created:
# Fri 09 December 2022, 06:43:52 AM [GMT]
#Modified:
# Fri 09 December 2022, 08:03:21 AM [GMT]
#
#Description:
# <Todo>
#
#Dependencies:
# bm
#
result() {
echo -n | rofi -dmenu -p "${1:-Add a bookmark:...}" -mesg "+ Add a Bookmark"
}
url="$(result "URL:")"
if [ -z "$url" ]; then
exit
fi
title="$(result "Title:")"
tags="$(result "Tags (comma delimited):")"
bm -w "$HOME/.config/rofi/bookmarks/" -a "$url" -T "$title" -t "$tags"