Re: [dev] sbm dmenu bookmarker

2023-08-02 Thread Randy Palamar
> How do you avoid duplicates

`grep -q "https://url.com; $BOOKMARKS \
&& echo "https://url.com based,bloat" >> $BOOKMARKS`

> and edit existing booksmarks?

??? it's just a simple text file.

In all seriousness I like to keep the bookmarks grouped and easily
readable so I open the file in vis, insert the bookmark wherever,
and use the  operator to align the
comments/tags. But that's not really necessary.



Re: [dev] sbm dmenu bookmarker

2023-08-01 Thread Страхиња Радић
On 23/07/31 08:15AM, Randy Palamar wrote:
> `grep -v -e '#' -e '^$' $BOOKMARKS | dmenu -i -l 20 | cut -f 1 -d ' '`
> 
> Then I pipe it to the clipboard or a plumber script depending
> on what I want to do with it (bound to a keybind in dwm).
> 
> To add bookmarks I either use a text editor or just echo:
> 
> `echo "https://nsa.gov file sharing, hosting provider" >> $BOOKMARKS`

Since bookmarks are related to the Web, I usually keep them inside of my 
bloated web browser for the bloated Web (the very term [in the digital 
sense] originates from Netscape IIRC). They can be copied to the clipboard from 
there and pasted into st. Anything else I just type out. ¯\_(ツ)_/¯


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-08-01 Thread Spenser Truex
Thanks for your feedbacks, however, the script bm is the
simplification/attempted improvement of of bmks which I got from some
unknown source (apologies if you are the uncredited author).
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Spenser Truex
On 23/07/31 08:15AM, Randy Palamar wrote:
> Hi,
>
> I think this script is way too complicated for what it does. I
> do the following:
>
> `grep -v -e '#' -e '^$' $BOOKMARKS | dmenu -i -l 20 | cut -f 1 -d ' '`
>
> Then I pipe it to the clipboard or a plumber script depending
> on what I want to do with it (bound to a keybind in dwm).
>
> To add bookmarks I either use a text editor or just echo:
>
> `echo "https://nsa.gov file sharing, hosting provider" >> $BOOKMARKS`

How do you avoid duplicates and edit existing booksmarks?

Admittedly my script doesn't do these things at the moment.

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Spenser Truex
> You should really get rid of the useless use of cats (it's common enough
> mistake that it even has an abbreviation - UUOC [0]).

Oh crap, coming right up.

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Randy Palamar
Hi,

I think this script is way too complicated for what it does. I
do the following:

`grep -v -e '#' -e '^$' $BOOKMARKS | dmenu -i -l 20 | cut -f 1 -d ' '`

Then I pipe it to the clipboard or a plumber script depending
on what I want to do with it (bound to a keybind in dwm).

To add bookmarks I either use a text editor or just echo:

`echo "https://nsa.gov file sharing, hosting provider" >> $BOOKMARKS`

- Randy

On Sun, Jul 30, 2023 at 3:25 PM Spenser Truex  wrote:
>
> A friend of mine was impressed with how quickly I was spamming the most
> based and redpilled links from this script and wanted me to publish it.
>
> screenhots etc.
> https://equwal.com/posts/sbm
> the "code"
> https://github.com/equwal/sbm
>
> It's still rough around the edges, I'd like to be able to have some
> input validation (no duplicate links) and plumbing options (browse
> where? copy to what?).
>
> As it stands, it just copies to clipboard which is probably good enough.
> --
> CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
> Spenser Truexhttps://equwal.com



Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Roberto E. Vargas Caballero
Hi,

On Sun, Jul 30, 2023 at 05:18:35PM -0300, Spenser Truex wrote:
> A friend of mine was impressed with how quickly I was spamming the most
> based and redpilled links from this script and wanted me to publish it.

I have a simple script also based in dmenu for this task, but yours is much
more complete!

> screenhots etc.
> https://equwal.com/posts/sbm
> the "code"
> https://github.com/equwal/sbm

It seems nice, I will give it a try.

> It's still rough around the edges, I'd like to be able to have some
> input validation (no duplicate links) and plumbing options (browse
> where? copy to what?).

I think is nice to copy to primary.


I saw that you use bash in the shebang, but you actually don't use any bash
feature. Did you consider to make it POSIX compliant?

Regards,



Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread NRK
On Sun, Jul 30, 2023 at 05:18:35PM -0300, Spenser Truex wrote:
> A friend of mine was impressed with how quickly I was spamming the most
> based and redpilled links from this script and wanted me to publish it.

Best marketing for a bookmark program ever.

> the "code"
> https://github.com/equwal/sbm

You should really get rid of the useless use of cats (it's common enough
mistake that it even has an abbreviation - UUOC [0]).

Most unix commands accept a file, so instead of `cat file | sort` you
can just do `sort file`. And in cases where the command doesn't accept a
file, you can use shell redirection, e.g `https://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat

- NRK



[dev] sbm dmenu bookmarker

2023-07-30 Thread Spenser Truex
A friend of mine was impressed with how quickly I was spamming the most
based and redpilled links from this script and wanted me to publish it.

screenhots etc.
https://equwal.com/posts/sbm
the "code"
https://github.com/equwal/sbm

It's still rough around the edges, I'd like to be able to have some
input validation (no duplicate links) and plumbing options (browse
where? copy to what?).

As it stands, it just copies to clipboard which is probably good enough.
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature