Keeping a gun on the shelf may be a good idea, if done right.
Why a book gun
For centuries, people have hidden firearms inside hollowed out or even faux books. It keeps a firearm out of plain sight but retrievable in a few seconds if needed. It's historically a good way to protect the firearm from burglary. It can also conceal a firearm when traveling or to pass one from one person to another discreetly in public. In addition, it just has a certain type of swagger to it.
When you look around, a faux book turned into a hiding place isn't exactly rare. A quick search on eBay turns up 3500 of them. A Google search turns up even more. While some are obvious fakes and would stand out like a sore thumb on a bookcase, others are very realistic. Prices range from $2-$200 so shop around.
Make your own
Turning a real book into a hide-away is preferable to buying a faux book as it blends in more. It's a project that is easily accomplished in an afternoon or weekend with a very low cash outlay (under $10). Try not to use a well-known or classic book as this both destroys a piece of literature and makes it something that someone else wouldn't reach for when browsing your library. Old ratty textbooks, dictionaries, and obscure technical books are the best. Think, "boring." Boring is good.
The Book that is a gun
There are a couple of guns themselves, such as the UC-9 submachine gun and Magpul FMG9 pistol that can fold up into a book like shape to which a faux book spine can be attached. These neat little items are hard to find, as only 76 of the first one and 1 of the second currently exist, so good luck if you go with this option.
Don't let it be a total secret
Every year or so a news story pops up in the media where some small town library gets donated a book that holds a gun inside. Just last month the Porter County Public Library in Valparaiso Indiana had a collection of books dropped off, and one of them, sure enough, was packing heat. In a hollowed out book entitled the title "Outerbridge Reach," librarians stumbled across a .31 caliber black powder derringer. The thing is, it's not the first time that particular library had this happen. Moreover, it probably won't be the last.
This kind of thing occurs when people die and their friends, family, or sometimes just their property owner has to clean out the physical belongings left behind. If you have a bookcase or seven chuck full of books and your people have to move them to a new location, the fact that one of these is not as if the other may get easily missed.
So with that in mind, let someone know about your habit of hiding a Roscoe in your reading material, before a librarian gets a shock one morning.