aboutsummaryrefslogtreecommitdiff
path: root/segments/uptime.sh
diff options
context:
space:
mode:
Diffstat (limited to 'segments/uptime.sh')
-rwxr-xr-xsegments/uptime.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/segments/uptime.sh b/segments/uptime.sh
new file mode 100755
index 0000000..276cfbe
--- /dev/null
+++ b/segments/uptime.sh
@@ -0,0 +1,6 @@
+# Prints the uptime.
+
+run_segment() {
+ uptime | grep -PZo "(?<=up )[^,]*"
+ return 0
+}