💾 Archived View for jdj.golf › scripts captured on 2022-01-08 at 13:43:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

Here are some simple shell scripts I made.

Bookmarks

A script that will manage your bookmarks with dmenu instead of your browser. Using the -b flag will read from a plain text file, show you a site and it's url, and open the tab in your selected browser. If what you entered doesn't have a period in it, than the script will assume that your trying to look something up, and search for it in duckduckgo. Using the -a flag in a terminal will allow you to add a bookmark by entering "NameOfBookmark URL" in that format. Finally, the -d flag will in a terminal will delete any bookmark that has the string of text you entered. Make sure to change the first 2 lines of code to change the browser and location of your bookmarks file (if you want). The default browser is firefox and the default path to the bookmarks file is ~/.bookmarks.

Dependencies: awk dmenu

Download

Multicd

A script that will simply take you back x amount of directories as specified. Alias the command "source PATHOFSCRIPT" into your shellrc, and restart your shell. Now you can run "YOURALIAS x", x being how many directories you want to go up.

Dependencies: None

Download

Passmenu

A script that will read from a plain text file, and will give you the username and password of an account you selected from dmenu using the pass password manager. Upon starting the script, you can paste your username from the clipboard, and then use a hotkey to update a text file named var, that will then trigger the script to put your password into your clipboard. Text file should be formatted as "ExampleUsername NameOfPass" per line, NameOfPass being the name of what you made your password in, well, pass. Change the first line of the code (if you want), to the directory you'll be storing the accounts file and the var file.

Dependencies: awk dmenu pass xclip

Download

Qrgen

A script that will prompt you to type something, then will display a QR code of it. Useful for things like sending a url to your phone. Make sure to change the first line of code to your prefered image viewer, and to set $EDITOR enviromental variable to your prefered editor.

Dependencies: qrencode

Download

Scriptgen

A script that will automatically create a script with a shebang and give it premission to execute. Do "PATHOFSCRIPT LANGUAGE FILE", language being python or bash. Make sure $EDITOR enviromental variable is set to your prefered editor.

Dependencies: notify-send

Download