Dynamic Colour Changes in Conky

Conky is a popular system monitor that I have blogged about before. Its advantages are that it can be whatever you want it to be. You decide what is displayed and the format and so much more.
I’ve got a couple of Conkys on my regular desktop. The main one displays system info and is the one I’m updating today. The other one displays the Now Playing details. It works with both Amarok and Clementine as I switch between them all the time. It only appears when either is in use.
The main Conky includes battery information for both the batteries in my Thinkpad. The information includes the current charge level of each battery, the time remaining on the battery that is currently being used and the status of the batteries i.e. if they are discharging or charging. There is an additional line that shows whether the AC Adapter is attached or not, actually whether it is supplying power or not.
It all has worked well for a while but I wanted the battery information to change colour dependent on the current charge level. A search gave me a number of similar methods of achieving this.
Conky battery status

All these methods had one thing in common, they used Conky’s battery_percent variable but I prefer and use the battery variable. The reason they use the battery_percent variable is simple, battery_percent has a numeric output and therefore the if_match command is easy to use to match the battery charge level. I prefer the battery variable as it outputs status as well as the charge level.
After some experimenting I found a simple solution. I use the battery_percent variable in the if_match statement but use the battery variable for the output. The line from my conkyrc is below. It is all one line in the conkyrc and the second line is the same with BAT) set to BAT1.

$font${color1}Battery 1: $color${if_match ${battery_percent BAT0}<=15}${color7}${blink ${battery BAT0}}${color}${else}${if_match ${battery_percent BAT0}<=25}${color8}${battery BAT0}${else}${if_match ${battery_percent BAT0}>25}${color}${battery BAT0}${endif}${endif}${endif}, ${battery_time BAT0}${color}

The if_match variable looks for 3 different battery charge levels. Above 25% it shows in the regular text colour I use through most of the display. When it reaches 25% the line changes to gold text. A third check looks for a charge of less than 15%. At that point the line of text turns red and starts to blink.

Xfce Screen Locking without XScreensaver

If like me you dislike XScreensaver and its ugly unlock screen there is an easy alternative that is actually better integrated into Xfce. Korora like most distros includes Xscreensaver with Xfce. Xscreensaver provides both the screensaver graphics and screenlocking for security. Screensaving isn’t needed these days with modern monitors. It is a relic from the distant past of CRT monitors. However for laptops that can be taken anywhere and for desktops in public areas, screen locking is an important part of your security set up.

You can disable the screensaving so it just blanks the screen. But you still have the ugly Xscreensaver screen to type your password. There is a better way.

I remove xscreensaver, this isn’t strictly necessary but as it isn’t being used there is no point keeping it. ‘dnf erase xscreensaver*’ takes care of that.

Next I install light-locker. Light-locker works with LightDM which is the default Display Manager for Xfce in Korora and many other distros. Actually LightDM is used in Korora for other Desktop Environments too so this applies to them too. However it is well integrated into Xfce. ‘dnf install light-locker’ is all that is needed. I did a restart but I’m not sure if that is really needed.

Now Xfce’s Power Manager settings has gained an additional “Security” tab which allows you to configure Light-locker. Not that much needs configuring. On my laptop I enabled “Lock when Going to Sleep”. This enables me to put the laptop to sleep and lock the screen simply by closing the lid as I have set that as the default action elsewhere in the Power Manager settings.

Now when I open the laptop rather than the unlocked desktop or the ugly XScreensaver window appearing I get the LightDM login screen. That looks much better particularly as I have customised it but that is a subject for another day.

Korora 22 Released

Better late than never Korora 22 has been released. There are a lot of improvements in the new version but for full details see Korora Project.

Conky Manager

Conky Manager is a simple way for those who aren’t familiar with Conky to start using it. I’ve mentioned before that I like Conky and have occasionally mentioned how powerful it can be. However making the first steps is the hardest part. It has a very steep learning curve so anything that gets you started is a good idea. That’s where Conky Manager comes in.

Cm-Korora

Conky Manager comes with a number of preformatted Conkys and a search of the internet will locate several more packs that can easily be added to Conky Manager.

The screen shows a list of the installed configurations and below a preview of most. There is an option to recreate the previews. This is handy if you edit any of the designs as I did in the displayed example.

 

Once you’ve selected the design you want there are some options that you can set. These depend on the design but commonly let you choose the screen location and correct network interface and similar personalisations that are unique to your system. You can then start the Conky, set it to autostart whenever you restart the computer. If you want to customise it further you can open it in a text editor.

