From d8d72d060d4bd4473bfe769673a2227bda948c97 Mon Sep 17 00:00:00 2001
From: ClementTsang <cjhtsang@uwaterloo.ca>
Date: Tue, 29 Dec 2020 18:32:38 -0500
Subject: [PATCH] docs: Mention that root may be needed on macOS

---
 FAQ.md                                       |  6 ++++++
 README.md                                    | 10 +++++-----
 deployment/macos/homebrew/bottom.rb.template |  8 ++++++++
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/FAQ.md b/FAQ.md
index 651a49b7..8edc6858 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -10,3 +10,9 @@ My graphs look kinda weird with some extra dots, how do I fix this?
 
 You'll have to make sure you have proper braille font support. For example, for Arch, you may have to
 install ttf-ubraille and/or properly set it up for your terminal.
+
+- [Why can't I see all my processes/process usage on macOS?]
+
+You may have to run the program with elevated privileges - i.e. `sudo btm`. If you don't like doing
+this repeatedly, you can manually force it to run with root each time - for example, following
+[this related guide from the htop wiki](https://github.com/hishamhm/htop/wiki/macOS:-run-without-sudo).
diff --git a/README.md b/README.md
index 871d606b..943a001e 100644
--- a/README.md
+++ b/README.md
@@ -724,11 +724,11 @@ Since this is only useful for devices like laptops, it is off by default. You ca
 
 The current compatibility of widgets with operating systems from personal testing:
 
-| OS      | CPU | Memory | Disks | Temperature                          | Processes/Search | Networks | Battery                                      |
-| ------- | --- | ------ | ----- | ------------------------------------ | ---------------- | -------- | -------------------------------------------- |
-| Linux   | ✓   | ✓      | ✓     | ✓                                    | ✓                | ✓        | ✓                                            |
-| Windows | ✓   | ✓      | ✓     | ? (seems to require elevated access) | ✓                | ✓        | ✓ (seems to have issues with dual batteries) |
-| macOS   | ✓   | ✓      | ✓     | ✓                                    | ✓                | ✓        | ✓                                            |
+| OS      | CPU | Memory | Disks | Temperature                          | Processes/Search                           | Networks | Battery                                      |
+| ------- | --- | ------ | ----- | ------------------------------------ | ------------------------------------------ | -------- | -------------------------------------------- |
+| Linux   | ✓   | ✓      | ✓     | ✓                                    | ✓                                          | ✓        | ✓                                            |
+| Windows | ✓   | ✓      | ✓     | ? (seems to require elevated access) | ✓                                          | ✓        | ✓ (seems to have issues with dual batteries) |
+| macOS   | ✓   | ✓      | ✓     | ✓                                    | ✓ (requires `sudo btm` to show everything) | ✓        | ✓                                            |
 
 ## FAQ
 
diff --git a/deployment/macos/homebrew/bottom.rb.template b/deployment/macos/homebrew/bottom.rb.template
index 0f8a8293..3c9445c3 100644
--- a/deployment/macos/homebrew/bottom.rb.template
+++ b/deployment/macos/homebrew/bottom.rb.template
@@ -18,5 +18,13 @@ class Bottom < Formula
       ohai "For runtime flags, see \"btm --help\""
       ohai "If you want to configure bottom, by default bottom looks for a file in $HOME/Library/Application Support/bottom.toml or $HOME/.config/bottom/bottom.toml"
     end
+
+    def caveats
+      <<~EOS
+        Note that bottom may require elevated privileges to correctly display information for all processes.
+        You can do this with `sudo btm`.
+        You should be certain that you trust any software you grant root privileges.
+      EOS
+    end 
   end
   
\ No newline at end of file