Change default audio track/subtitles on mkv files with mkvtoolnix

First thing, have a look at the properties of the mkv file that you’re going to edit.
You can use mkvinfo but i prefer Mplay, it’s more clear.
Just open the file and with a right-click you can see the list of the audio tracks and subtitles.

Choose the default audio track that you want and take note of the track number (let’s image you want the 3rd one).
Now set the default flag for that track to 3 and the others to 0:
mkvpropedit filename --edit track:a1 --set flag-default=0 --edit track:a2 --set flag-default=0 --edit track:a3 --set flag-default=1

Do the same for the subtitles (set everything to 0 to disable subtitles):
mkvpropedit filename --edit track:s1 --set flag-default=0 --edit track:s2 --set flag-default=0

HP-2137sl volume bar configuration

Like described in the previous post, find both codes for increase/decrease volume with xev:

KeyPress event, serial 34, synthetic NO, window 0x3400001,
root 0x15d, subw 0x0, time 979988, (423,-222), root:(1017,104),
state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x3400001,
root 0x15d, subw 0x0, time 978476, (423,-222), root:(1017,104),
state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

Add those codes to ~/.xmodmaprc file:

keycode 121 = F24
keycode 122 = F25
keycode 123 = F26

And the corrispondent commands to ~/.xbindkeysrc:

# Muto
"amixer -c 0 sset Speaker,0 toggle"
m:0x10 + c:121
Mod2 + F24

# Abbassa volume
"amixer -c 0 sset Master 5%-"
m:0x10 + c:122
Mod2 + F25

# Alza volume
"amixer -c 0 sset Master 5%+"
m:0x10 + c:123
Mod2 + F26

I’ve added this command at the end of ~/.bashrc to have the key bindings loaded when X start:

xbindkeys -f /home/simplex/.xbindkeysrc

That’s all.

Audio mute/unmute hotkey on HP DV6-2137sl with Slackware/Linux

It could be useful sometimes, so…
Use xev to know the code generate by the button, type xev in a terminal and after a bit of some unnecessary codes, press the audio button, you will see something like this:

KeyRelease event, serial 34, synthetic NO, window 0x3800001,
root 0x15d, subw 0x0, time 7145078, (-71,-326), root:(523,0),
state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

The important part is keycode 121, in my case.
Create the file ~/.xmodmaprc and put in it:

keycode 121 = F24

F24 is an arbitrary code chosen by me, you can use whatever you want but i suggest F+number, greater than 12.
Now install xbindkeysrc, you can find it at slackbuilds.org, compile and install.
Then do

xbindkeys --defaults > /home/simplex/.xbindkeysrc

to create the default configuration.
Add the part for audio mute/unmute at the bottom:

# Muto
"amixer -c 0 sset Speaker,0 toggle"
m:0x10 + c:121
Mod2 + F24

Replace the 121 and F24 with your codes, the part in “” is the command that you want to run when the button is pressed, in this case the mute/unmute of our notebook speakers.
Next time, the volume bar!