Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
7nik committed Jul 14, 2024
0 parents commit 1e29b25
Show file tree
Hide file tree
Showing 130 changed files with 1,124 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Booru Clock
<img src="./plaismoid-example.gif" alt="example" width="300"/>

A desktop clock with the booru's girls holding digits.

Has the following implementation:
* [Window Gadget](./win7gadget/)
* static images only
* flip-flopping is optional
* [Rainmeter](./rainmeter/)
* animated images only
* no flip-flopping
* [Plasmoid (KDE Plasma)](./plasmoid/)
* 4 girls themes
* flip-flopping is optional

In all implementations, seconds are optional and opacity is customizable.

Implementations are different due to the platform limitations and being created in very different years.
Binary file added plaismoid-example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plaismoid-example.mp4
Binary file not shown.
16 changes: 16 additions & 0 deletions plasmoid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# KDE Plasmoid Booru Clock
A plasmoid/gadget/applet with the booru's girls holding digits.

Has the following settings:
* Showing seconds
* Disabling flip-flopping
* Girls style (taken from [Moe-Counter](https://github.com/journey-ad/Moe-Counter)):
* asoul
* gelbooru
* moebooru
* rule34 (animated)
* Opacity

# Installation

Install a Linux with KDE :D
11 changes: 11 additions & 0 deletions plasmoid/package/contents/config/config.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import QtQuick 2.15

import org.kde.plasma.configuration

ConfigModel {
ConfigCategory {
name: i18nc("@title", "Apperance")
icon: "preference-desktop-colo"
source: "configAppearance.qml"
}
}
22 changes: 22 additions & 0 deletions plasmoid/package/contents/config/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"
>
<kcfgfile name=""/>

<group name="Appearance">
<entry name="showSeconds" type="Bool">
<default>true</default>
</entry>
<entry name="doFlip" type="Bool">
<default>true</default>
</entry>
<entry name="theme" type="String">
<default>rule34</default>
</entry>
<entry name="opacity" type="Double">
<default>1</default>
</entry>
</group>
</kcfg>
Binary file added plasmoid/package/contents/image/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/7.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/asoul/9.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/moebooru/1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plasmoid/package/contents/image/digit/moebooru/3.gif
Binary file added plasmoid/package/contents/image/lower/0.png
Binary file added plasmoid/package/contents/image/lower/1.png
Binary file added plasmoid/package/contents/image/lower/2.png
Binary file added plasmoid/package/contents/image/lower/3.png
Binary file added plasmoid/package/contents/image/lower/4.png
Binary file added plasmoid/package/contents/image/lower/5.png
Binary file added plasmoid/package/contents/image/lower/6.png
Binary file added plasmoid/package/contents/image/lower/7.png
Binary file added plasmoid/package/contents/image/lower/8.png
Binary file added plasmoid/package/contents/image/lower/9.png
Binary file added plasmoid/package/contents/image/upper/0.png
Binary file added plasmoid/package/contents/image/upper/1.png
Binary file added plasmoid/package/contents/image/upper/2.png
Binary file added plasmoid/package/contents/image/upper/3.png
Binary file added plasmoid/package/contents/image/upper/4.png
Binary file added plasmoid/package/contents/image/upper/5.png
Binary file added plasmoid/package/contents/image/upper/6.png
Binary file added plasmoid/package/contents/image/upper/7.png
Binary file added plasmoid/package/contents/image/upper/8.png
Binary file added plasmoid/package/contents/image/upper/9.png
116 changes: 116 additions & 0 deletions plasmoid/package/contents/ui/Digit.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import QtQuick 2.15
import org.kde.plasma.plasmoid

Item {
id: container
property int digit
property real speed
property int prevDigit: digit
property real upperHeight: 0
property real lowerHeight: 0
property int duration: Plasmoid.configuration.doFlip ? 400 : 0
property string theme: Plasmoid.configuration.theme

Behavior on digit {
SequentialAnimation {
ScriptAction { script: lowerHeight = 0 }
NumberAnimation {
target: container
property: "upperHeight"
from: 0; to: 0.5
duration: container.duration/2
}
NumberAnimation {
target: container
property: "lowerHeight"
from: 0; to: 0.5
duration: container.duration/2
}
ScriptAction { script: prevDigit = digit }
}
}
// upper
Item {
anchors {
top: parent.top
left: parent.left
}
width: container.width
height: container.height * upperHeight
clip: true
AnimatedImage {
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
width: container.width * 0.9
height: container.height
source: "../image/digit/"+theme+"/"+digit+".gif"
speed: container.speed
smooth: false
}
}
Item {
anchors {
top: parent.top
left: parent.left
topMargin: container.height * upperHeight
}
width: container.width
height: container.height * (0.5-upperHeight)
clip: true
AnimatedImage {
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
width: container.width * 0.9
height: container.height * 2*(0.5-upperHeight)
source: "../image/digit/"+theme+"/"+prevDigit+".gif"
speed: container.speed
smooth: false
}
}
// bottom
Item {
anchors {
top: parent.top
left: parent.left
topMargin: parent.height/2
}
width: container.width
height: container.height * lowerHeight
clip: true
AnimatedImage {
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
width: container.width * 0.9
height: container.height * 2*lowerHeight
source: "../image/digit/"+theme+"/"+digit+".gif"
speed: container.speed
smooth: false
}
}
Item {
anchors {
bottom: parent.bottom
left: parent.left
}
width: container.width
height: container.height * (0.5-lowerHeight)
clip: true
AnimatedImage {
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
width: container.width * 0.9
height: container.height
source: "../image/digit/"+theme+"/"+prevDigit+".gif"
speed: container.speed
smooth: false
}
}
}
43 changes: 43 additions & 0 deletions plasmoid/package/contents/ui/Tile.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import QtQuick 2.15
import QtQuick.Layouts

Item {
property int number
property real speed
property int margin: parent.height/40

Layout.minimumHeight: 50
Layout.minimumWidth: 50
Layout.fillHeight: true
implicitWidth: height

Image {
anchors.fill: parent
source: "../image/back.png"
smooth: false
}
Digit {
anchors {
top: parent.top
left: parent.left
bottom: parent.bottom
margins: margin
rightMargin: 0
}
width: parent.width/2
digit: Math.floor(number/10)
speed: parent.speed-0.25
}
Digit {
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
margins: margin
leftMargin: 0
}
width: parent.width/2
digit: number%10
speed: parent.speed
}
}
54 changes: 54 additions & 0 deletions plasmoid/package/contents/ui/configAppearance.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import QtQuick 2.15
import QtCore
import QtQuick.Controls as QtControls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami

Kirigami.FormLayout {
property alias cfg_showSeconds: showSecondsCheckBox.checked
property alias cfg_doFlip: doFlipCheckBox.checked
property alias cfg_opacity: opacitySlider.value
property string cfg_theme

property var cfg_showSecondsDefault
property var cfg_doFlipDefault
property var cfg_themeDefault
property var cfg_opacityDefault

property var themes: ["asoul", "gelbooru", "moebooru", "rule34"]

Kirigami.FormLayout {
RowLayout {
QtControls.CheckBox {
id: showSecondsCheckBox
text: i18n("Show seconds")
}
}
RowLayout {
QtControls.CheckBox {
id: doFlipCheckBox
text: i18n("Flip the digits")
}
}
RowLayout {
QtControls.Label {
text: i18n("Digits theme:")
}
QtControls.ComboBox {
id: themeComboBox
model: themes
currentIndex: themes.indexOf(cfg_theme)
onCurrentIndexChanged: cfg_theme = themes[themeComboBox.currentIndex]
}
}
RowLayout {
Kirigami.FormData.label: i18n("Widget opacity:")
QtControls.Slider {
id: opacitySlider
}
QtControls.Label {
text: Math.round(opacitySlider.value*100).toString()
}
}
}
}
51 changes: 51 additions & 0 deletions plasmoid/package/contents/ui/main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import QtQuick 2.0
import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasma5support as Plasma5Support
import org.kde.plasma.plasmoid

PlasmoidItem {
id: root

preferredRepresentation: fullRepresentation

Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
Layout.minimumHeight: 50
Layout.preferredHeight: 165
property real ratio: 3+2/30
implicitWidth: height*ratio
implicitHeight: width/ratio

Plasma5Support.DataSource {
id: timeSource
engine: "time"
connectedSources: ["Local"]
interval: 1000
}

fullRepresentation: RowLayout {
height: root.height
implicitWidth: height*ratio
opacity: Plasmoid.configuration.opacity
layer.enabled: true // apply opacity to the layout but not items (images)

Tile {
id: hours
number: timeSource.data.Local.DateTime.getHours()
speed: 0.8
}
Tile {
id: minutes
number: timeSource.data.Local.DateTime.getMinutes()
speed: 0.95
}
Tile {
id: seconds
number: timeSource.data.Local.DateTime.getSeconds()
speed: 1
visible: Plasmoid.configuration.showSeconds
enabled: Plasmoid.configuration.showSeconds
}
}

}
19 changes: 19 additions & 0 deletions plasmoid/package/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"KPlugin": {
"Authors": [
{
"Email": "kifiranet@gmail.com",
"Name": "7nik"
}
],
"Category": "Date and Time",
"Description": "A flip-flop clock with booru digits (girls)",
"Icon": "clock",
"Id": "com.github.7nik.booru-clock",
"Name": "Booru Clock",
"Version": "1.0",
"Website": "https://github.com/7nik/booru-clock"
},
"X-Plasma-API-Minimum-Version": "6.0",
"KPackageStructure": "Plasma/Applet"
}
Loading

0 comments on commit 1e29b25

Please sign in to comment.