🎨 Customize Your Terminal Shell with Oh My Bash

Oh My Bash is a powerful framework for managing your Bash configuration. By default, it offers various themes to personalize your terminal. But what if you want your terminal to dynamically change its theme based on the environment or directory you’re working in? This post will guide you through a script that achieves just that. The Script: Dynamic Theme Switching The following script dynamically updates the Oh My Bash theme based on your current environment and directory. Here’s the code: ...

2025-01-14 Â· map[name:Jose Castrillo]

👨‍💻 Tunning your Devbox shell

Using Oh-My-Bash with Jetify Devbox: A Step-by-Step Guide If you’re a developer working with Jetify Devbox, you might have noticed that its shell environment doesn’t always play nicely with Oh-My-Bash. By following these steps, you can customize and personalize your themes and PS1 prompt to create a more enjoyable and productive shell experience. Step 1: Install Oh-My-Bash First, you need to install Oh-My-Bash. You can do this by running the following command in your terminal: ...

Create a job using crontab

To automate tasks or create some monitoring job we can use the older and efficient tool the “CronJob”. For our example, I’ve created a simple script to detect the cache memory and clean it if raise to a condition then send a notification by mail. Library used: exim4 (mail server) or ssmtp (mail server). Both uses the same “mail” command. Script: # grab the buff/cache memory mem="$(free -m | grep 'Mem:' | awk '{print $6}')" if (( $mem > 350 )) then echo 'wooo is more than 250M' echo 3 | sudo tee /proc/sys/vm/drop_caches echo 'cache dropped' echo "Memory buff/cache cleaned last value:" $mem | mail -s "cache_memory" target_mail@local.com else echo 'be cool man, memory lower' fi script path: /user/Documents/script/memory ...

2019-04-03 Â· map[name:Jose Castrillo]