Skip to content

Instantly share code, notes, and snippets.

View Joao-Peterson's full-sized avatar
💭
Procastinating...

Peterson Scheffer Joao-Peterson

💭
Procastinating...
View GitHub Profile
@Joao-Peterson
Joao-Peterson / gmk67_linux.md
Last active May 6, 2024 22:45
Using GMK67 keyboard in linux. Function keys not working with Fn!

GMK67 with Archlinux!

Recently i bought a zuoya gmk67 keyboard, it doesn't have a function keys row and has a knob for volume control. Unfortunately, if you plug your gmk67 in a archlinux machine you will notice that using fn+1 will not produce f1 as expected, it will produce a screen brightness decrease, and if you change the physical switch in the back for the macOS mode, the function keys now work, but the modifier keys don't, quite stressful.

Fear not, you can either alter your system configuration so the keyboard functions normally, as in this gist, or remap the keys, as seen in the gist Using GMK67 keyboard in linux with key remaps!.

For this gist we are going to alter the configuration for the apple hid driver on archlinux, since this keyboard uses it, and alter the functionality of the Fn key.

This is tested on archlinux, for any other distro you might have to figure out yourself the correponding commands!

@Joao-Peterson
Joao-Peterson / gmk67-manual.md
Last active May 13, 2024 13:41
GMK67 manual (English)
@Joao-Peterson
Joao-Peterson / gmk67_linux.md
Last active March 25, 2024 12:59
Using GMK67 keyboard in linux with key remaps!

GMK67 with Linux!

Recently i bought a zuoya gmk67 keyboard, it doesn't have a function keys row and has a know for volume control. Unfortunately, if you plug your gmk67 in a linux machine you will notice that using fn+1 will not produce f1 as expected, it will produce a screen brightness decrease, and if you change the physical switch in the back for the macOS mode, the function keys now work, but the modifier keys don't, quite stressful.

Fear not, you can either remap the keys, as in this gist, or alter your system configuration so the keyboard functions normally, as seen in the gist Using GMK67 keyboard in linux. Function keys not working with Fn!.

For this gist, we can simply remap some keys while the physical switch in the back is in windows mode. For that let's install keyd, a remapping tool daemon.

Install

@Joao-Peterson
Joao-Peterson / synctex-vscode-okular.md
Created October 20, 2022 07:50
Latex/Synctex forward/reverse search between vscode and Okular

On vscode you can setup a build task like this:

vscode -> okular

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
@Joao-Peterson
Joao-Peterson / kdecontainments.md
Created October 19, 2022 21:25
KDE plasma taskbar fix on display change

KDE plasma taskbar fix on display change

Recently i connected another display to my laptop, and after putting it in sleep mode and then removing the HDMI cable and after opening it up again i found my KDE plasma desktop missing, the taskbar, widgets and other "plasmoid" thingys, they were in the now disconnected display, even if it was not there.

For a fix i altered the following files on the premisse that KDE stores a lastdisplay property in a config file as means to remember where things belong, and in this sleep/disconnect thing this property did not got updated as it should.

The fix was to alter the property manually in the KDE plasma desktop file, it stores all the widgets and plasmoids data.

Back up your files if you dont know what you are doing!

@Joao-Peterson
Joao-Peterson / rename.md
Created October 17, 2022 15:25
Rename a batch of files to lowercase

Rename a batch of files to lowercase

Using the perl-rename tool:

$ pacman -S perl-rename

Then: