Skip to content

tayfunulu/bashrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

System Resource Monitor Script (.bashrc)

Minimal MOTD

This bash script provides a summary of system resources including date & time, external IP address, memory usage, CPU temperature, system uptime, kernel version, weather information, and disk usage. The output is formatted to ensure alignment and readability.

Features

  • Date & Time: Displays the current date and time.
  • External IP: Retrieves and shows the external IP address.
  • Memory Usage: Displays memory usage in a visual bar format with percentage.
  • CPU Temperature: Shows the current CPU temperature.
  • Uptime: Displays how long the system has been running.
  • Kernel Version: Shows the current kernel version.
  • Weather: Displays the current weather.
  • Disk Usage: Shows disk usage for specified mount points in a visual bar format with percentage.

Usage

  1. Clone the Repository
git clone https://github.com/tayfunulu/bashrc.git
cd bashrc
  1. Make the Script Executable
chmod +x info.sh
  1. Run the Script
./info.sh
  1. Add on .bashrc
cd
echo "./bashrc/info.sh" >> .bashrc

Example Output

=========================================================
📅  Date & Time   : 05-August-2024 , 12:34
🌐  External IP   : 123.123.67.89
💾  Memory Usage  : [███████             ] 35% - 3.5G / 10G
🌡️  CPU Temp      : 45.2 °C
⏳  Uptime        : up 2 hours, 30 minutes
🔧  Kernel        : 5.15.0-76-generic
☀️  Weather       : 🌦️Light rain 20°C 88% (Your Location)
---------------------------------------------------------
💽  /dev/nvme0n1p2 Usage  : [███████████       ] 55% - 55G / 100G (/)
💽  /dev/sda1 Usage       : [████████          ] 40% - 1.4T / 3.6T (/media/tayfun/Toshiba4T)

A Picture from Termius app in iPad image

Customization

To customize the script for different mount points or additional features, you can edit the info.sh script and modify the show_disk_usage function to include additional or different mount points.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes or enhancements.

Author Tayfun ULU

About

.bashrc - System Resource Monitor Script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages