You are not logged in.

#201 2013-07-07 20:24:21

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

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

There are no idiotic questions - only idiots who ask them wink  Kidding!

I'll start with #2 as it should be easier: While I don't use a history myself, those are the lines that should do it - they just need to be slightly revised for the new rc file format.

set run_hook       = cmd="%s"; ($cmd && echo $cmd >> $XDG_CONFIG_HOME/interrobang/history) || (notify-send "Error: command not found")
tab default        = pre="%s"; str="%s"; [[ -z "$pre" ]] && (grep "$str" $XDG_CONFIG_HOME/interrobang/history | sort | uniq -c | sort -r | awk '{print $2}'; percontation "$pre" $str) | awk ' !x[$0]++' | head -7

The only changes are to the start of those lines.

For fonts, I have to admit to not really understanding how fonts work either.  In most of my programs, I just use X11 font strings (those -misc-fixed-*-*... things) as I know at least roughly how they work.  Interrobang, in contrast, uses X11's fontset mechanism.  This should accept any valid X11 font string as does the other mechanism - so if Source Code Pro-12 can be listed in that format, do that.  But this can also take other formats too - the way to test if a font entry will work is (I think) to run fc-match on it.  In this case, if `fc-match "Source Code Pro-12"` returns the proper listing, then interrobang should take that as well - but I doubt it will.

EDIT: I was going to try to test this font myself to see if I could get a better answer, but I see there are several different aur packages with a similar name, and I don't see that font in any obvious place in the repos.  Which package are you using for that font?

EDIT2: The font mechanism hasn't changed, so if that syntax worked before the config format change, it should still work.  But I see a pound/hash sign (#) at the start of your line there.  Lines starting with # in the config are ignored as comments.  Did you have that line in your config without the #?

Last edited by Trilby (2013-07-07 20:28:51)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#202 2013-07-07 20:43:40

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

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

thx alot for the answer!

the history thing worked well (i did change the $XDG_CONFIG_HOME/interrobang/ to .config to get it to work)

as for the fonts i still cant get it to work, this is what fc-match produces

zeltak@voices ~ ↳ fc-match Source\ Code\ Pro
SourceCodePro-Medium.otf: "Source Code Pro" "Medium"

i tried these in my config
set font      = "Source\ Code\ Pro"
and
set font      = "Source Code Pro"

but none work, ill continue to investigate

btw i just noticed you are a fellow bostonian? ;-)

best

Z.

Offline

#203 2013-07-08 13:34:26

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

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

Having xft/pango fonts would be really nice smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#204 2013-07-08 13:51:56

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

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

I'll have to think about that.  I'm not personally a fan of either xft or pango.  They add layers of complexity for no benefit that I can ever detect.

But I do know many people prefer them for some reason.  So I'm conflicted on it - I do value user input, but I am my own primary target user.  There's also the motivation aspect.  I've implemented many features I wasn't to interested in using myself, but they seemed to require some creativity in implementation which made them fun to do.  Xft/pango strikes me (personally) as neither useful or fun - so while I'm open to giving it a shot, it's just hard for that to work it's way up the todo list.


Or in otherwords - I'll certainly put it on the list, but I'm not going to make any promises.

Last edited by Trilby (2013-07-08 13:54:16)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#205 2013-07-08 15:26:27

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

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

Trilby wrote:

I'll have to think about that.  I'm not personally a fan of either xft or pango.  They add layers of complexity for no benefit that I can ever detect.

But I do know many people prefer them for some reason.  So I'm conflicted on it - I do value user input, but I am my own primary target user.  There's also the motivation aspect.  I've implemented many features I wasn't to interested in using myself, but they seemed to require some creativity in implementation which made them fun to do.  Xft/pango strikes me (personally) as neither useful or fun - so while I'm open to giving it a shot, it's just hard for that to work it's way up the todo list.


Or in otherwords - I'll certainly put it on the list, but I'm not going to make any promises.

