a little repo with my bash scripts
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 12:32:50 +02:00
bookmarksBackup.sh added bookmarks backup script for firefox (linux) 2026-10-09 16:11:34 +02:00
README.md changed input for timer from second to minutes 2026-10-12 12:32:50 +02:00
timer.sh changed input for timer from second to minutes 2026-10-12 12:32:50 +02:00

here I have a little collection of useful bash scripts.

1) timer

description

1st one is the timer.sh. Just a little timer for terminal that I created cause didn't want install some clunky stuff on my computer. I think that I need to write some comments to understand how it actually works. Someone probably prefer use sound alert instead of spd-say. But I like this solution. Would be nice to add some notification, but for now I don't really need it.

usage

script uses seconds for input, but you can use expressions, such as 60 * 5 to set timer to 5 minutes. or, for example, 60 * 60 * 5 or just 60**2 * 5 for 5 hours timer :d. I've added multiplier by 60 to improve user experience. So now you can just type 5 for 5 minutes.

2) bookmarks backup

description

2nd is bookmarksBackup.sh. A simple script to automatically back up my browser bookmarks to a remote server. LibreWolf (and Firefox) saves bookmarks as compressed .jsonlz4 files in the profile folder, but the profile name changes on every install. So this script finds the default profile folder on its own, grabs the newest backup file, and sends it to my backup server using rsync over ssh. Very lightweight, does one job, and keeps things simple.

usage

before running the script, make sure to change the server address, username, and path in the remote_dest variable. You can also change the ssh port if your server uses a non-default one (default is 22).

make it executable and run it: chmod +x bookmarksBackup.sh

./bookmarksBackup.sh

you can also hook it up to a cron job or a shutdown hook if you want it to run automatically.