Add option to create bookmark via dmenu
This commit is contained in:
@ -93,3 +93,4 @@ to open, copy and add bookmarks via dmenu/rofi.
|
|||||||
- [ ] Enhance `edit` arguments. Should take similar arguments as `open`.
|
- [ ] Enhance `edit` arguments. Should take similar arguments as `open`.
|
||||||
- [ ] Allow reading the bookmark file via stdin and writing it out via stdout.
|
- [ ] Allow reading the bookmark file via stdin and writing it out via stdout.
|
||||||
This would allow someone to easily encrypt their bookmarks if they wish.
|
This would allow someone to easily encrypt their bookmarks if they wish.
|
||||||
|
- [ ] Add notification on adding bookmark via dmenu
|
||||||
|
|||||||
@ -15,6 +15,5 @@ To list matching tags: `sxbm_dmenu +tag`
|
|||||||
* `-y` or `--yank` will copy the selected link to your clipboard
|
* `-y` or `--yank` will copy the selected link to your clipboard
|
||||||
(requires `xclip`) instead of opening them. Example: `sxbm_dmenu -y title`
|
(requires `xclip`) instead of opening them. Example: `sxbm_dmenu -y title`
|
||||||
|
|
||||||
* `-a` or `--add` is an alias to `sxbm add`.
|
* `-a` or `--add` pipes user input to `sxbm add`.
|
||||||
Example: `sxbm_dmenu -a link.com +tag`
|
Example: `sxbm_dmenu -a`
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
# Author: NRK
|
# Author: NRK
|
||||||
## Copyright 2021 NRK
|
## Copyright 2021 NRK
|
||||||
## Licensed under GPL v3. See LICENSE for more details.
|
## Licensed under GPL v3. See LICENSE for more details.
|
||||||
|
|
||||||
# Change "dmenu" to "rofi -dmenu" if you wish to use rofi
|
# Change "dmenu" to "rofi -dmenu" if you wish to use rofi
|
||||||
# NOTE: i do not use rofi, and haven't tested if it works or not
|
# NOTE: i do not use rofi, and haven't tested if it works or not
|
||||||
prompt="dmenu -i -l 24"
|
prompt="dmenu -i -l 24"
|
||||||
@ -21,7 +20,7 @@ bm_yank() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bm_add() {
|
bm_add() {
|
||||||
sxbm add "$@" 2>&1 | xargs -I{} $prompt -p {}
|
echo | $prompt -p "Add bookmark:" | xargs sxbm add | dmenu
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|||||||
Reference in New Issue
Block a user