dont try to code while standing on a train. one of many antpatterns a wise engineer should learn to avoid, as part of polishing our craft. also: dont juggle chainsaws, etc ;-)
Regarding terminals, how often does this requirement occur in practice? Assuming it does, you can probably use your laptop for it, in which case, see above.