wmaillard / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

Allow white-on-black color theme #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I just prefer my shells to have white text on a black background than black 
text on a white background.

Patch attached for a new --white-on-black command line flag, which can be 
overridden in the JavaScript by setting the global whiteOnBlack variable to 
true or false.

Original issue reported on code.google.com by nigel.ta...@gmail.com on 14 Jul 2009 at 2:59

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for the patch. I'll have to think about this a little bit. The 
recommended
approach is generally that you should use the -f option to provide an 
alternative CSS
style file. But for simple tweaks such as changes in color, there probably 
needs to
be an easier solution.

Original comment by zod...@gmail.com on 14 Jul 2009 at 4:00

GoogleCodeExporter commented 8 years ago
Ah, I didn't realize that you could -f style.css:whiteonblack.css. Maybe a 
better 
solution is to simply check in a separate whiteonblack.css file that has, for 
example, 
small additions like "#vt100 { background-color: black; }".

Original comment by nigel.ta...@gmail.com on 15 Jul 2009 at 12:04

GoogleCodeExporter commented 8 years ago
I just checked in revision #158, which has a new "--css" command line option. 
The 
manual page describes how to use that option to enable white-on-black mode. 
Please let 
me know, if you encounter any difficulties with this new option.

Original comment by zod...@gmail.com on 30 Jul 2009 at 5:50

GoogleCodeExporter commented 8 years ago
Is there the chance to make this a per-session option, rather than at start 
time?  I 
like black on white, but another user of my system likes white on black.

How about a right-click option to select a CSS or a style?

Original comment by gnute...@gmail.com on 30 Jul 2009 at 11:53

GoogleCodeExporter commented 8 years ago
Let me think about this for a while. I didn't really anticipate the need of 
per-user
style sheets. I'll have to see how this could be done cleanly.

Original comment by zod...@gmail.com on 31 Jul 2009 at 1:00

GoogleCodeExporter commented 8 years ago
I think, I have some general idea of how user selectable style sheets should be 
done
cleanly. Unfortunately, that'll require a little more work to get right.

In the meantime, the best suggestion is to provide alternative URLs for 
different
pre-defined style sheets. Something like the following should work:

shellinaboxd -s /:LOGIN -s /white-on-black:LOGIN -f
/white-on-black/styles.css=styles-white-on-black.css

You would then have to create a suitable styles-white-on-black.css file by
concatenating the existing styles.css and white-on-black.css files.

Users can then go to either the default URL, or the /white-on-black URL. This
mechanism can be extended for arbitrary other style changes (e.g. monochrome 
mode,
bigger/smaller fonts, different cursor color, ...)

Please let me know, if this works as a stop-gap measure until I find the time to
implement a more flexible solution.

Original comment by zod...@gmail.com on 31 Jul 2009 at 9:16

GoogleCodeExporter commented 8 years ago
Thanks, this sounds like a good interim workaround.  Will try.

Original comment by gnute...@gmail.com on 2 Aug 2009 at 11:20

GoogleCodeExporter commented 8 years ago
Fixed in subversion. Use the --user-css option to add new style sheets that 
customize 
the visual appearance. These style sheets can then be selected by the user by 
opening 
the right-click context menu.

Original comment by zod...@gmail.com on 21 Nov 2009 at 9:02