Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (21 sloc) 604 Bytes
#!/bin/bash
help() {
echo 'usage: firefox-sleep'
echo
echo ' suspend all firefox (and plugin) processes'
echo
echo " Note: it's advisable to add an 'alias ffs=firefox-sleep'"
echo
echo ' See also: firefox-wake'
echo
exit 1
}
[ "$1" == "--help" ] && help
# Debian has firefox-bin, firefox-esr and iceweasel
# Ubuntu has firefox
# Debian has fullpath with arguments
pkill -STOP -f "(^|/)+iceweasel( |$)+"
pkill -STOP -f "(^|/)+firefox(-bin)*( |$)+"
pkill -STOP -f "(^|/)+firefox-esr( |$)+"
pkill -STOP -f "x-www-browser"
pkill -STOP -f "(^|/)+plugin-container( |$)+"