I will never see a shadow person the same again Awake. Thank you for warping my mind just a little more than it already is. Squirrels need love too, at least my husband thinks so. He tries to make them outdoor pets. I don't approve but it's better than being a crazy cat person and he loves cats so I pick my battles. When you feed the squirrels, they get more friendly and don't give you a personal bubble...and so do shadows. Genius.
The traditional ways of warding/sanctifying one's home apply. If you don't have free run of your home/building, do it in your apartment or room.
If they're trying to get your attention, it doesn't hurt to try to commune with them, learn from them, observe them, etc. Usually, anyway. If you feel uneasy, afraid, or otherwise start getting depressed, angry, etc. during the whole experience, they tend to be getting a kick out of the negative energy and you might want to work banishing rituals.
Floor scrubs, sage, the LBRP, and similar methods will help banish their presence initially from the home/room/etc. Using anointing oils, runes, sigils, or any number of similar protective measures will help make them stay out.
Keep in mind that they are lesser spirits, if you get the negativity vibe. They are feeding off of your negative energy and negative emotions because that's all that they can feel. They envy, and are jealous of your capacity to feel the "greater" emotions, and your ability to instill such emotions in others. Born of such jealousy, they simply try to create emotion by making you feel what they know - anger, jealousy, depression, etc. They are worth your pity, but not worth worrying about.
I say this in a general sense. There are always exception to the "rule," but it is extremely rare that any such entity is actually a being of any significance. Far more frequently, an individual just allows these spirits to get the upper hand emotionally, and one's imagination gets away from one's self.