2

I have made a simple, mouse-controlled taskbar using a shell script. It's working very well, and uses rxvt-unicode to make the "graphics".

Unfortunately, however, I moved this script from my netbook to my laptop, and when I changed the size of the terminal window and updated the code, I discovered that my mouse reporting stopped working beyond column 95 (it always returns ! no matter where it is clicked beyond 95).

I discovered that there is a "limit" with mouse reporting, at column 95. My program now requires 123 columns, where before it was happening to fit into under 95.

I looked up the problem, and only found one reference to the 95 column limit. Most of what I found actually refered to a 223 column limit. If I had a 223 limit, I'd be utterly fine, but I do not understand how to get it switched over.

Basically, I do not understand enough of the problem to apply what I'm reading on google. Usually I can do my own fishing, but this problem got me.

I'm using this guide to tell me what escape sequence to use (I picked X10, click-only, reporting, or escape sequence \033[?9h). how to get MouseMove and MouseClick in bash?

I found this that mentioned a 95 column limit, but made little sense of it: Emacs, unicode, xterm mouse escape sequences, and wide terminals

I am using small code snippets, more or less based on this: http://www.imbe.net/bizen?Linux/Mouse_In_A_Terminal

I found other others that did not minus 223, but rather 255. My code seemed unaffected by this change.

Community
  • 1
  • 1
Fruckubus Crunt
  • 199
  • 2
  • 16
  • 1
    Hi, thank you for this question, it was very useful. Hint: if you answer your own question, you should not edit it, but provide a real answer and accept it as an answer. This is considered a good practice on Stack Overflow and many people will be thankful, like I am :) – unkulunkulu Nov 27 '13 at 14:41
  • Thanks @unkulunkulu, I will correct this thread now with this good practice. – Fruckubus Crunt Nov 27 '13 at 19:47

1 Answers1

1

I have solved my problem. What I never understood was that some of the mouse reporting settings can be active at the same time. When \033[?1015h and \033[?9h were combined, I started to get mouse reporting beyond the 95 mark. The 1015 is suitable for urxvt. I believe 1005h is used in xterm.

Fruckubus Crunt
  • 199
  • 2
  • 16