You are not logged in.

#126 2013-06-15 21:28:13

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Interrobang: a tiny menu packing a big bang (syntax)

I just learnt something. Thanks!

Offline

#127 2013-06-16 14:03:17

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Hello,

Is this strictly for use with DWM? Or should it work on other WMs?

I just tried running Interrobang in Awesome using the example config file and am getting a core dump.

Keith

Offline

#128 2013-06-16 14:07:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

No, I don't use dwm.  It should work with any window manager.

Try removing the config and see if it starts.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#129 2013-06-16 14:47:50

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Still no luck:

$ interrobang
[1]    15278 segmentation fault (core dumped)  interrobang

Offline

#130 2013-06-16 15:13:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Can you provide (through a pastebin site) the output of `strace interrobang`.

EDIT: and before that, even easier: the output of `locale`

Also try `interrobang -v`

Last edited by Trilby (2013-06-16 15:20:44)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#131 2013-06-16 16:22:44

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Here you go:

Locale:

LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

interrobang -v

INTERROBANG, version 0.1
Copyright (C) 2013 Jesse McClure
License GPLv3 <http://gnu.org/licenses/gpl.html>

strace: http://pastebin.com/pjmu0BJH

Offline

#132 2013-06-16 16:55:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Thanks,  that clearly pinpoints the problem - but I'm clueless why that would fail.  It's segfaulting on line 223 on the call to XOpenIM, but there's nothing passed to the function that could be failing in interrobang.  I suspect there may be a missing dependency.

Do you have the following file, eg, does this command pass: `file /usr/share/X11/locale/en_US.UTF-8/Compose`

EDIT: I'm not sure if it could matter, but interrobang does use LC_CTYPE and in your locale output that is not quoted, in mine it is.  It would be easy enough to test:

LC_CTYPE="en_US.utf8" interrobang

Er ... on that, why is UTF capitalized in your output?  I thought those settings were case sensitive.  More importantly, why is there a hypen?  (EDIT: it seems various documentation varies on whether this is capitalized and/or hyphenated).

Last edited by Trilby (2013-06-16 17:08:39)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#133 2013-06-16 17:11:34

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Just to clarify, the wiki documents having "en_US.UTF-8" as being the standard (though as you pointed out Trilby, that's not entirely agreed upon—though, that is how they are listed in /etc/locale.gen). Having said that, LC_CTYPE should be quoted, it certainly is in all the setups I've seen.

All the best,

-HG

Last edited by HalosGhost (2013-06-16 17:12:07)

Offline

#134 2013-06-16 17:14:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Even our wiki is inconsistent using all combinations of caps/lower hyphen/no-hyphen at different places on the same page.  I *guess* that means it doesn't matter.  But I've been looking now, and I can't find any real standards for it.  `man localectl` has lowercase and no hyphen.

Last edited by Trilby (2013-06-16 17:16:00)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#135 2013-06-16 20:39:47

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

That is strange. It's been a while, but I'm pretty sure I just used locale-gen to setup the locale settings for this machine.

Do you have the following file, eg, does this command pass: `file /usr/share/X11/locale/en_US.UTF-8/Compose`

Yes, I have that file.

EDIT: I'm not sure if it could matter, but interrobang does use LC_CTYPE and in your locale output that is not quoted, in mine it is.  It would be easy enough to test:

LC_CTYPE="en_US.utf8" interrobang

I tried this, using both lower case and uppercase with a hyphen, both in quotes, and both times is segfaulted.

I have another machine with Arch that was installed more recently. I will see if it works any better there.

--edit--
Okay, tried it on another machine and the same issue. Locale settings are the same, but packages are somewhat different so I thought it would be worth a shot.

Last edited by hughitt1 (2013-06-16 20:43:02)

Offline

#136 2013-06-16 20:44:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

If it were an error anywhere else I could put in some debugging code, but it would seem XOpenIM doesn't even fail with an error code, it segfaults in the call to Xlib.

EDIT: lets confirm this.  Can you pull the most recent git code, then build with `make debug`, then run the locally built copy (./interrobang) and report anything that shows on the stderr.

Last edited by Trilby (2013-06-16 20:48:16)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#137 2013-06-16 21:00:31

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

I'll try that. In the meantime, I think I know what is causing the problem --

I have the following line in my .zshrc in order to support IBus:

export XMODIFIERS=@im=ibus

When I drop that, interrobus works:

export XMODIFIERS='' interrobang

Keith

Offline

#138 2013-06-16 21:02:16

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Here is the STDERR output from the debug-mode version:

pre XOpenIM (dpy=18663312)
post XOpenIM

Offline

#139 2013-06-16 21:05:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

This seems to be the same problem: http://permalink.gmane.org/gmane.comp.l … .bugs/5522

I've added this as a fallback and pushed to git.  But since XOpenIM works for me, I can't test whether this will help.  If this fallback works, I suspect utf character entry will *not* then work for you in interrobang.

Last edited by Trilby (2013-06-16 21:31:03)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#140 2013-06-17 10:28:32

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Hmm. still no luck:

./interrobang 
INTERROBANG: Error No X input method could be opened

If you want to try reproducing the issue, you could try installing ibus, e.g.:

pacman -S ibus
echo 'export XMODIFIERS=@im=ibus' >> ~/.bashrc

During the install it will recommend you add a few exports to your login script. I've included the problematic one above.

Also, I came across this test in the ibus vcs; not sure if it provides any ideas:

https://code.google.com/p/ibus/issues/a … bce6312cf1

Offline

#141 2013-06-17 11:13:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Have you used that test - it should fail for you as well.

I just installed ibus - and I was able to replicate your problem perfectly: when the XMODIFIERS variable was set I got a segfault.  Then I read the ibus wiki and ran ibus-setup as instructed on the wiki.  This started the ibus daemon.  Once the daemon was running interrobang ran perfectly.  I even stripped out all the code I added for this problem, and it still worked with XMODIFIERS set to ibus - as long as the ibus dameon was running.  Do you have the ibus daemon running?

The error comes from setting XMODIFIERS to use ibus while not having ibus running.

Last edited by Trilby (2013-06-17 11:25:35)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#142 2013-06-17 14:45:57

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

I did have ibus off before, so it's possible that that was part of the problem. However, I tried pulling the latest commit and am now getting the same error message with or without ibus running:

INTERROBANG: Error No X input method could be opened

Again, setting XMODIFIERS="" solves the issue.

Perhaps it would be easiest for me to just set up a shortcut to launch interrobang that way -- at least for now I shouldn't need to use an non-ascii characters as input.

Offline

#143 2013-06-17 15:01:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

If setting XMODIFIERS to an empty string fixes it, then the problem is definitely with ibus and/or the ibus configuration.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#144 2013-06-18 00:05:11

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Yea, I think you are right. Thanks for helping track down the issue.

I've been playing around with Interrobang for the first time today, and so far it is really nice!

Keep up the good work.

Offline

#145 2013-06-18 00:14:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

Thanks, I'm glad we could get it working somehow - though I'd prefer to see this completely resolved, but I just don't know much about ibus.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#146 2013-06-18 14:55:23

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

I agree that it would be nice to be immune to environmental variable quirks. If I have the time this weekend perhaps I can look into it a little more and see if I can find out a proper work-around.

On a completely different note... I'm not sure if this is the kind of thing you are interested in having for interrobang, but one of the features from other launchers that I find very useful is their ability to "learn" a user's behavior, and promote the most often used applications to the top of the list.

A simple implementation of this might be to maintain a ".interrobang_history" file (either in ~, or ~/.cache) with the ~1000 most recently run commands.

Then, when a user does a search, after each keystroke you could do a substring search in the history, sort by the number of hits, and present the results, either by themselves, or prepended along with any of the other options that would normally be shown during tab-completion.

This way, without any additional configuration, users would in short time be able to launch their favorite tools with 1-2 characters of typing. Also, as a bonus, you could then use the history file to implement some additional history features (e.g. cntl+r reverse searches).

Offline

#147 2013-06-18 15:11:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

That is quite doable as is.  Just use a custom completion function.

Whichever bangs you'd want to use this with, just set their command to copy the command to the history file:

!hist    cmd="%s"; echo $cmd >> historyfilename; eval $cmd

then a completer would really just be

TAB(hist)    sort historyfilename | uniq -c | sort -nr | sed 's/^[\t ]*[0-9]* //'

And there already are reverse searches... shift+tab or up arrow.

Last edited by Trilby (2013-06-18 15:13:30)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#148 2013-06-18 21:00:54

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Interrobang: a tiny menu packing a big bang (syntax)

hya

this sounds really great, but i have a naive (or stupid smile) question

in order for tab completion to work, do i need to have bash as my default shell?

right now it will launch programs but tab complete isnt working, i do have zsh as my default shell

best

Z

Offline

#149 2013-06-18 21:03:00

hughitt1
Member
Registered: 2010-02-18
Posts: 82
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

zeltek, you don't need to have bash as your primary shell, but you may need to at least have it installed on your system.

Offline

#150 2013-06-18 21:04:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Interrobang: a tiny menu packing a big bang (syntax)

EDIT, this may be innaccurate: You either need bash as your default shell, or you need to write a custom completer in the rc file.  If you have bash installed, but just not as the default, you could probably just prepend "/bin/bash -c" to the current completer.

If you find any way to get zsh to provide completion options, that would be even better - but so far we've had no luck on that.

EDIT correction: perhaps bash's "compgen" command will work from a zsh shell, it so then you'd only need it installed.  But I've never tried this myself - I'm pretty sure compgen is a bash builtin, though, so I'd be surprised if this worked.

Last edited by Trilby (2013-06-18 21:06:33)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB