Using a Dell Mini 10 as an ebook reader in Ubuntu

We just purchased a Dell Mini 10v, and I've been quite happy with it so far. One of of the things that occurred to me after holding it, was that it would make a great e-book reader if I could rotate the screen 90 degrees and map one of the edge keys to "turn the page".

So, I whipped up a little script to do just that. It works very well with any book in HTML format, which means that I can load it in firefox, hit F11 to fill the screen, and read comfortably.

#!/bin/bash # # Author_ Chris Miller ( # # Emulates an ebookreader by rotating the screen 90 degrees and # mapping the windows key to pagedown # case $1 in   on)     echo "Mapping Win to PgDn..."     xmodmap -e "keycode 133 = Next"     echo "Rotating Screen"     xrandr --output LVDS --rotate right     echo "Done."     ;;   off)     echo "Mapping Win back to Win..."     xmodmap -e "keycode 133 = Super_L"     echo "Rotating Screen"     xrandr --output LVDS --rotate normal     echo "Done."   ;;   *)     echo "Usage: toggles screen rotation and windows key"     echo "to simulate an e-reader"     echo "ereadmode (on | off)"     ;; esac

To use it, save the script as "ebookmode", place it somewhere in your path, then make it executable. To start it, type "ebookmode on". To return to normal operation, type "ebookmode off".

Update_ After upgrading to Karmic, I had to replace "LVDS" with "LVDS1". You can check to see which output you're using by typing_ "xrandr -q" at the command line.


comments powered by Disqus