You are not logged in.
I've recently been interested in Swatch Internet Time (or .beat time) and looking in the package manager, I was happy to find a few small applications which display internet time. Thing is, what I'd really like is to have the currant .beat time displayed next to the normal time provided by the time/calendar display which come with BunsenLabs, up in the top right corner of the screen. How (If I can) can I do this?
Alternatively, if I could display it in a conky that would be good too but I'm not sure how to go about doing that either.
(Also, I thought I had posted this before but I must have closed the tab before posting because it's not showing up in my History. I'm sorry if I have indeed posted this twice)
Last edited by Davy (2016-12-31 01:30:46)
Offline
I'd probably start with finding some math to convert epoch (which is time-zone independent I guess) time to swatch. And the results should be easily usable at least in conky.
edit: or from UTC https://en.wikipedia.org/wiki/Swatch_In … om_UTC.2B1
Last edited by brontosaurusrex (2016-10-28 12:32:14)
Offline
Ok. I've found where I would be putting any changes. In the Tint2rc file, there is this:
# Clock
time1_format = %H:%M
time1_font = Sans bold 11
#time2_format = %A %d %B
#time2_font = Sans 6
clock_font_color = #b5b5b5 100
clock_padding = 12 4
clock_background_id = 0
clock_lclick_command = gsimplecal
clock_rclick_command = gsimplecal
So I suppose I just need to do what you said in this file. I'll come back if I figure that out.
Offline
It would seem that all I have to do is Convert the time to .beats and then display it there, but I'm at a loss as to how to do it in this file. Is Tint2rc an xml file? If I knew what language it is I could learn about it, but as it is I'm a little confused
Offline
It would seem that all I have to do is Convert the time to .beats and then display it there, but I'm at a loss as to how to do it in this file. Is Tint2rc an xml file? If I knew what language it is I could learn about it, but as it is I'm a little confused
I don't think you can have two clocks in the tint2 bar, so I think you'd have to choose what clock you wanted, or put one of them in the conky. As for tint2rc, it's a config file, not really a script so it isn't really in a 'language' like python, etc. Think of it as a list of options. You have a list of settings on the left of the equals sign and then the value for that setting on the right. Here's an example:
# Clock
time1_format = %H:%M
Here, the first line, beginning with "#", is not a setting, just a note to say that the following settings relate to the clock item in the tint2 bar. Next we have "time1_format", which is the setting for what to display in the clock item. "%H" stands for hours, and "%M" stands for minutes. Also, between them, we have ":", so the clock will display hours and minutes separated by ":". To change things, change what is on the right hand side of the equals sign.
More info: https://gitlab.com/o9000/tint2/blob/master/doc/tint2.md
Back up your tint2rc file before changing it in case something breaks I find that trial and error works well to begin with when learning configuring tint2, just because the options are so great! The config file for conky works in a sort of similar way, info here: https://github.com/brndnmtthws/conky/wi … n-Settings
Last edited by photonucleon (2016-10-28 13:53:19)
The servant lifted off a kind of ottoman a long peacock-blue drapery, rather of the nature of a domino, on the front of which was emblazoned a large golden sun, and which was splashed here and there with flaming stars and crescents. “You’re to be dressed as Thursday, sir,” said the valet somewhat affably.
Offline
For tint2 you can proably use executor tag, see tint2 docs. You will need latest tint2 for that.
Last edited by brontosaurusrex (2016-10-28 19:51:20)
Offline
Some people also run a second tint2 for specific display formats for launcher, clock, battery monitor etc.
Also included in the tint2 package is the gui config tool, tint2config (IIRC that will make an automatic backup). Anyway, you can have as many *.tint2rc's as you like, and multiple configs can be run at the same time.
Menu -> Help -> Tint2
Last edited by damo (2016-10-28 16:45:48)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
As for tint2rc, it's a config file, not really a script so it isn't really in a 'language' like python, etc. Think of it as a list of options.
Does this mean I can't have any logic or calculations in it? For converting the time from UTC to beat
Offline
Yes. You can set the time format only, as you can see from @photonucleon's link to the Tint2 wiki (which is also in the Menu -> Help -> Tint2 item)
The recent Tint2 has an "exec" feature which may do what you need, but i haven't investigated that yet.
The easiest option might be a small conky window to just display the time in the format you need.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I just had to do a little beats bash script, which has to return the same as this page.
Last edited by brontosaurusrex (2016-10-28 21:50:48)
Offline
This is using Conky v1.10, but the relevant code is the same
${execi 1 ~/.config/conky/scripts/beats.sh}
The conky window sizes are not set, so it resizes to the content.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
And tint2 integration.
Last edited by brontosaurusrex (2016-11-02 10:38:52)
Offline
ah, great. I'll mess around with that script
Offline
Alright - who put this thread in hide mode?
@ Davy - Nice topic!
@ brontosaurusrex - your script ROCKS!!! I added the "@beats" in it so it ends with:
echo "@$beats.beats"
@ damo - new "clock.calendar @beats
----------------
${time %H.%d%n%M.%m%n%S.%y} ${execi 1 /media/5/Conky/scripts/swatch.sh}
----------------
------------------------------
${time @%x @%T} ${execi 1 /media/5/Conky/scripts/swatch.sh}
------------------------------
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I've been messing around trying to call brontosaurus' lovely script from the tint2rc file but when I try use execp it doesn't like it. Said it's not a valid option.
tint2 : invalid option "execp",
upgrade tint2 or correct your config file
tint2 : invalid option "execp_command",
upgrade tint2 or correct your config file
tint2 : invalid option "execp_interval",
upgrade tint2 or correct your config file
Tried re-installing tint2 through the package manager, no joy.
Any idea why it's doing this? My first thought is that since the version of tint2 is so new, it's not in the package manager yet. If so: how can I install it?
Offline
Any idea why it's doing this? My first thought is that since the version of tint2 is so new, it's not in the package manager yet.
Yes, that is correct.
If so: how can I install it?
The current author of tint2 is a forum member here and started a thread introducing the new version:
https://forums.bunsenlabs.org/viewtopic.php?id=1151
To install it, use:
sudo apt install git cmake build-essential libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libgtk2.0-dev libxinerama-dev libx11-dev libxdamage-dev libxcomposite-dev libxrender-dev libxrandr-dev librsvg2-dev libstartup-notification0-dev
mkdir ~/builds/ && cd ~/builds
git clone https://gitlab.com/o9000/tint2.git && cd tint2
git checkout 0.12.12
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
make
sudo make install
The `cmake` line ensures that the new tint2 binary is placed at /usr/local/bin/tint2 -- this will keep the stock tint2 binary intact but will be loaded in preference thanks to the $PATH setting.
Last edited by Head_on_a_Stick (2016-12-30 22:29:22)
Offline
Amazing! I'm over the moon. All set up, just in time for the 999th beat!
I popped this
execp = new
execp_command = bash ~/.config/tint2/beat.sh
execp_interval = 1
execp_font = Sans bold 11
execp_font_color = #b5b5b5 100
in the tint2rc file.
One interesting development is that now that it's ticked over past 1000 it just keeps counting. Running the script from the terminal does the same. Right now it's at 1013. I'll leave it for a while and see what happens. I'd be especially interested to see what happens when it approaches 1000 again.
Offline
@Davy: I'm really sorry but I completely forgot that the newer version of tint2 is available in our own backports repositories :8
https://www.bunsenlabs.org/repoidx.html … orts-tint2
It can be installed from there by first adding the repository:
sudo tee /etc/apt/sources.list.d/bunsen-backports.list <<< "deb http://pkg.bunsenlabs.org/debian jessie-backports main"
Then update the package database and install with backports targeted:
sudo apt update
sudo apt install tint2/jessie-backports
However, you will have to remove the custom binary for the newly installed version to be loaded:
sudo xargs rm < ~/builds/tint2/build/install_manifest.txt
Once more, sorry about the misinformation.
EDIT: be sure to run the `sudo xargs rm` command *before* installing the new version from the BunsenLabs repoositories as the command will delete the package's man pages and suchlike otherwise.
If you have run the `xargs` command after installing the official tint2 backport then simply use `sudo aptitude reinstall tint2` to get the proper files back.
As an aside, this does illustrate rather well why the package manager should always be preferred whenever possible
Last edited by Head_on_a_Stick (2016-12-31 01:13:16)
Offline
No worries. I've done that and it's working grand. It's currently displaying @92 beats: I think the problem with the @beats going over 1000 was to do with daylight saving hours, because during the winter, 0 beats != 12:00 midnight. I'm just guessing this because it fixed itself when it went past one o'clock. I'll try figure out Brontosaurus' script and come up with a fix later, but it doesn't matter too much, because it only affects one hour after midnight and even then (theoretically) only for half the year.
Also, as a side note, thank you very much @Head_on_a_Stick for your help. Looking through my posted threads, you've posted a very helpful response on nearly all of them! I appreciate it.
Offline
UTC shouldn't be affected with DST. Some other bug must be present.
edit: Check the new (hopefully fixed) version, same link.
Last edited by brontosaurusrex (2016-12-31 17:17:56)
Offline