Page 1 of 2

Xbindkeys + Xbindkeys-config

Posted: Tue 02 Nov 2010, 20:01
by aragon
Nothing new, nothing fancy, i just wanted to have them posted.

Xbindkeys
Home: http://www.nongnu.org/xbindkeys/xbindkeys.html
Version: 1.8.3
xbindkeys is a program that allows you to launch shell commands with your keyboard or your mouse under X Window. It links commands to keys or mouse buttons, using a configuration file. It's independant of the window manager and can capture all keyboard keys (ex: Power, Wake...).
To start xbindkeys on every systemstart, make a symlink in /root/Startup to /usr/bin/xbindkeys .

xbindkeys-config
Home: http://packages.debian.org/source/squee ... eys-config
Version: 0.1.3-3
an easy to use gtk program for configuring Xbindkeys
Thanks to Karl Godt, the issue with the non-working help-meu is gone.

Attached you'll find the new pet, and the patched source.

Applied patches:
* Debian, to run with gtk2
* Karl Godts help_menu patch
* updated makefile (and some more sourcefiles)

Starter is in Utility-Submenu.

Both apps are compiled and tested in 4.31.

aragon

Posted: Wed 03 Nov 2010, 20:30
by aragon
What i've forgotten to ask:
I've tried to erase the complete HELP-section of xbinkeys-config from the source. i was able to compile, but the app allways segfaults.

so if any of the more talented coders would have a look at that, i would be very thankful.

aragon

Posted: Wed 03 Nov 2010, 21:35
by pemasu
Should there be symlink in Startup from /us/bin/xbindkeys to make it active at every boot ?

Posted: Wed 03 Nov 2010, 21:57
by aragon
pemasu wrote:Should there be symlink in Startup from /us/bin/xbindkeys to make it active at every boot ?
yesno :shock:
yes: the user should have a symlink in Startup to autostart.
no: i try to not touch /root (although i'm not consequent with this).

i'll update my post.

aragon

Posted: Thu 04 Nov 2010, 06:27
by pemasu
Looks fine now, and it is much smaller than from ubuntu deb packages, it was over 1 Mb.

Good uses. For laptops, install acpitool, bind your suspend to ram key with acpitool -s. Bind PrtSc key with mt-paint snapshot executable. Dont remember now what it was.

Posted: Thu 04 Nov 2010, 21:24
by muggins
Aragon,

when I ran xbindkeys-config-wrapper it complains that:

Code: Select all

# xbindkeys-config-wrapper
# /usr/bin/xbindkeys-config-wrapper: line 23: xbindkeys_config: command not found
When I edited it to use xbindkeys-config, then it started OK.

Posted: Fri 05 Nov 2010, 06:30
by aragon
Ah, little bullshit on my side. I' ve rebuild the app to have - not _ and have forgotten to upgrade the wrapper...

Thanks for the info, will upgrade the pet.

Aragon

Posted: Fri 05 Nov 2010, 13:39
by aragon
fixed.

aragon

Posted: Sat 13 Nov 2010, 13:00
by Karl Godt
because iguleder compiled ./xbindkeys_config for dpup, too :

the HELP bug does also occur here on dpup-009

There are also three warnings :
menu.c: In function 'menu_open_file_ok':
menu.c:147: warning: assignment discards qualifiers from pointer target type
menu.c: In function 'menu_save_file_ok':
menu.c:197: warning: assignment discards qualifiers from pointer target type
menu.c: In function 'menu_append_file_ok':
menu.c:235: warning: assignment discards qualifiers from pointer target type

Code: Select all

diff -uraNd /xbindkeys_config-0.1.3/menu.c /xbindkeys_config-0.1.3.1/menu.c
--- /xbindkeys_config-0.1.3/menu.c	2010-11-13 13:44:14.000000000 +0100
+++ /xbindkeys_config-0.1.3.1/menu.c	2010-11-13 13:35:45.000000000 +0100
@@ -144,7 +144,7 @@
 gboolean menu_open_file_ok(GtkFileSelection *Sel)
 {
   gchar *nom;
-  nom=gtk_file_selection_get_filename(Sel);
+  nom = (char*)gtk_file_selection_get_filename(Sel);
   read_file(nom);
   return TRUE;
 }
@@ -194,7 +194,7 @@
 gboolean menu_save_file_ok(GtkFileSelection *Sel)
 {
   gchar *nom;
-  nom=gtk_file_selection_get_filename(Sel);
+  nom = (char*)gtk_file_selection_get_filename(Sel);
   save_file(nom);
   return TRUE;
 }
@@ -232,7 +232,7 @@
 gboolean menu_append_file_ok(GtkFileSelection *Sel)
 {
   gchar *nom;
-  nom=gtk_file_selection_get_filename(Sel);
+  nom = (char*)gtk_file_selection_get_filename(Sel); // cast (char*) to eliminate warning menu.c:235: warning: assignment discards qualifiers from pointer target type 
   append_file(nom);
   return TRUE;
 }
@@ -263,17 +263,22 @@
 		       " lapinator@gmx.fr\n\n");
 
   gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-		     (GtkSignalFunc)unlockabout, NULL);