I recommend that someone else develop a patch for Xft support and they just maintain it against your trunk, which is how it is for dwm. The trick though is getting someone to pony up and make that patch...

Offline

#206 2013-07-08 15:44:43

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

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

If anyone is interested in that, I'd support the effort and be happy to work in some revisions that would ensure such a patch would be easy to apply.

In fact, if anyone else submits the code, I'll merge it in as a conditional compile option and set up a interrobang-xft target in the makefile to make it very easy to use.  This is how I'd do it if I were to ever implement it myself.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#207 2013-07-08 22:55:33

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

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

small request: is it possible to center the font so that there are equal spaces on top/bottom?


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#208 2013-07-09 03:28:40

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

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

Hmm, I thought it should be by default.  If it's not I can take a look at these calculations again, and/or in the meantime, you can set the geometry manually with the geometry setting.

What font are you using, and is it too high or too low in the window?

EDIT: or are you already using the geometry setting to change size?  In this case the font is not vertically centered, but will just be aligned to the top of the window.

Last edited by Trilby (2013-07-09 03:52:02)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#209 2013-07-09 16:45:51

oliver
Member
Registered: 2007-12-12
Posts: 448

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

what options does the 'geometry' setting support?  In the default rc file I see both 'top' and '800x17+240+320'

I was going for a 400x20 thing but centered along the top and I can kind of do it using the two co-ordinates but it messes when I switch resolutions.

What would be perfect would be something like: top+50% (where the bar would only take 50% of the screen width)

Offline

#210 2013-07-09 17:38:44

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

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

Right now geometry supports "top" "bottom" or a 'xterm' style geometry string.  Top is the default if nothing is specified; this spans the screen width at the top of the screen and sets the height based on the font extents.

Bottom is similar, but on the bottom.  And the geometry strings need all 4 parameters, or any left out will be zero.

Accepting only width and height and centering is a good idea, and will be very easy to implement - so expect this by the end of the day.

EDIT: This has just been pushed to git, with a slight change in implementation.  You can specify only width and height, but this will keep X and Y as zero.  Set X and/or Y in a geometry string to -1 to center horizontally and/or vertically.  So to set the bar to be centered on the top of the screen with a width of 400 pixels and height of 17, use the following:

set geometry = 400x17-1+0

Or to have it that size centered both vertically and horizontally use 400x700-1-1, or lastly to center horizontally on the bottom of the screen use 400x17-1-2.

Last edited by Trilby (2013-07-10 13:09:45)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#211 2013-07-10 03:57:00

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

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

I used to just *think* xft was a bad idea.  Now I *know* it is.  I just gave it a shot, added 50 ugly lines of code, and many large data structures, had to temporarily cut out the show-options ability as it would take quite a bit to rewrite for xft, and everything compiled and functioned fine, except the xft draw text function doesn't actually draw any text.

Sorry to anyone looking forward to it - but I definitely will not do any further development on xft.  I've pushed the altered version as 'xftrash.c', if anyone wants to do this themselves, that should give you a head start.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#212 2013-07-10 12:57:01

oliver
Member
Registered: 2007-12-12
Posts: 448

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

Trilby wrote:

This has just been pushed to git, with a slight change in implementation.  You can specify only width and height, but this will keep X and Y as zero.  Set X and/or Y in a geometry string to center horizontally and/or vertically.  So to set the bar to be centered on the top of the screen with a width of 400 pixels and height of 17, use the following:

set geometry = 400x17-1+0

Or to have it that size centered both vertically and horizontally use 400x700-1-1, or lastly to center horizontally on the bottom of the screen use 400x17-1-2.

Perfect - does exactly what I was looking for.  Thanks for implementing so quickly and for the project in general.  Very nice app.

Offline

#213 2013-07-10 18:55:12

alban
Member
Registered: 2013-05-12
Posts: 15

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

Your launcher is very great ! Thanks for your work.

I have two very small remarks concerning the rc file provided as an example in the package :
     1/ I think the logout example is broken, probably after a change you have made in your code. It is working like this (using the last word option):
       

