Monday, October 20, 2014

Theme from a movie

In which your humble author explores ways to help Linux Mint finally break free of its "Any Colour You Like As Long As It's Green" shackles...

One of my favourite movies of recent years is "Berberian Sound Studio", a psychological thriller in which a foley artist (played by the superb Toby Jones, currently to be seen in TV's "Detectorists") lands a job in a CineCitta recording facility and then becomes a little too involved in his work. Throughout the film, the red studio safelight is used as a leitmotif to cut between scenes. Okay, says I, that's another desktop theme project that's waiting to happen!

NB: I am doing this project on my Lenovo laptop running Linux Mint 17 ("Qiana") 64-bit MATE edition. But I'm pretty sure you will have no problem applying it to other flavours of your favourite Linux distro.

Wallpaper - I trawled that internet thingy to find film stills that featured the safelight and the "silenzio" sign. I found a couple that I liked, but nothing that was 'readymade'. After some judicious cropping and application of a little 'smart blur' to get rid of the pixellation that results from such vicious enlargement, I ended up with this.

Red Theme - To colorize the windowframes and menus, you will need to download and install the zoncolor themes pack from the excellent Noobslab concern. The only downside to this jolly useful package is that the themes (still) come with those rather dated and ugly Gnome icons. I happen to like the icons that come with Linux Mint, it's just a shame they are all designed to best suit the default green colour scheme...

Red Icons - imagine my pleasant surprise when I found the Mint-X Colors icons package, also via those awfully nice folks at Noobslab. Rumour has it that future versions of Linux Mint will have the coloured Mint-X icons included as part of the installation. Hoorah! No more "green only"! But for now, you can get all you need from (who are, I realise, getting a lot of free advertising in this article!)

Red Panel - As I explained in previous postings on this very blogspot, the MATE panel by default appears in a rather dull shade of off-white (It also comes with that big ugly MintMenu attached which defies all attempts to "style" it). You can make adjustments to the panel's transparency, but that's about it. To get it to match your scheme, the best approach is to create a background 'tile' to fill it with the glorious colour of your choice. I happen to like a bit of 'texture' to my desktops (not for me the flat, LegoLand features of modern Windoze). I used our old friend The GIMP to fountain-fill a 25-pixel square with a subtle blend of red and black, to get a nice gradient effect to match the ZonColor windows. Like this:-
Right-click on your panel and select "Properties" then "Background" to apply it. I keep a sub-folder in "Pictures" in which I store a number of "panel-fill*.png" files to suit different colour schemes. As for that menu... You can see (-> the last screenshot at the foot of this page) that I've replaced it with one of the other choices in the "Add To Panel" apps list, one which does adapt to the ZonColor scheme.

The Conky - Derived for the most part from Conky Hardy, this hasn't changed that much since the last posting. I simply fixed a couple of things and added a couple more! This time, I made most of the text match my colour scheme (I use a very useful colour picker plug-in for Firefox called Rainbow to do this kind of thing). I highlighted the "active" text in white and the digital clock in red. I have discovered some new features which have been added since last time, notably the ability to report the temperature of the CPU core(s), so I rearranged the CPU section slightly to accomodate this new info. You need to have Lm Sensors installed on your machine for this to work properly. Full instructions for setting it up can be found here. After a previous blog, where I demonstrated how to get your battery indicator to change colour according to its state of fullness, someone pointed out that it caused the whole conky to start flashing in a most unorthodox fashion when it got down below the 'red' level. I've now simplified the script so that it doesn't do this anymore. In addition, I increased the number of items on the "Highest CPU" list, did a couple more tweaks to the wireless/network section and replaced some of the icons with ones from the "ConkySymbols" and "Poky" fonts, which were part of yet another package from Noobslabs (On an unrelated note, I noticed that the Windoze symbols fonts such as Webdings and Wingdings stopped working properly on m'Linux, like these guys. I'd be glad if someone could suggest a way of fixing this that doesn't involve rolling back my installation in any way!). Anyway, once again, here's that blessed .conkyrc file in full:-

# Conky by
# Modified by Umair -
# Further modified by ppMinty 2014

# Use Xft?
use_xft yes
xftfont Verdana:size=9
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 300 0
maximum_width 300

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color a05050
default_shade_color black
#default_outline_color white
own_window_colour white

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 20
gap_y 20

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 1

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none

${alignc}${time %A} ${time %e %B %G}

${color red}${font LCDMono:size=50} ${tim %H:%M}${font}${color}
${voffset 4}${font ConkySymbols:size=30}U${font}${alignr}Linux Mint 17 "Qiana" MATE 64-bit
${font StyleBats:size=15} ${font}Kernel: ${alignr}${kernel}
${font StyleBats:size=15} ${font}Hostname: ${alignr}${nodename}