+		     (GtkSignalFunc)gtk_widget_destroy, NULL);
   gtk_signal_connect_object(GTK_OBJECT(window), "delete_event",
-			    (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(window));
+			    (GtkSignalFunc)unlockabout, GTK_OBJECT(window));
   gtk_signal_connect(GTK_OBJECT(window), "destroy",
-		     (GtkSignalFunc)unlockabout, NULL);
-  gtk_signal_connect_object(GTK_OBJECT(window), "delete_event",
-			    (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(window));
+		     (GtkSignalFunc)gtk_widget_destroy, NULL);
+  gtk_signal_connect_object(GTK_OBJECT(window), "destroy",
+			    (GtkSignalFunc)unlockabout, GTK_OBJECT(window));
 
   gtk_container_add(GTK_CONTAINER(window),text);
   gtk_widget_set_sensitive (GTK_WIDGET(About), FALSE);
   gtk_widget_show_all(window);
+  
+  // gtk_widget_show(GTK_WIDGET(FichierDgl));
+
+  // lockfilewindow();
+  
 }
 
 #define MANUAL_TEXT "To edit action, first append item and select them.\n\nTo get key use button \"Get Key\", don't write \nthe key (only for expert).\n\n\n                        FIX ME  (HELP ME)\n\n\n"
@@ -307,13 +312,13 @@
   gtk_widget_set_usize(text,300,250);
   
    gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-		     (GtkSignalFunc)unlockmanual, NULL);
+		     (GtkSignalFunc)gtk_widget_destroy, NULL);
   gtk_signal_connect_object(GTK_OBJECT(window), "delete_event",
-			    (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(window));
+			    (GtkSignalFunc)unlockmanual, GTK_OBJECT(window));
   gtk_signal_connect(GTK_OBJECT(window), "destroy",
-		     (GtkSignalFunc)unlockmanual, NULL);
-  gtk_signal_connect_object(GTK_OBJECT(window), "delete_event",
-			    (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(window));
+		     (GtkSignalFunc)gtk_widget_destroy, NULL);
+  gtk_signal_connect_object(GTK_OBJECT(window), "destroy",
+			    (GtkSignalFunc)unlockmanual, GTK_OBJECT(window));
 
  
   /*gtk_label_set_justify (GTK_LABEL(text), GTK_JUSTIFY_LEFT);*/
@@ -321,6 +326,11 @@
   gtk_container_add(GTK_CONTAINER(window),vbox);
   gtk_widget_set_sensitive (GTK_WIDGET(Manual), FALSE);
   gtk_widget_show_all(window);
+  
+  // gtk_widget_show(GTK_WIDGET(FichierDgl));
+
+  // lockfilewindow();
+  
 }
 
 void lockfilewindow()
