Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GNOME 3.10 customisations [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mounty1
Guru
Guru


Joined: 06 Jul 2006
Posts: 544
Location: Queensland

PostPosted: Sat Apr 05, 2014 3:10 am    Post subject: GNOME 3.10 customisations [SOLVED] Reply with quote

Hello, I'm just getting started with GNOME and wondered if it's possible to perform the following customisations to the desktop shell:
  • have the bar show multiple clocks of various time zones, not just one for local.
  • have the bar disappear and only appear when the mouse is moved to the top of the screen.
Thanks. I did try the tweak tool but couldn't see a way.
_________________
Michael Mounteney


Last edited by mounty1 on Sat Apr 05, 2014 11:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
ndan
n00b
n00b


Joined: 13 Sep 2013
Posts: 3

PostPosted: Sat Apr 05, 2014 4:27 am    Post subject: Reply with quote

This extensions will get you there:

multiple clocks: https://extensions.gnome.org/extension/697/panel-world-clock/
top bar https://extensions.gnome.org/extension/545/hide-top-bar/
Back to top
View user's profile Send private message
mounty1
Guru
Guru


Joined: 06 Jul 2006
Posts: 544
Location: Queensland

PostPosted: Sat Apr 05, 2014 6:10 am    Post subject: Reply with quote

Thanks. I managed to get the hide-top-bar thing working but the panel world clock beats me. On the page, there's an on/off slider but no other indication of how to download or install the extension. I do have the gnome shell integration plugin for the browser (Firefox). I would have expected something like a download link or other way of getting the clock onto my computer.

Puuting the slider to on doesn't seem to do anything.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
ndan
n00b
n00b


Joined: 13 Sep 2013
Posts: 3

PostPosted: Sat Apr 05, 2014 10:22 pm    Post subject: Reply with quote

Yup, in "/usr/share/gnome-shell/js/ui/extensionDownloader.js" the download url is different from what "extensions.gnome.org" expects (same url but with another param "version_tag" added at the end).
If you have php installed you can use this script as an alternative to get that/other extension. :)

---or--- download it from https://extensions.gnome.org//download-extension/world_clock@ailin.nemui.shell-extension.zip?version_tag=3585

Code:

#!/usr/bin/php
<?php

if(!isset($argv[1])||!preg_match('/^https:\/\/extensions\.gnome\.org\/extension\//', $argv[1])){
    exit("use: $argv[0] <link to extension's page>\n");
}

$url=$argv[1];
$shell_version="3.10.4";
$html=file_get_contents($url);

if(preg_match('/data-uuid="([^"]+)"/', $html, $match)){
    $uuid=$match[1];
    if(!preg_match('/^[a-z0-9@\._-]+$/i', $uuid)){
        exit("don't like this uuid's chars\n");
    }
    $json_string=file_get_contents("https://extensions.gnome.org/extension-info/?uuid=".urlencode($uuid)."&shell_version=".urlencode($shell_version));
    if(!empty($json_string)){
        $json=json_decode($json_string);
        if($json){
            if(isset($json->download_url)){
                echo "downloading '".$json->name."'\n";
                $extension=file_get_contents("https://extensions.gnome.org/".$json->download_url);
                if(!empty($extension)){
                    if(file_exists($uuid)){
                        echo "deleting old dir..\n";
                        shell_exec("rm -r '$uuid'");
                    }
                    mkdir($uuid);
                    $fp=fopen($uuid."/".$uuid.".zip", "wb");
                    if($fp){
                        fwrite($fp, $extension);
                        fclose($fp);
                        shell_exec("cd '$uuid' && unzip $uuid.zip && rm $uuid.zip");
                        if(file_exists($uuid."/metadata.json") && file_exists($uuid."/extension.js")){
                            echo "extension saved as '$uuid'\n";
                        } else {
                            echo "failed to extract extension\n";
                        }
                        exit;
                    }
                    echo "failed to save file\n";
                } else {
                    echo "can't download..\n";
                }
            } else {
                echo "can't find version for your shell\n";
            }
            print_r($json); // debug
            exit;
        } else {
            echo "failed to decode json (extension info)\n";
        }
    } else {
        echo "failed to get json (extension info)\n";
    }
} else {
    echo "can't find uuid\n";
}

?>
Back to top
View user's profile Send private message
mounty1
Guru
Guru


Joined: 06 Jul 2006
Posts: 544
Location: Queensland

PostPosted: Sat Apr 05, 2014 11:30 pm    Post subject: Reply with quote

Thanks, that works. It would be nice to set the colours differently as I can do with XFCE, but the basic functionality is there.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum