How to display custom formatted clock in top bar on multiple displays in Ubuntu 18.04?











up vote
1
down vote

favorite
1












I have a pretty specific problem, that I have had no luck trying to find a working solution to. I have a laptop running Ubuntu 18.04 docked using 2 external monitors resulting in 3 screens. I want to have my top bar on all 3 screens to easily look up on the current screen to see the time. I enable this using the Multi Monitors Add-On Gnome extension. I am running Ubuntu in English, but set to Swedish formats. This makes for a very ugly and incorrect date format in the top bar.



Image of top bar clock



This is pretty much English format with Swedish names for days and months. On a side note, this localization "bug" has been fixed and is ready for an upcoming gnome release.



My main issue is that I want to change the format of the date displayed to something like:



Image of desired format



I can easily get this format using any of the many clock formatting Gnome extensions (Clock Override, Datetime Format). However, none of these extensions work with my Multi Monitors Add-On, leaving me with a nicely formatted clock on the main monitor, but ugly formatted clocks on the other two screens. I have tried getting the developers of these addons to collaborate, but apparently dependencies between gnome extensions is "hell".



I have also tried editing the locale files directly, both the en_US and sv_SE. Specifically the LC_TIME d_t_fmt format for date and time strings, but this seems to have no impact on the clock format.



In a last attempt I also unpacked the libgnome-shell.so file located in /usr/lib/gnome-shell/ to try and edit the JavaScript files used to display the clock, using this answer. I had a look in dateMenu.js and calendar.js and changed most of the format strings that I could find to my desired format %Y-%m-%d. I then ran GNOME_SHELL_JS=$HOME/gnome-shell-js gnome-shell --replace, but again it seemed to have no effect. To be fair, I am in deep waters here and could definitely have failed in my attempts. As such, the solution could still be in this method.



Have anyone had any experience with a situation like this? Changing the format of date and time displayed on multiple monitors using Ubuntu 18.04? Feel free to try what I have tried already as I can certainly have missed something that could have made it work.










share|improve this question
























  • I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
    – Skillzore
    Nov 27 at 9:09















up vote
1
down vote

favorite
1












I have a pretty specific problem, that I have had no luck trying to find a working solution to. I have a laptop running Ubuntu 18.04 docked using 2 external monitors resulting in 3 screens. I want to have my top bar on all 3 screens to easily look up on the current screen to see the time. I enable this using the Multi Monitors Add-On Gnome extension. I am running Ubuntu in English, but set to Swedish formats. This makes for a very ugly and incorrect date format in the top bar.



Image of top bar clock



This is pretty much English format with Swedish names for days and months. On a side note, this localization "bug" has been fixed and is ready for an upcoming gnome release.



My main issue is that I want to change the format of the date displayed to something like:



Image of desired format



I can easily get this format using any of the many clock formatting Gnome extensions (Clock Override, Datetime Format). However, none of these extensions work with my Multi Monitors Add-On, leaving me with a nicely formatted clock on the main monitor, but ugly formatted clocks on the other two screens. I have tried getting the developers of these addons to collaborate, but apparently dependencies between gnome extensions is "hell".



I have also tried editing the locale files directly, both the en_US and sv_SE. Specifically the LC_TIME d_t_fmt format for date and time strings, but this seems to have no impact on the clock format.



In a last attempt I also unpacked the libgnome-shell.so file located in /usr/lib/gnome-shell/ to try and edit the JavaScript files used to display the clock, using this answer. I had a look in dateMenu.js and calendar.js and changed most of the format strings that I could find to my desired format %Y-%m-%d. I then ran GNOME_SHELL_JS=$HOME/gnome-shell-js gnome-shell --replace, but again it seemed to have no effect. To be fair, I am in deep waters here and could definitely have failed in my attempts. As such, the solution could still be in this method.



Have anyone had any experience with a situation like this? Changing the format of date and time displayed on multiple monitors using Ubuntu 18.04? Feel free to try what I have tried already as I can certainly have missed something that could have made it work.










share|improve this question
























  • I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
    – Skillzore
    Nov 27 at 9:09













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have a pretty specific problem, that I have had no luck trying to find a working solution to. I have a laptop running Ubuntu 18.04 docked using 2 external monitors resulting in 3 screens. I want to have my top bar on all 3 screens to easily look up on the current screen to see the time. I enable this using the Multi Monitors Add-On Gnome extension. I am running Ubuntu in English, but set to Swedish formats. This makes for a very ugly and incorrect date format in the top bar.



