Suppose if there is a huge mess on Dock due to so many applications icons then it become hard to identify the running active applications quickly.
Here, a simple method which you may adopt to view only active applications on Mac dock and also the method to bring back all application icons. you can also see how to customize mac dock or add or remove applications in dock.
How to show only active application icons
Step 1
Click on Finder

Step 2
Go to Applications > Utilities and then double click on Terminal to launch

Step 3
Type following commands one after one in terminal and hit Enter key
defaults write com.apple.dock static-only -bool TRUE
and then
killall Dock

Observe the following change in your Dock that it just only shows the active application’s icons
How to bring back all application icons on dock?
To bring back all application’s icons on Dock just set static-only -bool value to FALSE in query
Step 1
Type this command in terminal and press Enter key
defaults write com.apple.dock static-only -bool FALSE
and then run following command
killall Dock

See, in Dock all the icons of application’s are back
