сряда, 27 ноември 2019 г.

Whatsapp not waking up phone

It turns out there is something called  "Advanced battery optimization". If you search for it, you can find it on your Android phone and under Whatsapp it should say "Not allowed". That solves the problem of Whatsapp happily sleeping all the time.

петък, 18 октомври 2019 г.

Disable speech-discpatcher

In Firefox about:config set to False:
reader.parse-on-load.enabled
media.webspeech.synth.enabled

and restart Firefox. That deals with the speech-dispatcher processes in the Volume control.

сряда, 4 септември 2019 г.

kile doesn't open okular

Kile has some non-sense DocumenViewer side-view which simply doesn't work well on a laptop screen. And I really prefer all the functionality of Okular. So I tried for a long time to open Okular on PdfView, but to no avail. Here's how it works: Settings->Configure Kile, Tools->Build->ViewPDF. There you should select Okular instead of DocumentView. Yay.
Also don't forget that you should disable Live Preview (in Settings->Kile) and in: Tools->View (you should have PDFLatex->PDF(Okular)).

петък, 22 март 2019 г.

qdbus

Something which apparently restart my wifi (?!) daemon. Whatever.  
$qdbus org.kde.kded5 /kded loadedModules | grep khotkeys

Unset default scripts/.desktop files Dolphin behaviour

In case, just like me, you try to execute your scripts, but they prefer to open in a text editor, here's how to reset this behaviour. In principle, that should be also modifiable by Dolphin-> Settings, but for some reason, I couldn't find this field.
So the easy and brutal way is to edit  ~/.config/kiorc, where the "do not ask again" is saved.
So if you want your sh files to run instead of to be opened in text editor, or the other way around, edit it, in the field:
'Executable scripts' which can be removed or edited to  'behaviourOnLaunch=alwaysAsk' (or "execute" or "open") source

събота, 16 март 2019 г.

free swap script

Something is writing over my swap for no reason at all and I don't know what it is. But anyway, I have this script which do a marvelous job in freing the swap.  Should be run by su of course

#!/bin/bash
sync ; echo 3 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 2 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 1 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 0 > /proc/sys/vm/drop_caches
swapoff -a
swapon -a

петък, 18 януари 2019 г.

To fix cvn wrong certificate problem

I was getting the following error while trying to update a code trough cvn
svn: E170013: Unable to connect to a repository at URL 'https://some.url' svn: E230001: Server SSL certificate verification failed:certificate expired
Since I'm not some pro with cvn I first checked the url - it works but indeed gives a security exception due to the expired certificate. I googled the solution, it is to add the option " --trust-server-cert"
 to the svn command, but that was impractical since the script for the svn command is 3000 lines long.
So a work-around which I found here (along with other solutions) was to delete ~/.subversion folder and then to do
#svn list https://url.you.need
and to press "p" to add a permanent exception. And it worked. Yay.

Create new keyboard shortcut

That's probably the dumbest keyboard shortcut one can create, but it's a fact. Since my touchpad is constantly freezing and I have to manually restart its drivers like every 30s at times, I decided to create a shortcut.
So after some digging, it turned out it's easy but not obvious. So on Sabayon, in order to reach the keyboards, you need to go to
SystemSettings->Shortcuts->Custom shortcuts (I'm translating this). Then New -> Name (Touch_Restart)  -> Keyboards (alt+.) -> Command in my case
#echo "sudo_pass" | sudo -S sh ~/scripts/touch_restart.sh
And f*ck you touchpad!
P.S. I don't know why the Custom shortcuts menu is not available form apps launcher. It's rather strange. But oh well.
P.S. For those who wonder, my touch_restart.sh looks like this:
#!/bin/bash
$sudo rmmod i2c_hid && $sudo modprobe i2c_hid