Linux
Ubuntu/Debian
Tweaks
Keyboard & layouts
My preferences:
Caps
asCtrl
LCtrl
enables English layoutRCtrl
enables Russian layoutRAlt
switches to other layout when pressedPrtSc
works as the Compose key
How to
Discrete GPU
$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics ...
$ # hmm
$ DRI_PRIME=1 glxinfo | grep OpenGL renderer
OpenGL renderer string: AMD HAINAN ...
$ # a-ha!
$ DRI_PRIME=1 ./game
Customizing xdg-open
Example of .desktop file (put in ~/.local/share/applications
):
[Desktop Entry]
Version=1.0
Name=GNU Emacs (GUI)
GenericName=Text Editor
Comment=GNU Emacs is an extensible, customizable text editor - and more
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/usr/bin/emacsclient -c %F
Icon=emacs25
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;
How to get the type:
$ mimetype foo.jpg
How to associate app (its .desktop file) with type:
$ xdg-mime default imv.desktop image/jpeg
(source)