opencode-quotes-plugin 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/package.json +2 -2
- package/quotes.ts +103 -103
- package/tui.tsx +8 -8
package/README.md
CHANGED
package/package.json
CHANGED
package/quotes.ts
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
export const QUOTES = [
|
|
2
2
|
// Work & Diligence
|
|
3
|
-
"There is no substitute for hard work.
|
|
4
|
-
"The heights by great men reached and kept were not attained by sudden flight, but they, while their companions slept, were toiling upward in the night.
|
|
5
|
-
"Opportunity is missed by most people because it is dressed in overalls and looks like work.
|
|
6
|
-
"Genius is one percent inspiration and ninety-nine percent perspiration.
|
|
7
|
-
"Thinking is the hardest work there is, which is probably the reason why so few engage in it.
|
|
8
|
-
"Pleasure in the job puts perfection in the work.
|
|
9
|
-
"Inspiration exists, but it has to find you working.
|
|
10
|
-
"The mechanic, who wishes to do his work well, must first sharpen his tools.
|
|
3
|
+
"There is no substitute for hard work. — Thomas Edison",
|
|
4
|
+
"The heights by great men reached and kept were not attained by sudden flight, but they, while their companions slept, were toiling upward in the night. — Henry Wadsworth Longfellow",
|
|
5
|
+
"Opportunity is missed by most people because it is dressed in overalls and looks like work. — Thomas Edison",
|
|
6
|
+
"Genius is one percent inspiration and ninety-nine percent perspiration. — Disputed",
|
|
7
|
+
"Thinking is the hardest work there is, which is probably the reason why so few engage in it. — Henry Ford",
|
|
8
|
+
"Pleasure in the job puts perfection in the work. — Aristotle",
|
|
9
|
+
"Inspiration exists, but it has to find you working. — Pablo Picasso",
|
|
10
|
+
"The mechanic, who wishes to do his work well, must first sharpen his tools. — Confucius",
|
|
11
11
|
|
|
12
12
|
// Success & Achievement
|
|
13
|
-
"Many of life's failures are people who did not realize how close they were to success when they gave up.
|
|
14
|
-
"Success usually comes to those who are too busy to be looking for it.
|
|
15
|
-
"If you really look closely, most overnight successes took a long time.
|
|
16
|
-
"It is better to fail in originality than to succeed in imitation.
|
|
17
|
-
"Big results require big ambitions.
|
|
18
|
-
"There is nothing impossible to him who will try.
|
|
19
|
-
"Fortune favors the bold.
|
|
13
|
+
"Many of life's failures are people who did not realize how close they were to success when they gave up. — Thomas Edison",
|
|
14
|
+
"Success usually comes to those who are too busy to be looking for it. — Henry David Thoreau",
|
|
15
|
+
"If you really look closely, most overnight successes took a long time. — Steve Jobs",
|
|
16
|
+
"It is better to fail in originality than to succeed in imitation. — Herman Melville",
|
|
17
|
+
"Big results require big ambitions. — Heraclitus",
|
|
18
|
+
"There is nothing impossible to him who will try. — Alexander the Great",
|
|
19
|
+
"Fortune favors the bold. — Virgil",
|
|
20
20
|
|
|
21
21
|
// Perseverance & Resilience
|
|
22
|
-
"Energy and persistence conquer all things.
|
|
23
|
-
"If you can't fly then run, if you can't run then walk, if you can't walk then crawl. But whatever you do, you have to keep moving forward.
|
|
24
|
-
"You just can't beat the person who never gives up.
|
|
25
|
-
"We choose to go to the moon ..., not because they are easy, but because they are hard, ..., because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.
|
|
26
|
-
"Failure is simply the opportunity to begin again, this time more intelligently.
|
|
27
|
-
"The impediment to action advances action. What stands in the way becomes the way.
|
|
28
|
-
"Difficulties strengthen the mind, as labor does the body.
|
|
29
|
-
"It is not because things are difficult that we do not dare; it is because we do not dare that they are difficult.
|
|
30
|
-
"The greater the difficulty, the more glory in surmounting it.
|
|
31
|
-
"Yield not to disasters, but press onward the more bravely.
|
|
32
|
-
"Our greatest glory is not in never falling, but in rising every time we fall.
|
|
33
|
-
"A gem cannot be polished without friction, nor a man perfected without trials.
|
|
34
|
-
"Pearls don't lie on the seashore. If you want one, you must dive for it.
|
|
35
|
-
"That which does not kill us makes us stronger.
|
|
36
|
-
"Vitality shows in not only the ability to persist but the ability to start over.
|
|
37
|
-
"But man is not made for defeat. A man can be destroyed but not defeated.
|
|
38
|
-
"Money grows on the tree of persistence.
|
|
39
|
-
"They can conquer who believe they can.
|
|
40
|
-
"In the depth of winter, I finally learned that within me there lay an invincible summer.
|
|
22
|
+
"Energy and persistence conquer all things. — Benjamin Franklin",
|
|
23
|
+
"If you can't fly then run, if you can't run then walk, if you can't walk then crawl. But whatever you do, you have to keep moving forward. — Martin Luther King Jr.",
|
|
24
|
+
"You just can't beat the person who never gives up. — Babe Ruth",
|
|
25
|
+
"We choose to go to the moon ..., not because they are easy, but because they are hard, ..., because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too. — John F. Kennedy",
|
|
26
|
+
"Failure is simply the opportunity to begin again, this time more intelligently. — Henry Ford",
|
|
27
|
+
"The impediment to action advances action. What stands in the way becomes the way. — Marcus Aurelius",
|
|
28
|
+
"Difficulties strengthen the mind, as labor does the body. — Seneca",
|
|
29
|
+
"It is not because things are difficult that we do not dare; it is because we do not dare that they are difficult. — Seneca",
|
|
30
|
+
"The greater the difficulty, the more glory in surmounting it. — Epicurus",
|
|
31
|
+
"Yield not to disasters, but press onward the more bravely. — Virgil",
|
|
32
|
+
"Our greatest glory is not in never falling, but in rising every time we fall. — Confucius",
|
|
33
|
+
"A gem cannot be polished without friction, nor a man perfected without trials. — Chinese Proverb",
|
|
34
|
+
"Pearls don't lie on the seashore. If you want one, you must dive for it. — Chinese Proverb",
|
|
35
|
+
"That which does not kill us makes us stronger. — Friedrich Nietzsche",
|
|
36
|
+
"Vitality shows in not only the ability to persist but the ability to start over. — F. Scott Fitzgerald",
|
|
37
|
+
"But man is not made for defeat. A man can be destroyed but not defeated. — Ernest Hemingway",
|
|
38
|
+
"Money grows on the tree of persistence. — Japanese Proverb",
|
|
39
|
+
"They can conquer who believe they can. — Virgil",
|
|
40
|
+
"In the depth of winter, I finally learned that within me there lay an invincible summer. — Albert Camus",
|
|
41
41
|
|
|
42
42
|
// Knowledge, Learning, & Wisdom
|
|
43
|
-
"The more you learn, the more you earn.
|
|
44
|
-
"We cannot solve our problems with the same thinking we used when we created them.
|
|
45
|
-
"The man who does not read has no advantage over the man who cannot read.
|
|
46
|
-
"An investment in knowledge pays the best interest.
|
|
47
|
-
"If you want to improve, be content to be thought foolish and stupid.
|
|
48
|
-
"No man was ever wise by chance.
|
|
49
|
-
"The roots of education are bitter, but the fruit is sweet.
|
|
50
|
-
"To know what you know and what you do not know, that is true knowledge.
|
|
51
|
-
"It is not enough to have a good mind; the main thing is to use it well.
|
|
52
|
-
"I am always doing that which I cannot do, in order that I may learn how to do it.
|
|
53
|
-
"I hear and I forget. I see and I remember. I do and I understand.
|
|
54
|
-
"If you would not be forgotten, as soon as you are dead and rotten, either write things worth reading, or do things worth the writing.
|
|
43
|
+
"The more you learn, the more you earn. — Warren Buffett",
|
|
44
|
+
"We cannot solve our problems with the same thinking we used when we created them. — Albert Einstein",
|
|
45
|
+
"The man who does not read has no advantage over the man who cannot read. — Unknown",
|
|
46
|
+
"An investment in knowledge pays the best interest. — Benjamin Franklin",
|
|
47
|
+
"If you want to improve, be content to be thought foolish and stupid. — Epictetus",
|
|
48
|
+
"No man was ever wise by chance. — Seneca",
|
|
49
|
+
"The roots of education are bitter, but the fruit is sweet. — Aristotle",
|
|
50
|
+
"To know what you know and what you do not know, that is true knowledge. — Confucius",
|
|
51
|
+
"It is not enough to have a good mind; the main thing is to use it well. — René Descartes",
|
|
52
|
+
"I am always doing that which I cannot do, in order that I may learn how to do it. — Pablo Picasso",
|
|
53
|
+
"I hear and I forget. I see and I remember. I do and I understand. — Xunzi",
|
|
54
|
+
"If you would not be forgotten, as soon as you are dead and rotten, either write things worth reading, or do things worth the writing. — Benjamin Franklin",
|
|
55
55
|
|
|
56
56
|
// Creation, Design, & Innovation
|
|
57
|
-
"Every act of creation is first an act of destruction.
|
|
58
|
-
"To create something exceptional, your mindset must be relentlessly focused on the smallest detail.
|
|
59
|
-
"Creation is a drug I cannot do without.
|
|
60
|
-
"What we build, builds us.
|
|
61
|
-
"The secret of change is to focus all of your energy, not on fighting the old, but on building the new.
|
|
62
|
-
"Nothing is built on stone; all is built on sand, but we must build as if the sand were stone.
|
|
63
|
-
"Innovation distinguishes between a leader and a follower.
|
|
64
|
-
"Details matter, it's worth waiting to get it right.
|
|
65
|
-
"No great thing is created suddenly.
|
|
66
|
-
"To create is to live twice.
|
|
67
|
-
"By believing passionately in something that still does not exist, we create it.
|
|
68
|
-
"Creativity takes courage.
|
|
69
|
-
"Great things are done by a series of small things brought together.
|
|
57
|
+
"Every act of creation is first an act of destruction. — Pablo Picasso",
|
|
58
|
+
"To create something exceptional, your mindset must be relentlessly focused on the smallest detail. — Giorgio Armani",
|
|
59
|
+
"Creation is a drug I cannot do without. — Cecil B. DeMille",
|
|
60
|
+
"What we build, builds us. — Anonymous",
|
|
61
|
+
"The secret of change is to focus all of your energy, not on fighting the old, but on building the new. — Socrates",
|
|
62
|
+
"Nothing is built on stone; all is built on sand, but we must build as if the sand were stone. — Jorge Luis Borges",
|
|
63
|
+
"Innovation distinguishes between a leader and a follower. — Steve Jobs",
|
|
64
|
+
"Details matter, it's worth waiting to get it right. — Steve Jobs",
|
|
65
|
+
"No great thing is created suddenly. — Epictetus",
|
|
66
|
+
"To create is to live twice. — Albert Camus",
|
|
67
|
+
"By believing passionately in something that still does not exist, we create it. — Nikos Kazantzakis",
|
|
68
|
+
"Creativity takes courage. — Henri Matisse",
|
|
69
|
+
"Great things are done by a series of small things brought together. — Vincent van Gogh",
|
|
70
70
|
|
|
71
71
|
// Action & Execution
|
|
72
|
-
"Action is the foundational key to all success.
|
|
73
|
-
"Knowing is not enough; we must apply. Being willing is not enough; we must do.
|
|
74
|
-
"If a man knows not to which port he sails, no wind is favorable.
|
|
75
|
-
"The beginning is the most important part of the work.
|
|
76
|
-
"A journey of a thousand miles begins with a single step.
|
|
77
|
-
"The best time to plant a tree was 20 years ago. The second best time is now.
|
|
78
|
-
"As you start to walk on the way, the way appears.
|
|
79
|
-
"A path is made by walking on it.
|
|
80
|
-
"Commitment is an act, not a word.
|
|
81
|
-
"You've got to jump off cliffs all the time and build your wings on the way down.
|
|
82
|
-
"The philosophers have only interpreted the world in various ways; the point is to change it.
|
|
83
|
-
"The man who moves a mountain begins by carrying away small stones.
|
|
72
|
+
"Action is the foundational key to all success. — Pablo Picasso",
|
|
73
|
+
"Knowing is not enough; we must apply. Being willing is not enough; we must do. — Johann Wolfgang von Goethe",
|
|
74
|
+
"If a man knows not to which port he sails, no wind is favorable. — Seneca",
|
|
75
|
+
"The beginning is the most important part of the work. — Plato",
|
|
76
|
+
"A journey of a thousand miles begins with a single step. — Lao Tzu",
|
|
77
|
+
"The best time to plant a tree was 20 years ago. The second best time is now. — Chinese Proverb",
|
|
78
|
+
"As you start to walk on the way, the way appears. — Jalal ad-Din Muhammad Rumi",
|
|
79
|
+
"A path is made by walking on it. — Zhuangzi",
|
|
80
|
+
"Commitment is an act, not a word. — Jean-Paul Sartre",
|
|
81
|
+
"You've got to jump off cliffs all the time and build your wings on the way down. — Ray Bradbury",
|
|
82
|
+
"The philosophers have only interpreted the world in various ways; the point is to change it. — Karl Marx",
|
|
83
|
+
"The man who moves a mountain begins by carrying away small stones. — Confucius",
|
|
84
84
|
|
|
85
|
-
// Character & Self
|
|
86
|
-
"The successful warrior is the average man, with laser
|
|
87
|
-
"Quality means doing it right when no one is looking.
|
|
88
|
-
"Waste no more time arguing about what a good man should be. Be one.
|
|
89
|
-
"To conquer oneself is the best and noblest victory.
|
|
90
|
-
"It is folly for a man to pray to the gods for that which he has the power to obtain by himself.
|
|
91
|
-
"Wheresoever you go, go with all your heart.
|
|
92
|
-
"Man is nothing else but what he makes of himself.
|
|
93
|
-
"There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self.
|
|
94
|
-
"It takes something more than intelligence to act intelligently.
|
|
95
|
-
"Courage is knowing what not to fear.
|
|
96
|
-
"We acquire a particular quality by constantly acting in a particular way.
|
|
97
|
-
"He who knows, does not speak. He who speaks, does not know.
|
|
85
|
+
// Character & Self—Mastery
|
|
86
|
+
"The successful warrior is the average man, with laser—like focus. — Bruce Lee",
|
|
87
|
+
"Quality means doing it right when no one is looking. — Henry Ford",
|
|
88
|
+
"Waste no more time arguing about what a good man should be. Be one. — Marcus Aurelius",
|
|
89
|
+
"To conquer oneself is the best and noblest victory. — Plato",
|
|
90
|
+
"It is folly for a man to pray to the gods for that which he has the power to obtain by himself. — Epicurus",
|
|
91
|
+
"Wheresoever you go, go with all your heart. — Confucius",
|
|
92
|
+
"Man is nothing else but what he makes of himself. — Jean-Paul Sartre",
|
|
93
|
+
"There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self. — Disputed",
|
|
94
|
+
"It takes something more than intelligence to act intelligently. — Fyodor Dostoevsky",
|
|
95
|
+
"Courage is knowing what not to fear. — Plato",
|
|
96
|
+
"We acquire a particular quality by constantly acting in a particular way. — Aristotle",
|
|
97
|
+
"He who knows, does not speak. He who speaks, does not know. — Lao Tzu",
|
|
98
98
|
|
|
99
99
|
// Perspective & Philosophy
|
|
100
|
-
"Keep your eyes on the stars, and your feet on the ground.
|
|
101
|
-
"Your time is limited, don't waste it living someone else's life.
|
|
102
|
-
"You have power over your mind
|
|
103
|
-
"Dwell on the beauty of life. Watch the stars, and see yourself running with them.
|
|
104
|
-
"Let each thing you would do, say, or intend, be like that of a dying person.
|
|
105
|
-
"Make the best use of what is in your power, and take the rest as it happens.
|
|
106
|
-
"In the midst of chaos, there is also opportunity.
|
|
107
|
-
"He who would learn to fly one day must first learn to stand and walk and run and climb and dance; one cannot fly into flying.
|
|
108
|
-
"No one can construct for you the bridge upon which precisely you must cross the stream of life, no one but you yourself alone.
|
|
109
|
-
"He who has a why to live for can bear almost any how.
|
|
110
|
-
"Life can only be understood backwards; but it must be lived forwards.
|
|
111
|
-
"Every man takes the limits of his own field of vision for the limits of the world.
|
|
112
|
-
"Only those who will risk going too far can possibly find out how far one can go.
|
|
113
|
-
"Beyond a certain point there is no return. This point has to be reached.
|
|
114
|
-
"You cannot create experience. You must undergo it.
|
|
115
|
-
"Not everything that is faced can be changed, but nothing can be changed until it is faced.
|
|
116
|
-
"Now is no time to think of what you do not have. Think of what you can do with what there is.
|
|
117
|
-
"If you hear a voice within you say 'you cannot paint,' then by all means paint, and that voice will be silenced.
|
|
118
|
-
"I am seeking, I am striving, I am in it with all my heart.
|
|
100
|
+
"Keep your eyes on the stars, and your feet on the ground. — Theodore Roosevelt",
|
|
101
|
+
"Your time is limited, don't waste it living someone else's life. — Steve Jobs",
|
|
102
|
+
"You have power over your mind — not outside events. Realize this, and you will find strength. — Marcus Aurelius",
|
|
103
|
+
"Dwell on the beauty of life. Watch the stars, and see yourself running with them. — Marcus Aurelius",
|
|
104
|
+
"Let each thing you would do, say, or intend, be like that of a dying person. — Marcus Aurelius",
|
|
105
|
+
"Make the best use of what is in your power, and take the rest as it happens. — Epictetus",
|
|
106
|
+
"In the midst of chaos, there is also opportunity. — Sun Tzu",
|
|
107
|
+
"He who would learn to fly one day must first learn to stand and walk and run and climb and dance; one cannot fly into flying. — Friedrich Nietzsche",
|
|
108
|
+
"No one can construct for you the bridge upon which precisely you must cross the stream of life, no one but you yourself alone. — Friedrich Nietzsche",
|
|
109
|
+
"He who has a why to live for can bear almost any how. — Friedrich Nietzsche",
|
|
110
|
+
"Life can only be understood backwards; but it must be lived forwards. — Søren Kierkegaard",
|
|
111
|
+
"Every man takes the limits of his own field of vision for the limits of the world. — Arthur Schopenhauer",
|
|
112
|
+
"Only those who will risk going too far can possibly find out how far one can go. — T.S. Eliot",
|
|
113
|
+
"Beyond a certain point there is no return. This point has to be reached. — Franz Kafka",
|
|
114
|
+
"You cannot create experience. You must undergo it. — Albert Camus",
|
|
115
|
+
"Not everything that is faced can be changed, but nothing can be changed until it is faced. — James Baldwin",
|
|
116
|
+
"Now is no time to think of what you do not have. Think of what you can do with what there is. — Ernest Hemingway",
|
|
117
|
+
"If you hear a voice within you say 'you cannot paint,' then by all means paint, and that voice will be silenced. — Vincent van Gogh",
|
|
118
|
+
"I am seeking, I am striving, I am in it with all my heart. — Vincent van Gogh",
|
|
119
119
|
]
|
package/tui.tsx
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/** @jsxImportSource @opentui/solid */
|
|
2
2
|
|
|
3
3
|
import type { TuiPlugin, TuiPluginModule, TuiThemeCurrent } from "@opencode-ai/plugin/tui"
|
|
4
|
-
import { createMemo,
|
|
4
|
+
import { createMemo, Show } from "solid-js"
|
|
5
5
|
|
|
6
6
|
import { QUOTES } from "./quotes"
|
|
7
7
|
|
|
8
|
-
type Part = { text: string; highlight: boolean }
|
|
9
|
-
|
|
10
8
|
function Tips(props: { theme: TuiThemeCurrent }) {
|
|
11
9
|
const quote = QUOTES[Math.floor(Math.random() * QUOTES.length)]!;
|
|
12
|
-
const split = quote.split("
|
|
10
|
+
const split = quote.split("—"); // NOTE: Emdash; regular dashes are for names.
|
|
13
11
|
const author = split.at(-1)?.trim();
|
|
14
|
-
const text = split.slice(0, -1).join("
|
|
12
|
+
const text = split.slice(0, -1).join("—").trim();
|
|
15
13
|
if (author === undefined || text === undefined) {
|
|
16
14
|
throw new Error(`Error: Malformed quote ${quote}.`)
|
|
17
15
|
}
|
|
@@ -20,9 +18,11 @@ function Tips(props: { theme: TuiThemeCurrent }) {
|
|
|
20
18
|
<box maxWidth="100%" flexDirection="column" paddingX={6}>
|
|
21
19
|
<text alignItems="center" style={{ fg: props.theme.text }}>
|
|
22
20
|
{text}
|
|
23
|
-
<br/>
|
|
24
21
|
</text>
|
|
25
|
-
<text
|
|
22
|
+
<text
|
|
23
|
+
alignSelf={text.length < 40 ? "center" : "flex-end"}
|
|
24
|
+
style={{ fg: props.theme.primary }}
|
|
25
|
+
>
|
|
26
26
|
- {author}
|
|
27
27
|
</text>
|
|
28
28
|
</box>
|
|
@@ -31,7 +31,7 @@ function Tips(props: { theme: TuiThemeCurrent }) {
|
|
|
31
31
|
|
|
32
32
|
function View(props: { show: boolean; theme: TuiThemeCurrent }) {
|
|
33
33
|
return (
|
|
34
|
-
<box minHeight={0} width="100%" maxWidth={75} alignItems="center" paddingTop={
|
|
34
|
+
<box minHeight={0} width="100%" maxWidth={75} alignItems="center" paddingTop={2} flexShrink={1}>
|
|
35
35
|
<Show when={props.show}>
|
|
36
36
|
<Tips theme={props.theme} />
|
|
37
37
|
</Show>
|