Hello,
First let me start off by saying I'm not sure if this is Slackware specific as Slackware is all I've ever used, if it's not then I do apologize.
What I'm wanting to do is pretty simple when thought about, but doing it is turning out to be a much bigger monster. I've been working with this for a couple days, and I partly blame that on the search engines trying to decide what I want instead of just giving me results on what I type lol.
First some details;
- I have recompiled nano with the 256 color support using the rcnano.c submitted here:
http://savannah.gnu.org/patch/?6873 (no issues here, the colors are beautiful!)
- I am using xterm-256color|putty-256color as my $TERM.
- I have made a bunch of nanorc files that I can quickly switch between by using a shell script I wrote. (Sometimes I feel like darkness, sometimes you might want something a bit lighter)
Everything is perfect so far. Except, one problem. nano's background color is based on the terminal's background color which means most lines in the file that I'm editing will have the proper colors until the line terminates, then the rest of the screen for that line is black. Ugly to say the least.
What I'd like to do is temporarily change the background color to match whichever nanorc I'm using. Some of the things I've tried are as follows:
echo "\e[##;##;##m" && nano (file) -- didn't work, black background (of course, replace the #s with numbers - also attempted instead of echoing, exporting it to PS1)
xterm -bg blue -- I dont use x so it complains about no display (export DISPLAY="0:0" didn't fix it, locally or via putty)
setterm -background blue > /dev/(tty0|pts/0) - depending on where I was, of course. This did give me the blue background, but it fails once I start up nano, or even do an ls. I also haven't attemtped doing && nano (filename) on this because of the color limitations using setterm (ie: only get the ansi colors to choose from).
xrdb -load (file) didn't work because of no DISPLAY (even exporting DISPLAY="0:0" failed)
The only other option that I've seen is software called XtermControl, but two things make me uncomfortable with it. It hasn't been updated in quite some time (late 2009), and the fact that it's not already in Slackware. I was kind of hoping to keep this "in house" I guess you could say, so before attempting to use that software I figured I'd ask around and see what I could find out.
Thanks in advance!