Alexey Trofimenko | 11 Aug 20:54

change commandline background color when focused

vimperator is great, really. I have only one point of frustration:
losing cursor :)
 When i press / or : (maybe accidentally) it is really hard to see, if
command line is focused.
Most obvious way would be to change background color of focused command line.
Is there a way to do this?
Martin Stubenschrott | 12 Aug 00:49

Re: change commandline background color when focused

Alexey Trofimenko wrote:
> Most obvious way would be to change background color of focused command line.
> Is there a way to do this?

I am quite sure, with some CSS and a :focus (pseudo-)class it should be
possible. However, somebody tried that and ran into some problems, but i
still think a real CSS guru (not me ;)) could probably find a way.

--
Martin
Konstantin Stepanov | 12 Aug 13:51
Favicon
Gravatar

Re: change commandline background color when focused

No problem! :)

Put this code into your userChrome.css:

#liberator-commandline .textbox-input:focus {
    background-color: yellow !important;
}

and you will get yellow command line when it's focused :)

Enjoy!

12.08.08, 02:49, "Martin Stubenschrott" :

> Alexey Trofimenko wrote:
> > Most obvious way would be to change background color of focused command line.
> > Is there a way to do this?
> I am quite sure, with some CSS and a :focus (pseudo-)class it should be
> possible. However, somebody tried that and ran into some problems, but i
> still think a real CSS guru (not me ;)) could probably find a way.
> --
> Martin
> _______________________________________________
> Vimperator mailing list
> Vimperator <at> mozdev.org
> https://www.mozdev.org/mailman/listinfo/vimperator <at> GMX.NET>

<div><p>No problem! :)<br><br>Put this code into your userChrome.css:<br><br>#liberator-commandline .textbox-input:focus {<br>&nbsp;&nbsp;&nbsp; background-color: yellow !important;<br>}<br><br>and you will get yellow command line when it's focused :)<br><br>Enjoy!<br><br>12.08.08, 02:49, "Martin Stubenschrott" :<br><br>&gt; Alexey Trofimenko wrote:<br>&gt; &gt; Most obvious way would be to change background color of focused command line.<br>&gt; &gt; Is there a way to do this?<br>&gt; I am quite sure, with some CSS and a :focus (pseudo-)class it should be<br>&gt; possible. However, somebody tried that and ran into some problems, but i<br>&gt; still think a real CSS guru (not me ;)) could probably find a way.<br>&gt; --<br>&gt; Martin<br>&gt; _______________________________________________<br>&gt; Vimperator mailing list<br>&gt; Vimperator <at> mozdev.org<br>&gt; <a mce_href="https://www.mozdev.org/mailman/listinfo/vimperator" href="https://www.mozdev.org/mailman/listinfo/vimperator">https://www.mozdev.org/mailman/listinfo/vimperator</a> <at> GMX.NET&gt;<br></p></div>
Casey Manion | 12 Aug 17:23

Re: change commandline background color when focused

Could you use cssrule for this and put it in your vimperatorrc file ?

2008/8/12 Konstantin Stepanov <milezv@...>:
> No problem! :)
>
> Put this code into your userChrome.css:
>
> #liberator-commandline .textbox-input:focus {
>     background-color: yellow !important;
> }
>
> and you will get yellow command line when it's focused :)
>
> Enjoy!
>
> 12.08.08, 02:49, "Martin Stubenschrott" :
>
>> Alexey Trofimenko wrote:
>> > Most obvious way would be to change background color of focused command
>> > line.
>> > Is there a way to do this?
>> I am quite sure, with some CSS and a :focus (pseudo-)class it should be
>> possible. However, somebody tried that and ran into some problems, but i
>> still think a real CSS guru (not me ;)) could probably find a way.
>> --
>> Martin
>> _______________________________________________
>> Vimperator mailing list
>> Vimperator@...
>> https://www.mozdev.org/mailman/listinfo/vimperator
>
> _______________________________________________
> Vimperator mailing list
> Vimperator@...
> https://www.mozdev.org/mailman/listinfo/vimperator
>
>
Frank Blendinger | 13 Aug 00:18

Re: change commandline background color when focused

Hi.

Konstantin Stepanov <milezv@...> enlightened the world by writing
these words of wisdom:
> Put this code into your userChrome.css:
> 
> #liberator-commandline .textbox-input:focus {
>     background-color: yellow !important;
> }
> 
> and you will get yellow command line when it's focused :)

This does not work for me. I also tried without the ``:focus''.

I'm using:
Vimperator 1.2pre (created: 2008/08/08 00:41:51) running on: Mozilla/5.0
(X11; U; Linux i686; en-US; rv:1.9.0.2pre) Gecko/2008070420 Firefox/3.0.2pre (Swiftfox)

