I'd run power from the battery to a relay that's signaled by switched power.
that way you'll never have to worry about leaving it on when your truck isn't running.
Yeah I know that sounds complicated but it isn't. If I can do this stuff anyone can.
Besides you'll thank yourself in the long run when you can look at your CB as an asset rather than an "oh shit did I leave it on" liability.