Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Oct 2018, 19:37
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
My First Useful Xdotool Script
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
fmen

Joined: 07 May 2018
Posts: 51

PostPosted: Sat 19 May 2018, 18:34    Post subject:  My First Useful Xdotool Script  

This is a workaround to the problem of opening magnet files into Transmission from chromium.

The script opens any Chromium url in Palemoon including torrent sites were the magnet can then be downloaded via Transmission.

I am working on second script that bypasses Palemoon and copies the magnet url directly from chromium to Transmission.

I am a total newbie to linux, bash, xclip and xdotool but this is a great learning experience.

Code:

sleep .5
xdotool key ctrl+l
sleep .2
xdotool key ctrl+c
xdotool exec palemoon $(xclip -o)


To trigger the script, I've given it a keyboard shortcut Ctrl-Shift-m
Back to top
View user's profile Send private message 
fmen

Joined: 07 May 2018
Posts: 51

PostPosted: Sat 19 May 2018, 19:21    Post subject:  

Ah, here's a better workaround that downloads the magnet directly from chromium:

Place your mouse over the magnet symbol but do not click.
Trigger your keyboard shortcut instead.


Code:

xdotool click 3
sleep .1
xdotool key Down Down Down Down Return
xdotool exec transmission-gtk
sleep .5
xdotool key ctrl+u Return
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0257s ][ Queries: 11 (0.0046s) ][ GZIP on ]