Codeblocks更换主题

由于Codeblocks默认编辑框是超亮的白色,晚上关灯后很废眼睛,遂重新配置一下,使其更加护眼。

CB默认并不提供主题包之类的东东,所以只能手动配置Setting->editor,或者直接修改conf文件。

在Linux中,用户主目录下~/.codeblocks中有这个配置文件,default.conf,打开后将以下写好的配置文件写进去(最好备份一下原文件)

在Windows中,这个文件好像是/appdata/中的codeblock目录下

下面提供的主题来自著名的Oblivion

http://lkraider.eipper.com.br/blog/2008/11/codeblocks-oblivion.html 这个同学将它改成适配CB。

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksConfig version="1">
<editor>
<colour_sets>
<default />
<ACTIVE_COLOUR_SET>
<str>
<![CDATA[oblivion]]>
</str>
</ACTIVE_COLOUR_SET>
<ACTIVE_LANG>
<str>
<![CDATA[C/C++]]>
</str>
</ACTIVE_LANG>
<oblivion>
<NAME>
<str>
<![CDATA[oblivion]]>
</str>
</NAME>
<cc>
<style0>
<FORE>
<colour r="238" g="238" b="236" />
</FORE>
<BACK>
<colour r="46" g="52" b="54" />
</BACK>
<NAME>
<str>
<![CDATA[Default]]>
</str>
</NAME>
</style0>
<style1>
<FORE>
<colour r="136" g="138" b="133" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style1>
<style2>
<FORE>
<colour r="136" g="138" b="133" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style2>
<style3>
<FORE>
<colour r="52" g="101" b="164" />
</FORE>
<BOLD bool="0" />
<NAME>
<str>
<![CDATA[Comment (documentation)]]>
</str>
</NAME>
</style3>
<style4>
<FORE>
<colour r="52" g="101" b="164" />
</FORE>
<BOLD bool="0" />
<NAME>
<str>
<![CDATA[Comment (documentation)]]>
</str>
</NAME>
</style4>
<style6>
<FORE>
<colour r="164" g="0" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Comment keyword error (documentation)]]>
</str>
</NAME>
</style6>
<style7>
<FORE>
<colour r="173" g="127" b="168" />
</FORE>
<BACK>
<colour r="46" g="52" b="54" />
</BACK>
<BOLD bool="1" />
<NAME>
<str>
<![CDATA[Number]]>
</str>
</NAME>
</style7>
<style8>
<FORE>
<colour r="233" g="185" b="110" />
</FORE>
<NAME>
<str>
<![CDATA[Keyword]]>
</str>
</NAME>
</style8>
<style9>
<FORE>
<colour r="78" g="154" b="6" />
</FORE>
<NAME>
<str>
<![CDATA[User keyword]]>
</str>
</NAME>
</style9>
<style10>
<FORE>
<colour r="185" g="49" b="0" />
</FORE>
<BACK>
<colour r="30" g="3" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[String]]>
</str>
</NAME>
</style10>
<style11>
<FORE>
<colour r="185" g="49" b="0" />
</FORE>
<BACK>
<colour r="30" g="3" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[String]]>
</str>
</NAME>
</style11>
<style12>
<FORE>
<colour r="245" g="121" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Character]]>
</str>
</NAME>
</style12>
<style13>
<FORE>
<colour r="211" g="215" b="207" />
</FORE>
<NAME>
<str>
<![CDATA[UUID]]>
</str>
</NAME>
</style13>
<style14>
<FORE>
<colour r="78" g="154" b="6" />
</FORE>
<NAME>
<str>
<![CDATA[Preprocessor]]>
</str>
</NAME>
</style14>
<style15>
<FORE>
<colour r="233" g="185" b="110" />
</FORE>
<NAME>
<str>
<![CDATA[Operator]]>
</str>
</NAME>
</style15>
<style16>
<BACK>
<colour r="23" g="32" b="24" />
</BACK>
<NAME>
<str>
<![CDATA[Selection]]>
</str>
</NAME>
</style16>
<style17>
<BACK>
<colour r="24" g="33" b="33" />
</BACK>
<NAME>
<str>
<![CDATA[Active line]]>
</str>
</NAME>
</style17>
<style18>
<BACK>
<colour r="114" g="159" b="207" />
</BACK>
<NAME>
<str>
<![CDATA[Matching brace highlight]]>
</str>
</NAME>
</style18>
<style19>
<FORE>
<colour r="238" g="238" b="236" />
</FORE>
<BACK>
<colour r="164" g="0" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[No matching brace highlight]]>
</str>
</NAME>
</style19>
<NAME>
<str>
<![CDATA[C/C++]]>
</str>
</NAME>
<editor>
<keywords />
</editor>
</cc>
</oblivion>
</colour_sets>
</editor>
</CodeBlocksConfig>



你可能感兴趣的:(codeblocks)