Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 02-16-2019, 03:52 AM   #1
netherking
Junior Member
netherking began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2019
Device: none
Autoscroll on Ubuntu

I've recently migrated from Windows 10 to Ubuntu 18.04. In Windows I was accustomed to using the middle mouse button to autoscroll while reading. On Ubuntu, upon extensive searching, I found out the middle mouse button does not have the same function, and setting it up to do the same is difficult/impossible.

Is there a dedicated autoscroll button in the Calibre Viewer? Alternately, is there a workaround any of the Ubuntu Calibre users have found for using the middle button to autoscroll?
netherking is offline   Reply With Quote
Old 02-16-2019, 01:04 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The viewer has no dedicated autoscroll feature
kovidgoyal is offline   Reply With Quote
Old 04-04-2019, 02:54 PM   #3
netherking
Junior Member
netherking began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2019
Device: none
Autoscroll using xdotool

I've been reading without autoscroll for a while, and found out that I missed it a bit too much. I wrote this simple bash script to auto scroll in the viewer alone.

Please keep in mind, since I have not built in an exit condition, the only way to stop the auto scroll is to press Ctrl+C on the terminal window that this script is running on. Avoid this script if you are unfamiliar with the terminal.

Code:
----------------------------------------------
#!/bin/bash
#xdotool script to autoscroll on Calibre viewer, adaptable for other viewers
input='a'
while [ $input=='a' ]
do
if [[ "$(xdotool getwindowfocus getwindowname)" =~ .*iewer.* ]]
then xdotool key Down
fi
sleep 0.04
done
----------------------------------------------

Instructions to install:
Save this code to .autoscroll.sh in the home folder of Ubuntu
NOTE: You need to navigate and call this script every time you want to initiate auto scroll so choose name and path accordingly
Open terminal
type "chmod 777 .autoscroll.sh" and hit enter

Instructions to run:
Open the book of your preference in the calibre viewer
type "./.autscroll.sh" and hit enter
Change tabs to the viewer. Auto scrolling will automatically commence. It will stop if you leave the window completely (minimize/open some other window)
To stop scrolling, go the the terminal window and hit Ctrl+C

Explanation of code:
Hits the down key every 0.04 seconds.
Adjust the sleep 'gap' line according to your reading speed

This is very rudimentary code, please suggest improvements.
netherking is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 16.04 howi42 Devices 5 09-22-2017 05:15 PM
Ubuntu UbuTab Android/Ubuntu OS device gbm Android Devices 1 01-21-2015 02:23 PM
Calibre E-book Viewer autoscroll? jsfrusing Library Management 1 07-12-2012 11:18 AM
App w/ autoscroll and epub ADE support? ReneeMR Android Devices 3 05-27-2012 11:09 AM
Autoscroll on e-ink readers? Archergal5219 Which one should I buy? 4 09-09-2008 01:08 PM


All times are GMT -4. The time now is 06:55 PM.


MobileRead.com is a privately owned, operated and funded community.