Xbindkeys + Xbindkeys-config

Miscellaneous tools
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

Xbindkeys + Xbindkeys-config

#1 Post 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
Attachments
xbindkeys-config-0.1.3-3.pet
(22.92 KiB) Downloaded 1244 times
xbindkeys-config-source-0.1.3-3.tar.gz
(20.27 KiB) Downloaded 938 times
xbindkeys-1.8.3.pet
(24.06 KiB) Downloaded 1275 times
Last edited by aragon on Sun 21 Nov 2010, 19:54, edited 4 times in total.
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#2 Post 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
User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#3 Post by pemasu »

Should there be symlink in Startup from /us/bin/xbindkeys to make it active at every boot ?
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#4 Post 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
User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#5 Post 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.
muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#6 Post 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.
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#7 Post 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
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#8 Post by aragon »

fixed.

aragon
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post 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.
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#10 Post by aragon »

hi karl,

thanks for the patch. will try that this evening.

aragon
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#11 Post by aragon »

@Karl:

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

aragon
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#12 Post by aragon »

uploaded new version as pet and source-package to first post.

aragon
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#13 Post 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 :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#14 Post by aragon »

Hi iguleder,

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

Aragon
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#15 Post 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 !
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#16 Post 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
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#17 Post 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 !
User avatar
lithpr
Posts: 86
Joined: Thu 10 Mar 2011, 06:33

#18 Post by lithpr »

FYI, working great on Lucid Puppy 5.2.5. Thank you very much for your hard work and some awesome .pets!
User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

xbindkeys and jwm (root:3)

#19 Post 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?
User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#20 Post 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?
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]
Post Reply