Any ideas?

Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Hi.

Konstantin Stepanov <milezv@...> enlightened the world by writing
these words of wisdom:
> Put this code into your userChrome.css:
> 
> #liberator-commandline .textbox-input:focus {
>     background-color: yellow !important;
> }
> 
> and you will get yellow command line when it's focused :)

This does not work for me. I also tried without the ``:focus''.

I'm using:
Vimperator 1.2pre (created: 2008/08/08 00:41:51) running on: Mozilla/5.0
(X11; U; Linux i686; en-US; rv:1.9.0.2pre) Gecko/2008070420 Firefox/3.0.2pre (Swiftfox)

Any ideas?

Greetings,
Frank

--

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Konstantin | 13 Aug 22:08
Favicon
Gravatar

Re: change commandline background color when focused

Hm... It works for me.

Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.0.1) Gecko/2008080612 Firefox/3.0.1
FreeBSD 7.0-STABLE #12: Wed Aug  6 17:22:12 EEST 2008

I just fetched the latest version of Vimperator 1.2pre from CVS and installed it.
Where did you put this code? It should be in your
~/.mozilla/firefox/≤some random string>/chrome/userChrome.css
file.

Frank Blendinger wrote:
> Hi.
> 
> Konstantin Stepanov <milezv@...> enlightened the world by writing
> these words of wisdom:
>> Put this code into your userChrome.css:
>>
>> #liberator-commandline .textbox-input:focus {
>>     background-color: yellow !important;
>> }
>>
>> and you will get yellow command line when it's focused :)
> 
> This does not work for me. I also tried without the ``:focus''.
> 
> I'm using:
> Vimperator 1.2pre (created: 2008/08/08 00:41:51) running on: Mozilla/5.0
> (X11; U; Linux i686; en-US; rv:1.9.0.2pre) Gecko/2008070420 Firefox/3.0.2pre (Swiftfox)
> 
> Any ideas?
> 
> 
> Greetings,
> Frank
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Vimperator mailing list
> Vimperator@...
> https://www.mozdev.org/mailman/listinfo/vimperator

--

-- 
Konstantin Stepanov
Web Developer
Frank Blendinger | 14 Aug 09:41

Re: change commandline background color when focused

Hi.

Konstantin <milezv@...> enlightened the world by writing these
words of wisdom:
> Hm... It works for me.
> 
> Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.0.1) Gecko/2008080612 
> Firefox/3.0.1
> FreeBSD 7.0-STABLE #12: Wed Aug  6 17:22:12 EEST 2008
> 
> I just fetched the latest version of Vimperator 1.2pre from CVS and 
> installed it.
> Where did you put this code? It should be in your
> ~/.mozilla/firefox/≤some random string>/chrome/userChrome.css
> file.

For me it is ~/.firefox/default/≤randomstuff>/chrome/userChrome.css -
I checked that this is the correct file by making some other
modifications and they worked as expected.

But those do not:

#liberator-commandline .textbox-input {
    background-color: green !important;
}      

#liberator-commandline .textbox-input:focus {
    background-color: yellow !important;
}

I both tried Vimperator 1.1 and a curreny 1.2pre CVS versoin.

Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Hi.

Konstantin <milezv@...> enlightened the world by writing these
words of wisdom:
> Hm... It works for me.
> 
> Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.0.1) Gecko/2008080612 
> Firefox/3.0.1
> FreeBSD 7.0-STABLE #12: Wed Aug  6 17:22:12 EEST 2008
> 
> I just fetched the latest version of Vimperator 1.2pre from CVS and 
> installed it.
> Where did you put this code? It should be in your
> ~/.mozilla/firefox/≤some random string>/chrome/userChrome.css
> file.

For me it is ~/.firefox/default/≤randomstuff>/chrome/userChrome.css -
I checked that this is the correct file by making some other
modifications and they worked as expected.

But those do not:

#liberator-commandline .textbox-input {
    background-color: green !important;
}      

#liberator-commandline .textbox-input:focus {
    background-color: yellow !important;
}

I both tried Vimperator 1.1 and a curreny 1.2pre CVS versoin.

Greetings,
Frank

--

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Doug Kearns | 14 Aug 12:41

Re: change commandline background color when focused

On Thu, Aug 14, 2008 at 6:08 AM, Konstantin <milezv@...> wrote:
> Hm... It works for me.

FWIW, this doesn't work for me either.  The :focus pseudo class seems to be
completely ignored in the command line.

Given all the 'funky' focus event firing going on there I'm not exactly
surprised. :)

