Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Finding current terminal color scheme [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Wed Aug 10, 2016 2:59 pm    Post subject: Finding current terminal color scheme [SOLVED] Reply with quote

Is there a way to output the current color scheme of your terminal? I know you can override this in your .Xdefaults by adding the color1 - color15 definitions, but I am having problems finding the defaults.

My situation: I have been using aterm for about a decade and really like the default color scheme. I'm planning to switch to urxvt, but some of the default colors are slightly different. If possible I'd like to dump the colors from aterm and set them in my .Xdefaults for urxvt.


EDIT: The aterm colors may also be the system default, as the colors look the same when on the virtual terminal. I believe the system colors are set in /etc/DIR_COLORS, but I'm unsure of their hex values and how they would map to each of the color1 - color15 variables.


Last edited by mikegpitt on Thu Aug 11, 2016 12:27 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Wed Aug 10, 2016 5:14 pm    Post subject: Reply with quote

If xrdb -query doesn't get what you want, you'll have to look at the sourcecode for aterm because especially if you're not using a DE, the "defaults" will be hardcoded.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Wed Aug 10, 2016 10:31 pm    Post subject: Reply with quote

Thanks for the reply! I looked at the aterm source and found the colors. They are also listed on the man page :oops:

But, this is why I'm confused. The colors in my aterm are not the defaults. Apparently, aterm is taking some of my custom xterm color scheme, but not all of it. xterm and aterm definitely look different, but not completely different.

I think the color scheme I'm really looking for is the one gentoo uses for the virtual terminals. Where can a retrieve a list of these colors?
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Thu Aug 11, 2016 12:27 am    Post subject: Reply with quote

I'm going to mark this one solved. I didn't really answer my original question, but I seem to have what I need. This is the color scheme I'm using:
Code:
URxvt*color0: #000000
URxvt*color1: #b21818
URxvt*color2: #18b218
URxvt*color3: #b26818
URxvt*color4: #1818b2
URxvt*color5: #b218b2
URxvt*color6: #18b2b2
URxvt*color7: #b2b2b2
URxvt*color8: #686868
URxvt*color9: #FF5454
URxvt*color10: #54FF54
URxvt*color11: #FFFF54
URxvt*color12: #5454FF
URxvt*color13: #FF54FF
URxvt*color14: #54FFFF
URxvt*color15: #FFFFFF


I also needed to add this to my .vimrc:
Code:
set bg=dark


Unsure why I never needed the vim setting before. It must have something to do with aterm. But, with the above I have my color scheme replicated nicely for urxvt.
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Thu Aug 11, 2016 10:39 am    Post subject: Reply with quote

Glad you found the colors. From the syntax you showed, the settings go in ~/.Xdefaults

I don't know if case makes a difference, but all the urxvt settings in my .Xdefaults files are "URxvt* ..." Many of the color settings deal with particular items in the terminal, such as cursor color, pointer color, underline color, bold color, italics color, scroll color, and several others. See the RESOURCES section of the urxvt man page.

The DIR_COLORS file affect the output of the `ls` command, and as far as I know, only the `ls` command.

Edit to add some remarks. I see you knew about .Xdefaults (or .Xresource now, I guess. I learned something new this morning). The urxvt man page has the default colors listed under COLOURS AND GRAPHICS. You'll notice the colors given there are color names, not hex RGB values. The correspondence between color name and value are in /usr/share/X11/rgb.txt (the location or your rgb.txt file may differ), with the color values being in decimal, not hex.

I think, as you found out, defaults won't be reported by `xrdb -query` or by viewing of the .Xdefaults/.Xresources file. But also as you found out, the defaults are documented in the respecive man pages, and of course somewhere in the source code.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Fri Aug 12, 2016 7:21 pm    Post subject: Reply with quote

Thanks for the additional comments! I haven't had a chance to review further after I sort of got it where I want. Some of the colors are still a bit off in vim. It's fine, but a little different. It's still an unknown where aterm was pulling in these 'magic' colors. The only reason it matters, is because I've been looking at the same color pallet for the last 10+ years. I don't want to change :wink:
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Thu Aug 18, 2016 7:19 pm    Post subject: Reply with quote

Adding some additional info here for anyone who may find it helpful. I was still having problems with my vim colorscheme looking different than previous. I tried the 256 color urxvt option, but this didn't help. It turns out I was going in the wrong direction. Aterm appears to only use 8 colors. So I added this to my .vimrc and my colors were back to normal.
Code:
set t_Co=8
Maybe I should upgrade my color scheme to something more modern... but this was the answer to my question.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum