You are not logged in.
I just learnt something. Thanks!
Offline
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
Keith
dotfiles
Offline
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
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
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
Keith
dotfiles
Offline
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
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
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
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)
Keith
dotfiles
Offline
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
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
Keith
dotfiles
Offline
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
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:
Keith
dotfiles
Offline
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
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.
Keith
dotfiles
Offline
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
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.
Keith
dotfiles
Offline
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
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).
Keith
dotfiles
Offline
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
hya
this sounds really great, but i have a naive (or stupid ) 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
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