Created
November 27, 2022 18:39
-
-
Save qolarnix/28b83ba03a184cdb1246ac9759d5296d to your computer and use it in GitHub Desktop.
FreeBSD Polybar Module - Drive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/php | |
<?php | |
$drive_cap_raw = shell_exec('df -h | grep default'); | |
$drive_cap_arr = explode(' ', $drive_cap_raw); | |
$drive_cap_clean = str_replace(' ', '', $drive_cap_arr[4]); | |
echo 'Root: '.$drive_cap_clean; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment