Force Qt apps to use the currently selected Gnome 3 icon theme

Wednesday, February 26, 2014

Gconf, Dconf, Gsettings too many settings storages for Gnome. Although the latest Gnome 3 uses GSettings only, Qt 4.x still relies on Gconf from Gnome 2.x. So changing the icon theme in Gnome 3 doesn't affect Qt apps. What you need is to copy the theme name from Gsettings to GConf via this command:

$ gconftool-2 --type=string --set "/desktop/gnome/interface/icon_theme" `gsettings get org.gnome.desktop.interface icon-theme | tr -d "'"`

and restart the Qt app.

How to paste from PRIMARY selection buffer via keyboard shortcut

Monday, February 17, 2014

In your desktop environment of choice, go to keyboard shortcuts setting and create a new shortcut with the command:

$ sh -c 'xsel | xvkbd -file - 2>/dev/null'

and set the desired key combination.

Using Focusrite Scarlett 18i6 in Linux, Part II

Thursday, August 8, 2013

Earlier I posted how to patch ALSA for Scarlett. Apparently it didn't work for everyone.

Didn't work quite well for me either. Every time I put my computer to sleep, after resume Scarlett lose the connection and there was nothing I could do to bring it back, except rebooting the computer. I got so tired of it that I even switched to internal sound card on my motherboard.

Recently I found another way that some may find suitable too. Digital inputs! That's right, if you're okay to use Scarlett for playback only and you value the sound quality, digital inputs is the way to go. Scarlett has two options in fact, ADAT via TOSLINK and S/PDIF via RCA.

Luckily my motherboard is equipped with S/PDIF as well, TOSLINK and internal S/PDIF connector. Some motherboards may have ready S/PSID RCA output on rear panel. At least I had to spend 30 min with soldering iron to get a bracket like this:

Boot to Windows and enable S/PDIF inputs in Scarlett MixControl panel, if they are not enabled for some reason yet. Scarlett will remember the settings, so no need to do it again. Enjoy!

Expanding wildcards with qmake

Tuesday, March 26, 2013

I was always wondering why doing something like this never worked

SOURCES += *.cpp
SOURCES -= excluded.cpp

excluded.cpp always stayed in SOURCES. The thing is that when you add a new value to the list, it's just a string. Thus using wildcard in files names is nothing more but an asteriks character. And therefore using -= operator will only remove exact strings. But today I found another undocumented function I've been looking for years!

$$files(glob) — Returns a list of files which match the specified glob pattern.

So now I can do

SOURCES += $$files(*.cpp)
SOURCES -= excluded.cpp

and it actually works.

Enable icons in menus and buttons for Qt apps in Ubuntu 12.04.2

Wednesday, March 20, 2013

Way too many things broken in recent Ubuntu releases, should have stayed on 10.04 forever perhaps. Anyways, there is a fix:

$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

<- Newer Posts Older Posts ->