How to Use The Solarized Color Scheme to Prevent Eyes Strain – Make Tech Easier

Make Tech Easier


When you’re reading a book outside, a shady spot can offer respite from the sun’s bright rays on your book’s pages. Wouldn’t it be nice to bring the effects of a shady environment to your computer screen, saving your eyes from the harshness of black-on-white backlit text? Solarized can make that wish a reality.

Solarized, a color scheme developed by Ethan Schoonover, transforms your Linux terminals and applications with a simple 16-color palette you can apply in a matter of minutes. It offers a mix of low contrast, reduced brightness and readability to reduce eye strain and maximize ease of use.

In this article we will discuss the theory behind Schoonover’s creation and dig into the basics of how you can apply his color scheme to your favorite terminal.

Schoonover indicates in his website that he loves to read outside and in the shade. He tries to find a place under a tree where the shade offers a nice dimming effect from the harsh direct sunlight – a place where “shaded paper contrasts with … crisp text nicely.”

In that setting, the contrast between the text and its white background is lower than the contrast you would find on your computer monitor that displays black text on a white backdrop. The latter situation, unfortunately, can strain the eyes; it is also a situation many computer users find themselves in.

Solarized combats this with sixteen colors (eight base tones and eight accent colors) that replicate the subdued nature of a shady spot. The colors come from the CIELAB color space and are designed with fixed lightness relationships so that, when they’re grouped together, they don’t strain your eyes. Check out Schoonover’s website for a quick look at the color space.

Solarized website screenshot

The color swatches at the top of that screenshot match the colors used in the light- and dark-style terminals shown below them. You can apply either the light or dark color scheme to your own terminals with a simple copy/paste into an “.Xresources” file.

If you haven’t yet grabbed the necessary files from the Solarized website, do so now with git:

git clone git://github.com/altercation/solarized.git

or download the zip file here.

Unpack the zip file if necessary. Then enter the Solarized directory and its “xresources” subdirectory.

Now copy the entire text from the “./solarized” text file into your “$HOME/.Xresources” file.

Each line in the “.Xresources” file preceded by an exclamation point is commented out. You can see that the collection of light colors is commented out, so if you used Solarized now, your terminal would apply the dark theme. If you want to apply the light theme, uncomment the light colors and comment the dark colors so your text looks like the following image.

Solarized .Xresources

To apply the changes, reload your “.Xresources” file.

Open a new terminal to reveal the new color scheme.

This application of new colors will work well in many terminals, but Schoonover has also developed color swatches for specific applications.

In your base “solarized” directory, you can find specific installation instructions for terminal applications such as Vim, Emacs, and Mutt and graphical applications such as Photoshop and GIMP. The “README.md” text file in each directory explains these instructions.

Some terminals like the Xfce terminal also rely on config files other than “.Xresources,” so you may find your chosen terminal listed in its own directory. If our .Xresources instructions listed above did not work, you may need to follow a README.

Note: In Photoshop and GIMP you are installing a color palette, not forcing the GUI elements of the program to use the Solarized color scheme. Schoonover marks these variations of use in the name of each subdirectory, including “vim-colors-solarized” and “adobe-swatches-solarized.” The words “colors” and “swatches” in those names respectively denote whether you will change the look of an application or will offer the application a selection of colors to use in its operation.

The major difference between the “.Xresources” installation covered here and these additional installation procedures is that you may be asked to edit unique configuration files. Instructions for Vim ask that you edit its “.vimrc” file, for instance. You may also have to restart the application to see any changes take effect.

Applying the Solarized color palette only takes a few minutes, but its effects can be dramatic. I began using it several years ago to decrease my headaches associated with eye strain. It helped so much that I continued using it every day.

I now recommend Solarized every chance I get for its practicality and attractiveness. It has made computer use a much more pleasant experience for me. I hope you also find it worthwhile.



Source link

How to Use Netctl in Arch Linux to Set Up a Network Connection – Make Tech Easier

Make Tech Easier


Systemd has become a primary feature of many Linux distributions, including Arch Linux. It completes the boot process, starts and stops services, and even works closely alongside the netctl utility for connecting to the Internet.

Arch Linux developers created Netctl, as its man page states, to “control the state of the Systemd services for the network profile manager.” In short, they created Netctl to make it easy to use Systemd-like commands to enable and disable network profiles you create.

This article will show you how to use Netctl to create wired and wireless profiles and manipulate them to start manually or at boot.

If you’re using Arch Linux, Netctl should have been installed with the base group of utilities. If for any reason you don’t have it on Arch, install with the command:

For other systems, you can find the source code here.

One thing you’ll need to do before making your own network profiles is find out the names of your network devices. Use ip link to get what you need.

iplink command

This machine’s wired device shows up as “enp19s0.” Its wireless card shows up as “wlp18s0b1.” You will use similar values to edit Netctl’s example profiles to make them unique to your machine.

Speaking of examples, look what’s available in Netctl’s default samples directory, “/etc/netctl/examples.”

Netctl example profiles

This collection of text files gives you a basis for creating your own custom profiles. The title of each profile here applies to specific situations, including a DHCP-driven wired ethernet connection and a WPA-encrypted wireless connection — both of which you will see below.

First, take a look at the text of the sample “/etc/netctl/examples/ethernet-dhcp” file.

Netctl ethernet example

By default, many of the options in this file are commented out. You can explore them in depth on the Netctl profile man page with man 5 netctl.profile. For now, you should focus on the “Interface…” line.

You can make use of this profile by copying it to Netctl’s main directory.

1. Change the directories with the command:

2. Copy the example file to that directory:

cp ./examples/ethernet-dhcp ./custom-wired-profile

The filename “custom-wired-profile” can be anything you like; try to make it something easy to remember.

3. From there, all you need to do is edit “Interface …” to reflect the name of your network card you found earlier with ip link. In this case, the line should read “Interface=enp19s0.”

4. Now look at the contents of “/etc/netctl/examples/wireless-wpa.”

Netctl wireless profile

You will also need to copy the sample wireless profile to the base Netctl directory:

cp ./examples/ethernet-dhcp ./custom-wireless-profile

When you edit this file, you will again change “Interface …” to match your card name. For this article “Interface=wlp18s0b1” is appropriate.

You must also change the “ESSID=…” and “Key=…” lines to match the name and password of your wireless connection, respectively. Remember to keep your name and password inside the provided single quotes.

Now you’re ready to start a wired or wireless connection. In both cases, the syntax is the same:

netctl start <profile-name>

You will need to cd /etc/netctl/ into the base directory to access your saved profiles.

Netctl commands all look nearly identical as they follow the form netctl command [profile]. Netctl’s help page offers this overview of its commands.

Netctl commands

Any of the above commands that list “[PROFILE]” as part of their listing require a profile name, like “custom-wired-profile.” The others, such as netctl stop-all, do not require a profile name.

Systemd users should find these commands similar to their use of services. If a user was to enable the NTP daemon with Systemd, for instance, they would use the systemctl enable ntpd.service.

In that same way, Netctl users can enable their profiles to start at boot with netctl enable <profile-name>. You can just as easily disable a profile to stop it from starting at boot by using “disable” instead of “enable” in that same style command.

You now know enough to edit, start, stop, enable, and disable your custom network profiles.

If you edited your device name, network name, and password lines properly, Netctl should connect without any errors. Should something go wrong, however, you can always diagnose the problem with

netctl status <profile-name>

or



Source link