Home Linux Blog Memories Me About ?

Dear My
Linux

ARCHIVES_CATS Desktop

World clock in awesome


awesome systray
Awesome systray

For displaying multiple clock in awesome with different timezones we need to create new clock widgets, this post is based on awesome 4.2, you will need to create a new widgets in ~./config/awesome with the following code: utc.lua

It has just two differences with the original textclock.lua widget, here the diff output from these two files:


35c35
<     format = format or " UTC:  %H:%M || "
---
>     format = format or " %d local: %H:%M "
37c37
<    timezone = timezone or TimeZone.new("Z")
---
>    timezone = timezone and TimeZone.new(timezone) or TimeZone.new_local()

I'm not a programmer, but I read the programmer Documentation and modified the code accordingly, I only was able to understand that the parameters after the OR operand was true and I don't know why, but my code works.

Its important to notice that you have to specify the timezone name in the format variable in order to show the clock's name, check the bold text in the diff output above.

The most important thing to do is to replace the Z in the TimeZone.new("Z") function, Z is the UTC timezone, in the case of Argentina the timezone would be: TimeZone.new("America/Buenos_Aires")

Then edit your ~/.config/rc.lua file and search for this string:

mytextclock = wibox.widget.textclock()

In order to use the widget we have to pass the function into a variable, so if we have the Argentina and UTC clocks besides the local one, it will look like this:


mytextclock2 = textclock2()
utc= utc()
mytextclock = wibox.widget.textclock()

Finally search for the widgets wibox session and add the declared variables there:


-- Add widgets to the wibox
    s.mywibox:setup {
        layout = wibox.layout.align.horizontal,
        { -- Left widgets
            layout = wibox.layout.fixed.horizontal,
            mylauncher,
            s.mytaglist,
            s.mypromptbox,
        },
        s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            mykeyboardlayout,
            wibox.widget.systray(),
	   utc,
            mytextclock,
            mytextclock2,
            s.mylayoutbox,
        },
    }

Installing Conky in Qubes OS 4.0


Qubes Os Screenshot

This is a bad thing to do, but the easiest way to install Conky in Qubes OS is using the RPM packages of Fedora 24.

First you need to download the following packages:

  • giflib-4.1.6-15.fc24.x86_64
  • imlib2-1.4.9-1.fc25.x86_64
  • iw-4.1-2.fc24.x86_64
  • crda-3.18_2016.02.08-1.fc24.x86_64
  • wireless-tools-29-14.1.fc24.x86_64
  • tolua++-1.0.93-18.fc24.x86_64
  • conky-1.10.4-1.fc25.x86_64

Then install all them, they are in the installed order, the packages highlighted with bold letters are the main dependencies for installing conky

You can install all of them using

rpm -i *

Install Screenlets in Fedora


Screenlets is pretty easy to install in Ubuntu, however, in Fedora is not that easy if you don't know the right name of the libraries.

And to tell you the truth, the most obfuscated name is pyobject that sometimes is named as python-gir or just gir.

1. First download the Screenlets here https://launchpad.net/screenlets/+download

2. Install it with: sudo make install

3. Install the depedences

dnf install pygtk2 python-dbus python-Beautiful libwnck3 python3-pytz pygobject3 python2-numpy gnome-python2-gconf gnome-python2-rsvg gnome-python2-libwnck

4. Edit /usr/share/screenlets-manager/screenlets-manager.py and /usr/share/screenlets-manager/screenlets-daemon.py if screenlets complains about missing icons, there you will comment out the lines that source that icons.

Finally don't forget to use a windows compositor if you are running Openbox, LXDE or an standalone windows manager. In XFCE you have to enable in the Window options. I just run: xcompmgr


Rss feed of the category