There are a lot of programs that one can use to write code for the program C.
A few I'll mention: Net Beans, Eclipse CDT, and Code Lite IDE. There's a difference between a code editor and an IDE (Integrated Development Environment)
Have a look here:
https://www.makeuseof.com/best-ide-code-editors-for-linux/
In this tutorial I'm using the program called Code Blocks to show a few simple steps and how to install the dark theme.
Code Blocks wasn't in my Debian Software Manager so I looked in Synaptic Package Manager for it.
If Code Blocks is not in your Software Manager or you can't find it in Synaptic you can download the 32-bit or 64-bit version for Linux here:
Once Code Blocks is installed you can launch it via the terminal by running:
When Code Blocks launches you'll have to choose a compiler. I selected GCC.
The screenshot of the program up and running has a dark theme on my Debian system.
Code Blocks at first launch on my Debian system didn't have a dark background. I had to follow these instructions to download and install the dark themes.
To download the dark theme go here and look to the upper right hand side of the page and click on the white arrow and download the 'customized-theme.zip' to your Desktop.
https://drive.google.com/file/d/1qj6UpKXokr_QHLrRalMrTcMjsed8vKcI/view
Like Sangams said in his article, you have to close the Code Blocks program before opening the config to add the dark theme.
To launch the CB Share Config open your terminal and run:
Once open (see screenshot) follow the instructions exactly.
The 3 dots to the right of the Source configuration file will lead you to your root directory.
You'll have to navigate through your directory to the source of the default.conf.
FYI: the .conf is a hidden file in your /home directory. To locate it, right click on your home directory and select from the drop down menu: Show Hidden Files.
For me, the path was: /home/alex/.config/codeblocks/default.conf
And then for the Destination Configuration File the path for me was:
/home/alex/Desktop/customized-theme/theme.conf
After following those instructions I had the obsidian dark background when going into the Settings.
Go to Settings> Editor> Syntax Highlighting>
The white background was hard on my eyes and this fixed the problem or so I thought.
I discovered that if I begin a new empty file the background is white every time.
So, I found that if you start writing code in the build log and save file as, name it and close it...... then re-open the same file then the background will be dark. I'm not sure if there is a way to make the new empty file generate a dark background or not. So for now, I simply re-open what I've already created.
To find out if the code that you have written works and runs click on Build and then select Build and run from the drop down menu. The terminal will confirm what you have written and you can read it.
Enjoy your Linux and happy code writing.
Comments