${font ConkySymbols:size=13}F${font} CPU: ${color white}${cpu}%${color} (@ ${color white}${freq}MHz${color}) ${alignr}${cpubar cpu0 8,110}
${font StyleBats:size=15} ${font} Core 1:${alignr} ${color white}${cpu cpu1}%${color} ${cpubar cpu1 8,110}
${font StyleBats:size=15} ${font} Core 2:${alignr} ${color white}${cpu cpu2}%${color} ${cpubar cpu2 8,110}
${font StyleBats:size=15} ${font} CPU Temperature:${alignr}${color white}${execi 10 sensors | grep ^temp1 | tail -n 1 |awk '{print $2}'}${color}
${font ConkySymbols:size=13}j${font} RAM: ${color white}$memperc%${color}, SWAP: ${color white}$swapperc%${color} ${alignr}${membar 8,110}
${font ConkySymbols:size=13}K${font} Hard Drive: ${alignr}${color white}${fs_free /home}${color} available (of ${color white}${fs_size /home}${color})
${font Poky:size=12}R${font} Battery: ${color white}${battery_percent BAT1}%${color} ${alignr}${if_match ${battery_percent BAT1} <= 10}${color red}${battery_bar 8,110 BAT1}${color}${endif}${if_match ${battery_percent BAT1} >= 10}${if_match ${battery_percent BAT1} <=49}${color orange}${battery_bar 8,110 BAT1}${color}${endif}${endif}${if_match ${battery_percent BAT1} >= 50}${if_match ${battery_percent BAT1} <=79}${color yellow}${battery_bar 8,110 BAT1}${color}${endif}${endif}${if_match ${battery_percent BAT1} >= 80}${if_match ${battery_percent BAT1} <=99}${color green}${battery_bar 8,110 BAT1}${color}${endif}${endif}${if_match ${battery_percent BAT1} >= 100}${color white}${battery_bar 8,110 BAT1}${color}${endif}
${font Poky:size=12}x${font} Uptime: ${alignr}${color white}${uptime}${color}
${font Poky:size=12}a${font} Processes: ${alignr}${color white}$processes${color} (${color white}$running_processes${color} running)

Highest CPU $alignr CPU% MEM%
${hr 1}
${color white}${top name 1}$alignr${top cpu 1} ${top mem 1}
${top name 2}$alignr${top cpu 2} ${top mem 2}
${top name 3}$alignr${top cpu 3} ${top mem 3}
${top name 4}$alignr${top cpu 4} ${top mem 4}
${top name 5}$alignr${top cpu 5} ${top mem 5}
${top name 6}$alignr${top cpu 6} ${top mem 6}${color}

NETWORK ${hr 1}
${if_existing /proc/net/route wlan0}${voffset 4}${font ConkySymbols:size=10}d${font} Total Upload: ${alignr}${color white}${totalup wlan0}${color} ${upspeedgraph wlan0 8,110}
${voffset 4}${font ConkySymbols:size=10}e${font} Total Download: ${alignr}${color white}${totaldown wlan0}${color} ${downspeedgraph wlan0 8,110}
${voffset 4}${font ConkySymbols:size=10}I${font} Local IP Address: ${alignr}${addr wlan0}
${voffset 4}${font ConkySymbols:size=10}g${font} Wi-Fi ID: ${alignr}${wireless_essid wlan0}
${voffset 4}${font ConkySymbols:size=10}b${font} Signal Strength: ${alignr}${color white} ${wireless_link_qual_perc wlan0}%${color}
${else}${if_existing /proc/net/route eth1}
${voffset 4}${font ConkySymbols:size=10}d${font} Total Upload: ${alignr}${color white}${totalup eth1}${color} ${upspeedgraph eth1 8,110}
${voffset 4}${font ConkySymbols:size=10}e${font} Total Download: ${alignr}${color white}${totaldown eth1}${color} ${downspeedgraph eth1 8,110}
${voffset 4}${font ConkySymbols:size=10}I${font} Local IP Address: ${alignr}${addr eth1}
${voffset 4}${font ConkySymbols:size=10}g${font} Wi-Fi ID: ${alignr}${wireless_essid eth1}
${voffset 4}${font ConkySymbols:size=10}b${font} Signal Strength: ${alignr}${color white} ${wireless_link_qual_perc eth1}%${color}
${else}${if_existing /proc/net/route eth0}
${voffset 4}${font ConkySymbols:size=10}d${font} Total Upload: ${alignr}${color white}${totalup eth0}${color} ${upspeedgraph eth0 8,110}
${voffset 4}${font ConkySymbols:size=10}e${font} Total Download: ${alignr}${color white}${totaldown eth0}${color} ${downspeedgraph eth0 8,110}
${voffset 4}${font ConkySymbols:size=10}I${font} Local IP Address: ${alignr}${addr eth0}
${voffset 4}${font ConkySymbols:size=10}g${font} Wi-Fi ID: ${alignr}${wireless_essid eth0}
${voffset 4}${font ConkySymbols:size=10}b${font} Signal Strength: ${alignr}${color white} ${wireless_link_qual_perc eth0}%${color}
${else}No network connection${endif}${endif}${endif}${hr 1}

Just for the record, here are the original wallpaper images I downloaded before I had a go at it myself. You might find these suit your screen size/layout better:-

For that finishing touch, I also installed this theme on my Firefox, which fits in rather nicely with the rest of it:-

No comments:

Post a Comment