It seems to work with the char* cast after I've read severals in the net to const it, which was followed by errors at middle.h &| middle.c.
I thought because of reading a file, char would be the nearest idea and I don't know if long &| signed char * would do also.
The void menu_manual & void menu_about bugs are simple copy'n'paste turners by the author(s) I think.
The // gtk_widget_show(GTK_WIDGET(FichierDgl)); had been my first attempt after comparing the HELP functions with the working ones.

Posted: Tue 16 Nov 2010, 08:12
by aragon
hi karl,

thanks for the patch. will try that this evening.

aragon

Posted: Wed 17 Nov 2010, 08:29
by aragon
@Karl:

wonderful, the patch works. i'm actually preparing an updated source-package.

aragon

Posted: Sun 21 Nov 2010, 19:55
by aragon
uploaded new version as pet and source-package to first post.

aragon

Posted: Sun 21 Nov 2010, 21:05
by Iguleder
I didn't compile it, Karl :lol:

I used a PET someone gave me, maybe it's Aragon's, not sure. My newer Woof builds use a package template I made, so I no longer need a PET :)

Great work, Aragon. I really like your packages ... and you gave me the idea of using alsaplayer as a music player, what a great find :)

Posted: Mon 22 Nov 2010, 19:16
by aragon
Hi iguleder,

you might want to use the source-package. It's not perfect but works ok.

Aragon

Posted: Thu 02 Dec 2010, 23:08
by Karl Godt
Just installed the xbindkeys-config-0.1.3-3.pet on the ""old"" dpup-009 and it is working !

btw :
#!/bin/sh
#
# Wrapper for xbindkeys_config to have all needed parts in place.
#
# aragon, 20111105
# version: 0.2
#
# fixed xbindkeys_config vs. xbindkeys-config
I make many typing mistakes also ... and half is caused by too small keys and too sensitive touchpad and the common disordered keyboard layouts that aren't made for programming ....

There are people, who consider the year '0' as a year with 12 months and not as the point 31.December -1 24.00 o'clock or 01.01.01 00.00 o'clock.

Some astronomical programs seem really to use the whole year 0.

So I don't even know either if it had been -25 or -26 when in June there had been four planets in the sign of "BoLeo" ...

Romans consider around -750 their foundation and also Julius Caesar had been Priest of Jupiter I had read. Why he made the beginning of time some -4500 in the time of Fishes I really would have asked him with several legions in the back ...

Still happy days in the time of the wandering of the sun in the deepest dale !

Posted: Fri 03 Dec 2010, 07:35
by aragon
Hi karl, i had to read your message twice, to get it...

Seems to be a simple timetravel, but yes, typing dates is difficult...

Thanks
Aragon

Posted: Tue 07 Dec 2010, 17:26
by Karl Godt
Hi iguleder,

you might want to use the source-package. It's not perfect but works ok.

Aragon
I must confess that the xbindkeys-config-0.1.3-3.pet is working well on dpup-005

Many thanks !

Posted: Mon 16 May 2011, 15:31
by lithpr
FYI, working great on Lucid Puppy 5.2.5. Thank you very much for your hard work and some awesome .pets!

xbindkeys and jwm (root:3)

Posted: Tue 13 Dec 2011, 05:33
by recobayu
how to set xbindkey to show up the start menu?
i look at /root/.jwmrc, that's a command called root:3
how to run the command root:3 on terminal? so i can set it on xbindkey.
i want to make my windows button on my keyboard was used.

i added this: <Key keycode="115">root:3</Key> on the /root/.jwm/jwmrc-personal.

not only for start menu --> Winkey, but also for 'show desktop' --> Win + D, show rox --> Win + E, and etc.
can this is tobe reality?

Posted: Sat 21 Apr 2012, 01:23
by vtpup
Hmmm, seems to be kind of late notice for this, but xbindkeys-config tries to look for a folder in /root named .xbindkeysrc but that isn't present.

Shouldn't the folder that the above pets do put there, (named .xbindkeys-config-source-0.1.3-3) be re-named to suit? Or should there be a renaming link there?

The problem comes up when you try to add a key in xbindkey-config and then hit Get Key.

Nobody noticed this?