Image of top bar clock



This is pretty much English format with Swedish names for days and months. On a side note, this localization "bug" has been fixed and is ready for an upcoming gnome release.



My main issue is that I want to change the format of the date displayed to something like:



Image of desired format



I can easily get this format using any of the many clock formatting Gnome extensions (Clock Override, Datetime Format). However, none of these extensions work with my Multi Monitors Add-On, leaving me with a nicely formatted clock on the main monitor, but ugly formatted clocks on the other two screens. I have tried getting the developers of these addons to collaborate, but apparently dependencies between gnome extensions is "hell".



I have also tried editing the locale files directly, both the en_US and sv_SE. Specifically the LC_TIME d_t_fmt format for date and time strings, but this seems to have no impact on the clock format.



In a last attempt I also unpacked the libgnome-shell.so file located in /usr/lib/gnome-shell/ to try and edit the JavaScript files used to display the clock, using this answer. I had a look in dateMenu.js and calendar.js and changed most of the format strings that I could find to my desired format %Y-%m-%d. I then ran GNOME_SHELL_JS=$HOME/gnome-shell-js gnome-shell --replace, but again it seemed to have no effect. To be fair, I am in deep waters here and could definitely have failed in my attempts. As such, the solution could still be in this method.



Have anyone had any experience with a situation like this? Changing the format of date and time displayed on multiple monitors using Ubuntu 18.04? Feel free to try what I have tried already as I can certainly have missed something that could have made it work.










share|improve this question















I have a pretty specific problem, that I have had no luck trying to find a working solution to. I have a laptop running Ubuntu 18.04 docked using 2 external monitors resulting in 3 screens. I want to have my top bar on all 3 screens to easily look up on the current screen to see the time. I enable this using the Multi Monitors Add-On Gnome extension. I am running Ubuntu in English, but set to Swedish formats. This makes for a very ugly and incorrect date format in the top bar.



Image of top bar clock



This is pretty much English format with Swedish names for days and months. On a side note, this localization "bug" has been fixed and is ready for an upcoming gnome release.



My main issue is that I want to change the format of the date displayed to something like:



Image of desired format



I can easily get this format using any of the many clock formatting Gnome extensions (Clock Override, Datetime Format). However, none of these extensions work with my Multi Monitors Add-On, leaving me with a nicely formatted clock on the main monitor, but ugly formatted clocks on the other two screens. I have tried getting the developers of these addons to collaborate, but apparently dependencies between gnome extensions is "hell".



I have also tried editing the locale files directly, both the en_US and sv_SE. Specifically the LC_TIME d_t_fmt format for date and time strings, but this seems to have no impact on the clock format.



In a last attempt I also unpacked the libgnome-shell.so file located in /usr/lib/gnome-shell/ to try and edit the JavaScript files used to display the clock, using this answer. I had a look in dateMenu.js and calendar.js and changed most of the format strings that I could find to my desired format %Y-%m-%d. I then ran GNOME_SHELL_JS=$HOME/gnome-shell-js gnome-shell --replace, but again it seemed to have no effect. To be fair, I am in deep waters here and could definitely have failed in my attempts. As such, the solution could still be in this method.



Have anyone had any experience with a situation like this? Changing the format of date and time displayed on multiple monitors using Ubuntu 18.04? Feel free to try what I have tried already as I can certainly have missed something that could have made it work.







multiple-monitors gnome-shell time clock top-bar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 3 at 7:05

























asked Nov 26 at 15:14









Skillzore

134




134












  • I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
    – Skillzore
    Nov 27 at 9:09


















  • I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
    – Skillzore
    Nov 27 at 9:09
















I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
– Skillzore
Nov 27 at 9:09




I now believe the solution could be in editing the dateMenu.js file in libgnome-shell.so since the Clock Override extension seem to be overriding some of dateMenu's children during runtime. I will try to look into this more, but help would be appreciated since my gnome-shell and JavaScript skills are somewhat subpar.
– Skillzore
Nov 27 at 9:09















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096203%2fhow-to-display-custom-formatted-clock-in-top-bar-on-multiple-displays-in-ubuntu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096203%2fhow-to-display-custom-formatted-clock-in-top-bar-on-multiple-displays-in-ubuntu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents