Skip to content

Commit

Permalink
Add script command: Show disk usage of / (root) (raycast#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Claven authored Apr 27, 2021
1 parent 511f335 commit 4f7eda4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions commands/system/disk-usage.sh
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"

0 comments on commit 4f7eda4

Please sign in to comment.