gkrellm2 – changing the next/prev theme shortcut

Gkrellm2 is a “widget” that displays different system/etc. monitors at the side of the screen. It has keyboard shortcuts (PageUp and PageDown) to change the selected theme. So, if you change desktops and widow focus alot, it somethimes happens that gkrellm is focused by mistake, and by using the PageUp/Down keys, you change the theme when you didn’t want to.

I have no idea why, but the key combination is hardcoded in src/gui.c.

Here is the patch to change the combination to Control+PageUp:

diff -Naur gkrellm-2.3.5-old/src/gui.c gkrellm-2.3.5-new/src/gui.c
--- gkrellm-2.3.5-old/src/gui.c 2010-09-14 23:01:17.000000000 +0200
+++ gkrellm-2.3.5-new/src/gui.c 2016-07-20 11:31:48.256463308 +0200
@@ -2476,8 +2476,8 @@
 {"/-",                            NULL,        NULL,                                   0, "<Separator>"},
 {N_("/Configuration"), "F1",   create_config_window,   0, "<Item>"},
-{N_("/Theme/Prev"), "Page_Up", cb_load_theme,  THEME_ALT_PREV, "<Item>"},
-{N_("/Theme/Next"), "Page_Down", cb_load_theme,        THEME_ALT_NEXT, "<Item>"},
+{N_("/Theme/Prev"), "<control><shift>Page_Up", cb_load_theme,  THEME_ALT_PREV, "<Item>"},
+{N_("/Theme/Next"), "<control><shift>Page_Down", cb_load_theme,        THEME_ALT_NEXT, "<Item>"},
 {"/-",                            NULL,        NULL,                                   0, "<Separator>"},
 {N_("/Quit"),             NULL,        gtk_main_quit,                  0, "<Item>"},
 {"/-",                            NULL,        NULL,                                   0, "<Separator>"},


If you’re using gentoo. just put the file in /etc/portage/patches/app-admin/gkrellm and reemerge the package.