Comments (3)
About just the rain working. It's my bad, just replace all the void toggleNoise(appData * app, int noise)
function at util.c by this:
void toggleNoise(appData * app, int noise){
if(noise == 1){
if(app->playRainNoise == 0){
app->playRainNoise = 1;
if(app->runRainOnce == 0){
char * rainnoisecmd[] = {
"/usr/local/share/tomato/sounds/ambience-rain.wav",
app->rainVolume, "tomato noise rain",
NULL};
app->rainNoisePID = fork();
app->runRainOnce = 1;
if(app->rainNoisePID == 0)
execv(TOMATONOISE, rainnoisecmd);
}
else{
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_rain_state", "w");
fprintf(tmpfile, "%s ON", app->rainVolume);
fclose(tmpfile);
}
}
else if(app->playRainNoise == 1){
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_rain_state", "w");
fprintf(tmpfile, "%s ON", "0");
fclose(tmpfile);
app->playRainNoise = 0;
}
}
else if(noise == 2){
if(app->playFireNoise == 0){
app->playFireNoise = 1;
if(app->runFireOnce == 0){
char * firenoisecmd[] = {
"/usr/local/share/tomato/sounds/ambience-fire.wav",
app->fireVolume, "tomato noise fire",
NULL};
app->fireNoisePID = fork();
app->runFireOnce = 1;
if(app->fireNoisePID == 0)
execv(TOMATONOISE, firenoisecmd);
}
else{
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_fire_state", "w");
fprintf(tmpfile, "%s ON", app->fireVolume);
fclose(tmpfile);
}
}
else if(app->playFireNoise == 1){
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_fire_state", "w");
fprintf(tmpfile, "%s ON", "0");
fclose(tmpfile);
app->playFireNoise = 0;
}
}
else if(noise == 3){
if(app->playWindNoise == 0){
app->playWindNoise = 1;
if(app->runWindOnce == 0){
char * windnoisecmd[] = {
"/usr/local/share/tomato/sounds/ambience-wind.wav",
app->windVolume, "tomato noise wind",
NULL};
app->windNoisePID = fork();
app->runWindOnce = 1;
if(app->windNoisePID == 0)
execv(TOMATONOISE, windnoisecmd);
}
else{
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_wind_state", "w");
fprintf(tmpfile, "%s ON", app->windVolume);
fclose(tmpfile);
}
}
else if(app->playWindNoise == 1){
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_wind_state", "w");
fprintf(tmpfile, "%s ON", "0");
fclose(tmpfile);
app->playWindNoise = 0;
}
}
else if(noise == 4){
if(app->playThunderNoise == 0){
app->playThunderNoise = 1;
if(app->runThunderOnce == 0){
char * thundernoisecmd[] = {
"/usr/local/share/tomato/sounds/ambience-thunder.wav",
app->thunderVolume, "tomato noise thunder",
NULL};
app->thunderNoisePID = fork();
app->runThunderOnce = 1;
if(app->thunderNoisePID == 0)
execv(TOMATONOISE, thundernoisecmd);
}
else{
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_thunder_state", "w");
fprintf(tmpfile, "%s ON", app->thunderVolume);
fclose(tmpfile);
}
}
else if(app->playThunderNoise == 1){
FILE *tmpfile;
tmpfile = fopen("/tmp/tomato_thunder_state", "w");
fprintf(tmpfile, "%s ON", "0");
fclose(tmpfile);
app->playThunderNoise = 0;
}
}
}
and replace this part at tomatonoise.c:
char line[25];
int save;
FILE *tmpfile;
- tmpfile = fopen(tmppath, "r");
- if(tmpfile){
- tmpfile = fopen(tmppath, "w");
- fprintf(tmpfile, "%s", volume);
- fclose(tmpfile);
- }
- else{
- tmpfile = fopen(tmppath, "w");
- fprintf(tmpfile, "%s", volume);
- fclose(tmpfile);
- }
+ tmpfile = fopen(tmppath, "w");
+ fprintf(tmpfile, "%s ON", volume);
+ fclose(tmpfile);
// Done setting up options.
mpvCheckError(mpv_initialize(mpvCtx));
It's my bad, I pushed the paths to the files in debug mode :(
Now, about the icons, i don't really know why this happen. Try using just icons on and return me a screenshot, so I know if is just the nerdicons or just the text itself! Maybe the fix of the files path just fix the icons too, but give me feedback.
from tomato.c.
This did fix the noise issue! However, the icon issue still persists.
I'm not sure what you mean by this:
Now, about the icons, i don't really know why this happen. Try using just icons on and return me a screenshot, so I know if is just the nerdicons or just the text itself! Maybe the fix of the files path just fix the icons too, but give me feedback.
Thank you so much for the help! I truly love the project.
Edit: As for the icons I believe it may be on my end, I'm experimenting with what icons will display in my terminal.
from tomato.c.
You need to place the font at your terminal config or xresources and about that:
Now, about the icons, i don't really know why this happen. Try using just icons on and return me a screenshot, so I know if is just the nerdicons or just the text itself! Maybe the fix of the files path just fix the icons too, but give me feedback.
I was talking about editing the config.h and using "iconson" at ICONS, and send me a screenshot.
static const char * ICONS = "iconson";
from tomato.c.
Related Issues (20)
- can't go 75+15 method HOT 3
- Feature request - disable autostart HOT 2
- Compilation issues with mpv and ncurses HOT 4
- Timer not run when opening notepad HOT 3
- ALT+NUM = ESC HOT 3
- How to install on Windows without WSL HOT 1
- Feature to skip pause, break, and pomodoro HOT 2
- [Solved] Unable to compile on Debian 12; can't find <mpv/client.h> HOT 15
- Some icons are not being displayed HOT 4
- Unreadable text HOT 1
- Is there able to use brew to install mpv and libmpv? HOT 10
- I'm not able to see the notebook or to add a note/task HOT 9
- The notebook doesn't open while the Pomodoro is paused HOT 3
- Notes with more than one word do not remain after the app closes HOT 2
- icon's of output HOT 2
- history of hours studied in the day/month/year HOT 2
- Strange behavior after starting a new Pomodoro cycle after another already completed HOT 2
- Freezes on Start in i3wm on Arch Linux HOT 19
- Compilation terminated HOT 3
- Notification doesn't sound and tomatonoise high cpu usage HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomato.c.