Sparkling gems and new releases from the world of Free and Open Source Software
CLI Upgrade
Powerline 2.5.1
If you've watched any presentations by prominent Linux developers over the past 12 months, you can't help but have noticed that many of their command prompts looked different from those of us mortals. Instead of plain old ASCII with perhaps a cleverly configured status line, you would see tiny hieroglyphics, icons, and chevrons, all rendering in 24-bit color. These colorful snippets of text and symbols update according to what the hacker is doing. While editing a text file in Vim, for example, these symbols show which mode the user is editing in, along with line numbers and document percentages. The default prompt in Bash gets visual cues that make it easier to see each command history, while even the humble Tmux gets hardware monitoring, local time, and Git repository status.
All of this is coming from a single tool called Powerline. Powerline started out as a humble status bar for Vim, adding a little visual flair and functionality without changing its classic console aesthetic. But Powerline's minimalist and functional approach was soon extended by its users to include many other command-line tools, and the project soon outgrew its text editing roots.
The new project is a unified version of the old Powerline, offering an upgraded prompt plugin for Zsh, Bash, Tmux, iPython, Awesome, i3, Qtile, and, of course, Vim. The function of the prompt will depend on where you're using it, but Powerline will typically show your current location, automatically truncated to fit whatever window size you're using, complete with icons and colors to help each session differentiate itself. However, this is just the default, and being a command-line tool, it's been designed to be modified. It's simple enough to write your own status renderer, for example, and thanks to the various configuration files and color schemes using JSON, it's easy to modify the appearance of any plugin without even delving into the code.
Installation is relatively straightforward but not simple. As a prominent Python tool that works with both Python 2.7 and Python 3.x, it can be installed from PyPI with the pip
command, but you also need to install a set of the customized fonts that are used to populate the status bar itself, which is how Powerline manages to appear like a graphical shell within the shell. You then configure your respective tools by editing their configuration files, usually by adding a link the a script or environment file installed alongside PowerShell. You can then modify and augment the installation to suit how you typically use the command line. The end result is a small concession to modern screens, colors, and design but a genuine enhancement to the command-line experience, without giving away any of the command-line functionality we're all finding so refreshing after all these years of using desktops. If you find yourself using the command line more and more and need a tiny piece of eye candy to enhance the view, Powerline is a perfect addition.
Project Website
https://github.com/powerline/powerline
File Manager
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.