Skip to content

Instantly share code, notes, and snippets.

@igkuz
Created July 30, 2013 16:17
Show Gist options
  • Select an option

  • Save igkuz/6114432 to your computer and use it in GitHub Desktop.

Select an option

Save igkuz/6114432 to your computer and use it in GitHub Desktop.
//SFKJS
const Clutter = imports.gi.Clutter;
var white = new Clutter.Color();
white.from_string('white');
var currentDate = function() {
var currentdate = new Date();
return currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds();
}
var text = new Clutter.Text({
text: currentDate(),
font_name: 'Sans 36',
x: 400,
y: 550,
color: white
});
timeline = new Clutter.Timeline({
duration: 1000,
loop: true,
auto_reverse: true
});
timeline.on_timeline_new_frame = function(timeline, frame_num) {
text.text = currentDate();
return true;
}
root.add_actor(text)
timeline.connect('new-frame', timeline.on_timeline_new_frame);
nptv_run_timeline(timeline);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment