Skip to main content

suda-xdotool-ctwm


* Note this script is a modification of Vedran Gligos' original script as installed on the online version of Suda which opens a vim session in an xterm then calls another script called suda-xdotool-test-2.sh which constantly writes out the manifesto to the vim window.

It should also be noted that the script below was created on a computer using a gb_uk keyboard layout ( as do the isos I have created)  - all keycodes passed to xdotool are based on that, if you are using this script on a different linux box as a modified standalone script you can check similarity with your keyboard layout by installing  xkeycaps via a package manager to check the codes given match your keyboard layout ( or change it to match).

Why did I need to modify the original script? It addresses the problem of loss of window focus due to mouse movements or other interactions from the vim window and subsequent unwanted or excessive interactions with other desktop processes( fun as they are) . The manifesto is usually printed out in an xterm running vim, called through either the Suda menu entry in the ctwm right-click menu or directly via the manifesto.sh (run at login?) shell script this also had to be altered from the original Suda implementation from ' xterm -e vim /suda-xdotool-test-2.sh' to ' xterm -e vim & lxterminal --geometry=23x12-4-35 -e ./suda-xdotool-ctwm.sh' as for the modifications to work correctly and focus on the vim window to be returned, a seperate terminal window needs to be opened and stay open, this seemed to be only possible in ctwm using lxterminal not xterm for some reason I couldn't work out.

Further information on xdotool can be found here https://linuxcommandlibrary.com/man/xdotool and xdotool keycodes can be found here https://gitlab.com/cunidev/gestures/-/wikis/xdotool-list-of-key-codes and information on xkeycaps here https://manpages.ubuntu.com/manpages/bionic/man1/xkeycaps.1.html 

Script is attached: manifesto.sh