Listening to music while in the shower or using the restroom is a matter of adab (etiquette). Since it is a matter of adab, it cannot be considered haram, but at the most, makruh (disliked). According to the Hanafi tradition, in order to classify something as haram, there must be concrete, conclusive evidence strong in both explanation and narration, and it will not be open to interpretation. Even though some scholars say music is haram, listening to music, in general, is halal (permissible). As long as the music one is listening to does not urge towards sin, it is permissible. Since it is a matter of adab, or etiquette, the ruling on listening to music in the bathroom is makruh (assuming the music itself is not haram). In order for music to be considered haram, the words of the music must be openly against Islamic values. In addition to this, while listening to music, if it increases bohemian desires, which keeps a person away from God and entices them to sin, it should not be listened to.