Based on the additional details—black and white, very pixelated graphics, swinging from powerlines, and floating bananas—it’s likely that the game you’re thinking of is Bananarama, also known as Monkeys! on the classic Macintosh.
Bananarama was a simple black-and-white game released in the mid-1980s, where the player controlled a monkey swinging from vines or powerlines, collecting bananas. The bananas often floated in mid-air and twirled, matching the description given. The game had a very pixelated look typical of early Macintosh games.
This seems to align closely with what you’ve described, so it might be the game you’re looking for!