Regards,
Doug
Konstantin Stepanov | 14 Aug 14:56
Favicon
Gravatar

Re: change commandline background color when focused

Well, uh, sorry then.

Seems like I'm the only man who benefits from this code.

14.08.08, 14:41, "Doug Kearns" :

> On Thu, Aug 14, 2008 at 6:08 AM, Konstantin wrote:
> > Hm... It works for me.
> FWIW, this doesn't work for me either. The :focus pseudo class seems to be
> completely ignored in the command line.
> Given all the 'funky' focus event firing going on there I'm not exactly
> surprised. :)
> Regards,
> Doug
> _______________________________________________
> Vimperator mailing list
> Vimperator-hfdxhZW8pNUdnm+yROfE0A@public.gmane.org
> https://www.mozdev.org/mailman/listinfo/vimperator@public.gmane.org>+P9i1ojmF8zQARNC3f2A@public.gmane.org>

<div><p>Well, uh, sorry then.<br><br>Seems like I'm the only man who benefits from this code.<br><br>14.08.08, 14:41, "Doug Kearns" :<br><br>&gt; On Thu, Aug 14, 2008 at 6:08 AM, Konstantin  wrote:<br>&gt; &gt; Hm... It works for me.<br>&gt; FWIW, this doesn't work for me either.  The :focus pseudo class seems to be<br>&gt; completely ignored in the command line.<br>&gt; Given all the 'funky' focus event firing going on there I'm not exactly<br>&gt; surprised. :)<br>&gt; Regards,<br>&gt; Doug<br>&gt; _______________________________________________<br>&gt; Vimperator mailing list<br>&gt; Vimperator@...<br>&gt; <a mce_href="https://www.mozdev.org/mailman/listinfo/vimperator" href="https://www.mozdev.org/mailman/listin%0A%20fo/vimperator">https://www.mozdev.org/mailman/listinfo/vimperator</a>@public.gmane.org&gt;+P9i1ojmF8zQARNC3f2A <at> public.gmane.org&gt;<br></p></div>
Tim Hammerquist | 15 Aug 08:04
Gravatar

Re: change commandline background color when focused

Konstantin Stepanov <milezv-o+MxOtu4lMCHXe+LvDLADg@public.gmane.org> wrote:
Well, uh, sorry then.

Seems like I'm the only man who benefits from this code.

No, this rule works for me.  It's come in pretty handy already, too!

I only have Vimperator, NoScript, and Firebug enabled right now.

Thanks for this, Konstantin!

Tim
<div><div dir="ltr">Konstantin Stepanov <span dir="ltr">&lt;<a href="mailto:milezv@...">milezv@...</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote">
Well, uh, sorry then.<br><br>Seems like I'm the only man who benefits from this code.<br>
</blockquote></div>
<br>No, this rule works for me.&nbsp; It's come in pretty handy already, too!<br><br>
I only have Vimperator, NoScript, and Firebug enabled right now.<br><br>Thanks for this, Konstantin!<br><br>Tim<br>
</div></div>
Doug Kearns | 15 Aug 08:40

Re: change commandline background color when focused

On Fri, Aug 15, 2008 at 4:04 PM, Tim Hammerquist <penryu@...> wrote:

<snip>

> No, this rule works for me.  It's come in pretty handy already, too!
>
> I only have Vimperator, NoScript, and Firebug enabled right now.

This still doesn't work for me even with a clean profile.  This might be
connected with the visual bell not working for me either.

Frank, does the visual bell work for you?

Regards,
Doug
Frank Blendinger | 15 Aug 09:17

Re: change commandline background color when focused

Hi.

Doug Kearns <dougkearns@...> enlightened the world by writing
these words of wisdom:
> On Fri, Aug 15, 2008 at 4:04 PM, Tim Hammerquist <penryu@...> wrote:
> 
> <snip>
> 
> > No, this rule works for me.  It's come in pretty handy already, too!
> >
> > I only have Vimperator, NoScript, and Firebug enabled right now.
> 
> This still doesn't work for me even with a clean profile.  This might be
> connected with the visual bell not working for me either.
> 
> Frank, does the visual bell work for you?

Yes.

Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Hi.

Doug Kearns <dougkearns@...> enlightened the world by writing
these words of wisdom:
> On Fri, Aug 15, 2008 at 4:04 PM, Tim Hammerquist <penryu@...> wrote:
> 
> <snip>
> 
> > No, this rule works for me.  It's come in pretty handy already, too!
> >
> > I only have Vimperator, NoScript, and Firebug enabled right now.
> 
> This still doesn't work for me even with a clean profile.  This might be
> connected with the visual bell not working for me either.
> 
> Frank, does the visual bell work for you?

