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

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
 

неделя, 23 декември 2018 г.

Fix lockscreen problem

After new installation, my sabayon lockscreen wouldn't unlock, even though the password was correct. A workaround was ctr+f2 and:
$sudo loginctl unlock-session 1

A fix is to do:
$sudo chmod u+s /usr/lib64/libexec/kcheckpass
Worked perfectly.

From here:
The correct permissions for /etc/shadow are root:root mode 600. The correct permissions for /sbin/unix_chkpwd depend on whether it was installed with USE=filecaps. If it was so installed, then the permissions should be 711. If it was installed with USE=-filecaps, then the permissions should be 4711.

понеделник, 17 декември 2018 г.

How to remove shortcut from your left win

I'm using my win key for switching keyboard layouts (because why the hell would you need to press alt+shift when you can just press win). So obviously the default shortcut connecting it with the start menu is not ok for me. I mean it makes sense for Windows users, but I'm using Linux for probably 10 years now, I use the start menu only to suspend the machine. For anything else I use alt+f2. So it's redundant and nonsensical. 
The major problem  is that when you assign the left win to the layout switcher, it doesn't automatically unassign it from the menu. So to do that, you need to:

You need to modify the kwinrc file in ~/.config/kwinrc
Group
[ModifierOnlyShortcuts]
Meta= 
 and then then 
>qdbus org.kde.KWin /KWin reconfigure

or 
 
kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta ""
 
source