The following quote is from the short story 1934年的逃亡 by Su Tong.
What does it mean to grow a Setaria_viridis in one's heart?
Chinese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Chinese language. It only takes a minute to sign up.Sign up to join this community
狗尾巴草 is a kind of weed against which peasants need to fight all the time, and it is famous for its strong vitality. So peasants and poets see 狗尾巴草 as a tough enemy. For a long time, 狗尾巴草 is called 莠 and had appeared in ancient poems and articles. Of course, its image is bad and negative.
In the paragraph you mentioned, 灰暗 plus 狗尾巴草 together imply evil thoughts.
The hidden meanings of 狗尾草 are as follow:
If you read through the story, you shall be able to pick one implication that fits the best.