aboutsummaryrefslogtreecommitdiffstats
path: root/.aliases
diff options
context:
space:
mode:
authorSindre Sorhus <sindresorhus@gmail.com>2013-08-27 18:25:49 +0200
committerMathias Bynens <mathias@qiwi.be>2013-08-27 18:52:24 +0200
commitbd9429af1cfdc7f4caa73e6f98773ed69a161c9c (patch)
tree64821fd5cc062ce5a4ecd7a8becb268004f1dc06 /.aliases
parent3803a98eaf001e2b96cb6513264c73a845035093 (diff)
downloaddotfiles-bd9429af1cfdc7f4caa73e6f98773ed69a161c9c.tar.gz
dotfiles-bd9429af1cfdc7f4caa73e6f98773ed69a161c9c.tar.bz2
dotfiles-bd9429af1cfdc7f4caa73e6f98773ed69a161c9c.zip
.aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them. Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them. Closes #236.
Diffstat (limited to '.aliases')
-rw-r--r--.aliases4
1 files changed, 4 insertions, 0 deletions
diff --git a/.aliases b/.aliases
index b605f7f..e3b623a 100644
--- a/.aliases
+++ b/.aliases
@@ -139,3 +139,7 @@ command -v grunt > /dev/null && alias grunt="grunt --stack"
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume 7'"
alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'"
+
+# Kill all the tabs in Chrome to free up memory
+# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
+alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"