петък, 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