Yes.

Greetings,
Frank

--

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
M.Terada | 15 Aug 15:08

Re: change commandline background color when focused

Hi

The other way is that
write the below into .vimperatorrc

javascript <<EOM
(function(){
var inputElm = document.getElementById('liberator-commandline-command');
function swapBGColor(event){
  inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
"yellow" : "";
}
inputElm.addEventListener('focus',swapBGColor,false);
inputElm.addEventListener('blur', swapBGColor,false);
})();
EOM

--

-- 
teramako
http://d.hatena.ne.jp/teramako/
Rodolfo Borges | 15 Aug 15:27
Gravatar

Re: change commandline background color when focused

This works for me, thanks.
And, vimperatorrc is a better place for this anyway.

On Fri, Aug 15, 2008 at 10:08 AM, M. Terada <teramako@...> wrote:
> Hi
>
> The other way is that
> write the below into .vimperatorrc
>
> javascript <<EOM
> (function(){
> var inputElm = document.getElementById('liberator-commandline-command');
> function swapBGColor(event){
>  inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
> "yellow" : "";
> }
> inputElm.addEventListener('focus',swapBGColor,false);
> inputElm.addEventListener('blur', swapBGColor,false);
> })();
> EOM
>
> --
> teramako
> http://d.hatena.ne.jp/teramako/
> _______________________________________________
> Vimperator mailing list
> Vimperator@...
> https://www.mozdev.org/mailman/listinfo/vimperator
>
Frank Blendinger | 16 Aug 11:00

Re: change commandline background color when focused

Hi.

Rodolfo Borges <rodolfo.borges@...> enlightened the world by
writing these words of wisdom:
> On Fri, Aug 15, 2008 at 10:08 AM, M. Terada <teramako@...> wrote:
> > The other way is that
> > write the below into .vimperatorrc
> >
> > javascript <<EOM
> > (function(){
> > var inputElm = document.getElementById('liberator-commandline-command');
> > function swapBGColor(event){
> >  inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
> > "yellow" : "";
> > }
> > inputElm.addEventListener('focus',swapBGColor,false);
> > inputElm.addEventListener('blur', swapBGColor,false);
> > })();
> > EOM
> >
> This works for me, thanks.
> And, vimperatorrc is a better place for this anyway.

Works nice for me too. Even better then the CSS version, which left the
space behind the leading `:' in the command line uncolored. I also like
having it in my vimperatorrc instead of some other plugin's config or
the userChrome.css.

Since I find this so useful, I was wondering if a similar thing was
possible to make pass-through mode more noticable - i.e. make the
commandline green. I'm not familiar with the vimperator source code, so
I have no idea if this would as easy as the solution above. Any
suggestions on what events one would have to take care of to do that?

Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Hi.

Rodolfo Borges <rodolfo.borges@...> enlightened the world by
writing these words of wisdom:
> On Fri, Aug 15, 2008 at 10:08 AM, M. Terada <teramako@...> wrote:
> > The other way is that
> > write the below into .vimperatorrc
> >
> > javascript <<EOM
> > (function(){
> > var inputElm = document.getElementById('liberator-commandline-command');
> > function swapBGColor(event){
> >  inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
> > "yellow" : "";
> > }
> > inputElm.addEventListener('focus',swapBGColor,false);
> > inputElm.addEventListener('blur', swapBGColor,false);
> > })();
> > EOM
> >
> This works for me, thanks.
> And, vimperatorrc is a better place for this anyway.

Works nice for me too. Even better then the CSS version, which left the
space behind the leading `:' in the command line uncolored. I also like
having it in my vimperatorrc instead of some other plugin's config or
the userChrome.css.

Since I find this so useful, I was wondering if a similar thing was
possible to make pass-through mode more noticable - i.e. make the
commandline green. I'm not familiar with the vimperator source code, so
I have no idea if this would as easy as the solution above. Any
suggestions on what events one would have to take care of to do that?

Greetings,
Frank

--

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)
Martin Stubenschrott | 16 Aug 11:40

Re: change commandline background color when focused

Frank Blendinger wrote:
> Since I find this so useful, I was wondering if a similar thing was
> possible to make pass-through mode more noticable - i.e. make the
> commandline green. I'm not familiar with the vimperator source code, so
> I have no idea if this would as easy as the solution above. Any
> suggestions on what events one would have to take care of to do that?

I don't think it's (easily) possible now, but I think something like an
":autocmd ModeChange" would make sense.

Although again, there should be a way to access some information in an
:autocmd, in this case the new AND old mode should be able to be
accessed somehow.
--
Martin

Gmane