forked from raycast/script-commands
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script command: Show disk usage of / (root) (raycast#375)
- Loading branch information
Jesse Claven
authored
Apr 27, 2021
1 parent
511f335
commit 4f7eda4
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Required parameters: | ||
# @raycast.schemaVersion 1 | ||
# @raycast.title Disk Usage | ||
# @raycast.mode inline | ||
# @raycast.refreshTime 1m | ||
|
||
# Optional parameters: | ||
# @raycast.icon 💿 | ||
# @raycast.packageName System | ||
|
||
# Documentation: | ||
# @raycast.description Show disk usage for / (root) | ||
# @raycast.author Jesse Claven | ||
# @raycast.authorURL https://github.com/jesse-c | ||
|
||
# Example: | ||
# | ||
# Filesystem Size Used Avail Capacity iused ifree %iused Mounted on | ||
# /dev/disk1s6s1 113Gi 15Gi 3.4Gi 82% 563983 1182278497 0% / | ||
|
||
x=$(df -h / | awk 'FNR == 2 {printf "Root: %s available of %s",$4,$2;}') | ||
|
||
echo "$x" | ||
|