[dev] [surf] link hinting

2014-04-12 Thread Swiatoslaw Gal
Did anyone implemented links hinting without java script?

s.



Re: [dev] [surf] link hinting

2014-04-12 Thread Swiatoslaw Gal
  Did anyone implemented links hinting without java script?
 
 Why would you want that?  It would be hundreds of lines of tremendously
 ugly C-code for navigating the DOM, creating CSS, installing key
 handlers...

The reason I switched javascript on default is… quite embarrassing.
I use compiled form git surf with debian unstable libraries, and
with javascript I experience strange crushes.  For example if
I follow a link from wikipædia page.  I have no idea what is broken.
It is certainly not surf.  The same happens with Midori.

s.



[dev] [dwm] problem with xbanish

2014-03-18 Thread Swiatoslaw Gal
Comrades,

I use xbanish (https://github.com/jcs/xbanish) with dwm.  The trouble is
that if I try to take a screenshoot with import or xwd the cursor is supposed
to changed from an arrow to a cross.  Alas, as the cursor gets hidden (when
I type the command) it will not reappear as a cross even if I move it.
I need to type something like sleep 1;import filename and move the cursor
before it gets changed.

I do not have this problem with openbox and xbanish.  Would you know hot
to get reasonable behaviour with dwm?

Sincerely,
S. R. Gal



Re: [dev] Screencasts?

2014-03-09 Thread Swiatoslaw Gal
 For example, if I find an article on the
 web I want to come back to, I will copy the URL from the address
 bar,

It depends on the browser you are using and how it communicates with you.  I
installed iceweasel to do the test and xprop gives me half a dozen of text
icons bu no… url I am reading.  Then I thought that there must have been a
reason why I stopped using mainstream browsers.  Programs without text output
(no matter how fancy pictures they render) suck.

Of coarse, if your browser has an address bar,  you still can use key bindings
program of your liking to cat your clipboard to doc/toread.

Sincerely,
S. R. Gal



Re: [dev] Re: Talk about suckless

2013-10-07 Thread Swiatoslaw Gal
  * How do the distributions offer software configured by compiling? 
  (question
from audience)
 
 As far as Debian based distributions go, i think they just ship the defaults 
 as
 binary package.

This is not quite true.  There is `apt-get source' and few tools to build a 
custom
package.  However there is not much of advantage of this approach over compiling
from sources (easy removal is all I can think of).

s.



[dev] [dmenu] handling space(?)

2013-04-17 Thread Swiatoslaw Gal
If I run `echo lorem|dmenu`
and then type lorem lRET
dmenu selects 'lorem' not 'lorem l'
if I type lorem i the ouptput is lorem i as expected.
Seems like a bug to me, am I wrong?

s.



Re: [dev] [dmenu] handling space(?)

2013-04-17 Thread Swiatoslaw Gal
 strings separated by space are considered to be separate tokens
 describing the same menu entry.

What is a possible use of it?
Could I easily disable this feature?

 If you want to return
 lorem l in your case press SHIFT+ENTER to select the string.

I know.  I just got annoyed by... forggeting to press SHIFT.

s.



[dev] [surf] port for gtk3

2012-06-19 Thread Swiatoslaw Gal
Is anyone planning to port surf for gtk3?

Sinceerly,
s.



Re: [dev] [surf] port for gtk3

2012-06-19 Thread Swiatoslaw Gal
-- From Swiatoslaw Gal 19-06-2012 at 11:23 --
 Is anyone planning to port surf for gtk3?

I ask because surf on my (unstable) debian machine stopped working.  gdb 
returns few times:
 @0: event.layerX and event.layerY are broken and deprecated in WebKit. They 
will be removed from the engine in the near future.
Just before
Program received signal SIGSEGV, Segmentation fault.

Any hint?

s.

ps. I freshly compiled surf from suckless git.



[dev] xid of a current window

2012-03-25 Thread Swiatoslaw Gal
How can I get a xid of a focused window?  Like with xprop, but
without user interaction.  Say, I want to write an program
that would log the xid of a currently focused window every second.

Sincerely,
s.



Re: [dev] xid of a current window

2012-03-25 Thread Swiatoslaw Gal
-- From Ivan Kanakarakis 25-03-2012 at 15:20 --
 if you don't want to write something of your own, then
 
 $ xprop -root _NET_ACTIVE_WINDOW
  _NET_ACTIVE_WINDOW(WINDOW): window id # 0x400050

xprop -root shows me the values of the folowing fields:
CUT_BUFFER0(STRING)
WM_NAME(STRING)
_NET_SUPPORTED(ATOM)
ESETROOT_PMAP_ID(PIXMAP)
_XROOTPMAP_ID(PIXMAP)
RESOURCE_MANAGER(STRING)
_XKB_RULES_NAMES(STRING)
XFree86_VT(INTEGER)
XFree86_DDC_EDID1_RAWDATA(INTEGER)

 $ xdotool getactivewindow
XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

 will work, as long as your wm supports and correctly sets _NET_ACTIVE_WINDOW
I assume that this is not the case.
I am using dwm.  Does it matter?

s.



Re: [dev] xid of a current window

2012-03-25 Thread Swiatoslaw Gal
 You could use the focused window instead (which was what you
 originally asked about):
 
 $ xdotool getwindowfocus
 48234505

Yes, this works fine (without any today's patches).
But the very first answer: XGetInputFocus was _exactly_
what I was looking for.

Is there a reason that a _window_manager_ provides EHWHMS...
whatever support?  This can be done with an external program,
am I wrong?

s.



Re: [dev] dwm: bug in fullscreen mode (SDL?)

2012-03-06 Thread Swiatoslaw Gal
-- From Matthew Carter 23-01-2012 at 22:01 --
 You could always run fullscreen apps/games on a separate X display
 using:
 
 xinit $(which gameName) -- :8
 
 -Matt

Can one use such a clean solution with a second display?
E.g. an external monitor attached to a laptop?

s.



[dev] dwm: strange statusbar behaviour

2012-02-25 Thread Swiatoslaw Gal
Dear gals and guys,

I have an old thinkpad tablet, which I use as a desktop (the screen
got broken and I detached it).  It starts, by default, in 1024x768
mode, and then dwm and its statusbar work fine.  If I correct
the resolution to the monitor specification (eg. 1280x1024) either
by xrandr, or tweaking xorg.conf, there is something strange.

When I click on tags in the statusbar the highlight changes, but
the tags stay the same.  Contrary, if I use alt-# I switch tags,
but with no effect on the status bar.  Also, no little squares
indicating windows in tags are shown in the statusbar.  As if
it was referring to a missing laptop display!?

Alt-b hides only (right) half of the statusbar.

Going down to 1024x768 cancels all those weird effects.

Any idea?

Sincerely,
s.



Re: [dev] [dmenu] composite key not working/weird arrow behaviour

2011-11-30 Thread Swiatoslaw Gal
-- From Connor Lane Smith 06-11-2011 at 13:04 --
 Hey,
 
 On 03/11/2011, Swiatoslaw Gal swiatoslaw@univie.ac.at wrote:
  I was careless with my last email.  The behaviour of arrows is broken
  not in dmenu, but in the following patch.  The right (forward) arrow stopped
  working.  Any idea how to fix that?
 
 Sorry, you aren't giving us enough information to figure out what's
 wrong. What keyboard layout are you using? Are you using any special
 input methods, etc?

Sorry for being out of the mailing list for a while.

I use the following keyboard layout/input method:
setxkbmap -option compose:rctrl us
I would like to be able to insert composed characters in dmenu.
Some time ago (on 16th of October) Troels Henriksen suggested a patch
that I was trying (lamely, I suppose) to apply to dmenu-4.2.1 (as shipped
by Debian).  As result, I can input compose characters, but neither forward
arrow nor End key do not work.  My C is too basic to understand what the
patch should do.

So I repeat my original question:  can dmenu be made to accept composed
characters?

Sincerely,
s.



[dev] [dmenu] composite key not working/weird arrow behaviour

2011-11-03 Thread Swiatoslaw Gal
I was careless with my last email.  The behaviour of arrows is broken
not in dmenu, but in the following patch.  The right (forward) arrow stopped
working.  Any idea how to fix that?

Sincerely,
s.

 Here's a patch that solves the common cases.  There's a ton of potential
 issues (complex Unicode in the input) that may require more reworking,
 but this patch makes dead keys work for any of the cases on my communist
 European keyboard.
 

 diff -r 2f548e0f8965 dmenu.c
 --- a/dmenu.c Thu Oct 13 20:43:59 2011 +0100
 +++ b/dmenu.c Sun Oct 16 15:23:29 2011 +0200
 @@ -58,6 +58,7 @@
  static Item *matches, *matchend;
  static Item *prev, *curr, *next, *sel;
  static Window win;
 +static XIC xic;
  
  static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
  static char *(*fstrstr)(const char *, const char *) = strstr;
 @@ -230,8 +231,10 @@
  keypress(XKeyEvent *ev) {
   char buf[32];
   KeySym ksym;
 + int len;
 + Status status;
  
 - XLookupString(ev, buf, sizeof buf, ksym, NULL);
 + len = XmbLookupString(xic, ev, buf, sizeof(buf), ksym, status);
   if(ev-state  ControlMask) {
   KeySym lower, upper;
  
 @@ -273,7 +276,7 @@
   switch(ksym) {
   default:
   if(!iscntrl(*buf))
 - insert(buf, strlen(buf));
 + insert(buf, len);
   break;
   case XK_Delete:
   if(text[cursor] == '\0')
 @@ -461,7 +464,9 @@
  run(void) {
   XEvent ev;
  
 - while(!XNextEvent(dc-dpy, ev))
 + while(!XNextEvent(dc-dpy, ev)) {
 + if(XFilterEvent(ev, win))
 + continue;
   switch(ev.type) {
   case Expose:
   if(ev.xexpose.count == 0)
 @@ -479,6 +484,7 @@
   XRaiseWindow(dc-dpy, win);
   break;
   }
 + }
  }
  
  void
 @@ -486,6 +492,7 @@
   int x, y, screen = DefaultScreen(dc-dpy);
   Window root = RootWindow(dc-dpy, screen);
   XSetWindowAttributes swa;
 + XIM xim;
  #ifdef XINERAMA
   int n;
   XineramaScreenInfo *info;
 @@ -542,6 +549,11 @@
   DefaultVisual(dc-dpy, screen),
   CWOverrideRedirect | CWBackPixmap | CWEventMask, 
 swa);
  
 +/* input methods */
 + xim = XOpenIM(dc-dpy, NULL, NULL, NULL);
 + xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
 + XNClientWindow, win, XNFocusWindow, 
 win, NULL);
 +
   XMapRaised(dc-dpy, win);
   resizedc(dc, mw, mh);
   drawmenu();

 
 
 -- 
 \  Troels
 /\ Henriksen




[dev] [dmenu] weird arrows behaviour

2011-11-02 Thread Swiatoslaw Gal
Left (back) arrow works in dmenu well.  Right (forward) does not do anything.
Is it a bug or feature?

Cordially,
s.



[dev] [dmenu] composite key not working

2011-10-16 Thread Swiatoslaw Gal
What may I do to enable composite key (defined with setxkbmap
as compose:rctrl) with dmenu?  It works with st, though.

Thanks in advance,
s.



Re: [dev] Making Apps That Don't Suck by Mike Lee

2011-06-07 Thread Swiatoslaw Gal
-- From garbeam 07-06-2011 at 06:48 --
 Sorry for the delay, here is the link to the slides:
 
 http://dl.garbe.us/The_suckless_org_universe.pdf

Great but... why Arial?!

s.



[dev] [surf] Diacritics

2011-03-26 Thread Swiatoslaw Gal
I have a strange issue with google translate in surf.  It returns mess
for non-English characters (umlauts to start with).  For example, if I
enter Cyrillic it is lost in auto-detect mode.  Guessing Spanish!?
And, of coarse, choosing language manually would not help.  Same time
there are no problems with this neither in Wikipedia nor Leo
dictionary.  Google translate works well with other webkit browsers
(jumanji, luakit).

Any hint?

s.



[dev] [surf] page not opening

2011-03-26 Thread Swiatoslaw Gal
I got an error with
surf http://www.identifont.com/find?font=garamondq=Go;
Any ideas?

s.



[dev] [surf] browser identification

2011-03-25 Thread Swiatoslaw Gal
Hi,

imbeciles coding sucking webpages check how the browser identifies itself.
And if it is not sucking browser instead of desired content I get some
ad about downloading sucking software.

All I can check is for example aruljohn.com which tells me Your browser is
Unknown Browser.  At the same time luakit results with Mozilla 5.0 while
jumanji with Safari 5.0.  But I am too blind to find anything relevant in
their codes.

How can I patch surf to identify as one of those?

Thanks,
s.



[dev] [surf] arrows

2011-03-25 Thread Swiatoslaw Gal
Do the arrows are intend to be useful with surf?
I experience strange behaviour.  First hit takes me to the the
top or bottom of the page.  Then they allow me to scroll.
Is it a bug or a feature?

I did try to define bindings in the config file, but then it messes
with desired behaviour in pages with forms.

Is there a reason (not) to bind home/end buttons?

s.



Re: [dev] [surf] arrows

2011-03-25 Thread Swiatoslaw Gal
 The solution is to turn off spatial navigation.

Spatial navigation is not that bad.  But, the annoying bug/feature
is that the _first_ hit down brings me to the last link.  Can this
be avoided?

Does anyone has a patch to bin toggling spatial navigation to some key?

s.