tab logout	= echo -e "!logout cancel\n!logout shutdown\n!logout sleep\n!logout reboot\n!logout logout" | grep "^%s%s"

     2/ I think that the !? completion is better like this :
       

tab ?		= ignore="%s%s"; awk '/^bang/ {print "!"$2;}' ~/.config/interrobang/config

        So when you validate an option you can use it as a bang in your line, but may be it is just me.

The example rc is here only as documentation anyway, but it took me a while to understand why one of my completion based on the logout example was not working. But at least now I understand how the option is working smile.

Offline

#214 2013-07-10 18:59:56

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

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

Ah, I suppose you could make logout work that way too.  I just use it as a hushbang, so I have my power button bound to `interrobang logout`, then what is in the example rc works as expected.

As for the tab ? line, you just changed the path to the config file, right? This depends entirely on where one keeps their config file.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#215 2013-07-10 19:18:52

alban
Member
Registered: 2013-05-12
Posts: 15

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

I didn't think to the hushbang for the logout indeed... Sorry.

For the ? I just add a "!" in the print (well yes I also change the configuration path but that is just my setting). So when I complete the option l have the bang ready to launch a command.

Last edited by alban (2013-07-10 19:21:52)

Offline

#216 2013-07-10 19:23:53

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

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

Ah, sorry - I missed the ! in that line.  It used to be there, I must have missed it when I rewrote it.  I just pushed that revision.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#217 2013-07-16 21:40:41

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

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

It seems that tab-completion is still a little odd for me. I still use auto-complete, but when I hit tab, what I've typed in doesn't change. For instance, if I type "ponym" (without quotes, obviously), the auto-completion zone correctly selects "ponymix", but when I press tab (ponymix is the only option), nothing happens; the text-entry section still just shows "ponym".

All the best,

-HG

Offline

#218 2013-07-16 22:18:20

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

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

Yes, it seems I "pulled an Allan" and broke that on the commit last week wink

It should be fixed now, please verify.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#219 2013-07-17 03:16:24

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

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

Trilby wrote:

Yes, it seems I "pulled an Allan" and broke that on the commit last week wink

It should be fixed now, please verify.

Yup, it works perfectly again. Keep up the awesome work!

All the best,

-HG

Offline

#220 2013-07-17 04:09:20

shmibs
Member
Registered: 2012-09-11
Posts: 93
Website

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

i updated just now, and it looks like my .interrobangrc is being ignored now.
[Screenshot]
oh, and thanks for all the work you've put into this thus-far smile


[site] | [dotfiles] | あたしたち、人間じゃないの?

Offline

#221 2013-07-17 08:20:38

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

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

@shmibs
That's because there are new stuff etc. so you have to update your .interrobangrc file.

Trilby's interrobangrc from github:
interrobangrc

Offline

#222 2013-07-17 17:00:28

shmibs
Member
Registered: 2012-09-11
Posts: 93
Website

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

thanks smile


[site] | [dotfiles] | あたしたち、人間じゃないの?

Offline

#223 2013-07-23 23:02:36

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

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

Is `latex2man' required now for a simple "make PREFIX=/usr"?  I have to use "make interrobang percontation PREFIX=/usr" and then copy regular manpage over, otherwise calling a basic "make" tries to run latex2man for interrobang.1.  Unless I'm missing something.  hmm

P.S.  The file for "interrobangrc" on github is now "config" for those who try to click the previous links.

Offline

#224 2013-07-23 23:16:12

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

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

Hmm, I did make some changes, but latex2man should definitely not be required.  The pre-built interrobang.1 is in the repo as well.

You shouldn't need to do any of that.  Just `make` then `sudo make install` (as IIRC, you're not on arch).  On arch, the PKGBUILD will do just that.

And usr is the default prefix, so that should not need to be set.

Last edited by Trilby (2013-07-23 23:16:35)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#225 2013-07-23 23:19:11

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

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

I just tested with a clean git pull.  `make` did not call latex2man, as the man page is current, and no parameters or setting of prefix was required.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB