Monday, March 10, 2014

Configuring extra mouse buttons in Linux

Most of mice's manufacturers don't support Linux to the extent that they would actually make a software where one could easily customize their mouse. There is no reason to despair though, the process is very, very simple.

We will need three packages - sudo apt-get install xbindkeys xautomation xev

Figuring out the button number

Now, we need to figure out which number corresponds with which mouse button. Run xev. A window will appear and by clicking a button on it the terminal will tell you to which number it is mapped:

ButtonPress event, serial 37, synthetic NO, window 0x3200001,
    root 0xb8, subw 0x0, time 18124629, (152,106), root:(1596,237),
    state 0x10, button 6, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x3200001,
    root 0xb8, subw 0x0, time 18124629, (152,106), root:(1596,237),
    state 0x10, button 6, same_screen YES

This means the clicked button is 6. We will need that later.

Setting up the script

Now is the time to look at xbindkeys. It is a program which translates certain buttons to other buttons. Sounds simple? That's because it is. Run xbindkeys --defaults > $HOME/.xbindkeysrc to create a config file. Then open the file and customize it. If we, for example, wanted to have button #6 translated to Alt+Left, we would add this entry:

"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
b:6

Restart xbindkeys by running killall xbindkeys followed by xbindkeys.

Care about not having spaces before b:6 - it didn't work for me when they were there.
And that is all. You can create others on your own, look up xev for more info about the syntax.

Tags: Logitech Linux mouse extra buttons custom setting

Monday, January 20, 2014

Bring Me The Horizon - And The Snakes Start to Sing

Credits to http://www.youtube.com/watch?v=_Wzr114x84I. I merely rewrote the tabs. They are not complete and not 100% accurate with what Dennis plays. In some cases I chose easier fingering, when it might have been better to have the strings keep ringing.

(Note, ^ marks bending the preceding string. There are different bends, but you will have to figure that out by yourself from listening. It won't be hard though.)

Verse riff (2x)
----------------------------------------------------------------| 
----------------------------------------------------------------| 
---------------10-7--------3-0----------------------------------| 
---8-5------------------------------8-5---------12-8-----12-8---| 
----------------------------------------------------------------| 
-5--------5/8-8----------1--------5-------5/8-8-------10--------| 

Solo
----------------------------------------------------| 
----------------------------------------------------| 
-7^--------------7^---------------------------------| 
-------8/10-7-------10-8-10-7---7-8-7-5-7-5---------| 
----------------------------------------------8-5---| 
----------------------------------------------------| 


-----------------------------------------------------| 
-----------------------------------------------------| 
------------------------------------7-----7/10-------| 
------------------12---------------------------------| 
--5/10--------10-----10----5----6------6-------------| 
-----------------------------------------------------| 


-10^------------------10^-------------------------------------| 
--------11/13-10-----------13-11-13-10--10-11-10-8-10-8-------| 
--------------------------------------------------------10-10-| 
--------------------------------------------------------------| 
--------------------------------------------------------------| 
--------------------------------------------------------------| 

--------------------------------------------------------| 
-----------------15-----------------------13------------| 
-10/12-------12------12--------------------------14-----| 
---------------------------------------12----12---------| 
--------------------------------------------------------| 
--------------------------------------------------------| 

Aftersolo
(4x)

---------------------------------------------------------------| 
---------------------------------------------------------------| 
---------------------------------------------------------------| 
-------12^---------12^-----------12^---------------------------| 
-10-10--------10----------13-13--------5/6--6--6--6\9--9--9----| 
---------------------------------------------------------------| 


---------------------------------------------------------------| 
---------------------------------------------------------------| 
---------------------------------------------------------------| 
-------12^---------12^-----------12^---------------------------| 
-10-10--------10----------13-13--------5/6--6--6--6\3--3--3----| 
---------------------------------------------------------------|