Conky Manager is available in the repos of most manager distros including Korora and Fedora. You can install it in Korora easily with sudo yum install conky-manager.

If you have ever been curious about Conky and wanted to try it there is no easier way than with Conky Manager, give it a go.

Korora 21 (Darla) Now Available

The final stable release of Korora 21 is now available. See Korora Project for full details.

KDE’s New Touchpad Settings

I’ve been testing KDE 4.14.3 on Korora 21 Beta over the last few days. As Korora 20 had the same version there is little difference between the two. However one change that is noticeable is the new configuration module for Touchpads. Korora 21 is based on Fedora 21 and so most, if not all, of this post applies to Fedora 21 too.

kdetouchpad

Although laptops and hence touchpads are very common, the options to configure them were very poor in the past. They worked but gave little choice in the set up. With the new module there are many more options for adjusting sensitivity. But there also some new options such as Palm Detection, and disable Touchpad while typing.

Another addition I particularly like is the option to disable the touchpad when a mouse is detected. This works well even with my Bluetooth mouse. There is even the option to ignore any detected advice. I guess this is for devices that may be incorrectly detected as a mouse.

KDE 4.14.3 may be one of the last versions of KDE4 as KDE’s Plasma 5 is out and will ultimately take KDE4’s place but for now the current version is great desktop.

 

Korora Project Releases Korora 21 Beta

The beta release of Korora 21 is now available. The Korora Project.site has the full details. As usual Korora is based on the latest Fedora release with all the latest updates included.

If you have any suggestions for improvement or issues follow the links there.

Desktops, Drivers and Other Stuff

Over the last couple of weeks I’ve spent some time switching back and forward between Xfce (my preferred Desktop Environment) and KDE. I once ran KDE almost exclusively but for various reasons I’ve been using Xfce for the last couple of years.

One of the reasons was the frequency of KDE to lock up. It would just stop running. I have long suspected it was a graphics problem but had no proof. I have  a nVidia GT240 video card and had been using the open source nouveau driver. After a recent lock up I was forcing a shutdown when the screen filled with nouveau errors. Although I prefer to use open source drivers where possible I decided to install the nvidia drivers from RPMFusion using Korora’s PharLap application.

All went well with the installation and it did solve the lock up problems. Doing a bit of research I found an old bug which has been kept current. As far as I can see there has been no action on it. Anyhow problem solved and now I have working Xfce and KDE desktops and can and do switch between them as I feel like it.

Speaking of old bugs a long time I reported a problem with landscape printing and after much investigation by many people it was narrowed down to cups-filters and an update provided which fixed the problem. Now some months later those packages were updated and the problem returned. I commented on the bug and straight away another update was provided along with an apology. Well done Jiri Popelka. I tested and provided karma to the update so hopefully it is making its way through the update system now.

I’ve been testing installations on a uefi system the last couple of days. I was surprised how simple it was with Korora and so also with Fedora. More details later but if you want a linux system on an uefi computer either as a single installation or a dual boot Korora is the way to go.

Latest Tilda

I did post some time ago about the disappearance of Tilda from Fedora. At the time this was due to the lack of upstream support and the fact that development had stalled. Since then development has again started and Tilda is being improved. While it is not (yet?) available for Fedora it is a simple procedure to add it. The following link covers compiling and installing it. I tested it in Korora 20 Xfce and it worked fine and I have the latest Tilda running now.

/kernel_reloaded/ » compile latest tilda and enjoy solarized terminal.

Clementine Error

I use a couple of music applications when I’m working. Mostly I use Amarok but I also like Clementine. It was inspired by Amarok 1.4 so is popular with many who didn’t like the changes brought by KDE 4.

For some time I’ve had an issue with Clementine, it wouldn’t save the last played date. Not a major problem for most people I guess. However I use a dynamic playlist that is designed to play all the tracks in my collection with minimum repetition. It uses the last played date and won’t repeat something that has been played in the last few weeks.

I did a search online and didn’t find anything. I also asked on a couple of forums but got no response. Today I got around to looking at it again. I found the the config directory, located at ~/.config/clementine, contained 2 subdirectories. One of these is called “networkcache”. I deleted this as an experiment and was surprised to find the date saved again. Strangely I notice that the directory hasn’t been recreated so maybe it isn’t used any more.

However problem solved, Clementine is working again.