-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crontab not found #1
Comments
I forgot this project existed 😛 . Will fix issues and update it in a few days.
I'll update it so in the future you can do
Can be done if I implement an option to play custom audio file like |
Okay great thanks! 😎 I can share some nice audio for the battery notification. Also being able to set notifications at different % values could help EG every 5 or 10% This way if you miss the first notification you can catch the next… Alternatively the notification can repeat until the PC is unplugged or plugged |
fixed in latest update. |
🙏 Thanks, I will test tonight! |
Okay, so I use Fedora Kionite and it has an immutable/read only filesystem, so it can't install to the default location, soI had to change all the Then I ran:
One file, battery-notify had been created at my ser home directory
I also tried cd to the install folder in my home directory but it didn't work (No such file or directory) So I tried to uninstall and change my directory to the same directory that git clone had created: But that didn't work either with the same errors: install.sh: line 54: battery-notify: command not found Perhaps there's another equivalent directory to user/bin I'm meant to use? Just found this: On Fedora Silverblue, the root filesystem is immutable. This means that /, /usr and everything below it is read-only. /var is where all of Fedora Silverblue’s runtime state is stored. Symlinks are used to make traditional state-carrying directories available in their expected locations. This includes:
This means that separate home partitions should be mounted on /var/home. |
So ran the uninstall proceedure, then I tried a find and replace on all the Git cloned files to replace: Here was the result:
So I ran the uninstall procedure and I await your advice if possible please. Here is another shell script that allowed installations on Kionite, maybe there's something to glean from it: |
Alright I will look into it tomorrow and test on fedora kionite and silverblue. |
Thanks hey, If it makes your life easier you could advise which path to use and I could test for you. |
What do you think? |
Okay so I did test it, but haven't got time to push an update yet. So here's what you can do manually for the time being.
|
🙏 Thanks, I'll test if I get time this week otherwise I look forward to the update and I'll share with people if you think it's ready |
Maybe this weekend? |
This is what I have in the batterynotify.service file before install : Is that correct? Cos I still see this when I install:
One file 'battery-notify' is created at /var/usrlocal/bin/ I then did the following:
So I'm not sure what's wrong cos the file is there... |
So I uninstalled and... According to this script, I changed the install dir to: "var/lib/battery_notifier" I also changed the line in the uninstall sh to: Then reinstalled:
Same errors as before and also only 1 file created at the directory I also tested an install by making the .service file line: |
I also noticed the uninstall didn't remove: var/lib/battery_notifier/battery-notify or /etc/systemd/system/battery-notify.service and 'battery-notify.service' was registering as a 'D-bus service file' and not a 'systemd unit file' like the others. |
Please try my install script: https://gist.github.com/WinkelCode/168028a9e20baa4393a60791cdb7e4b9 |
Wow thanks so much, I'll try it in a moment! |
Okay I've installed it and still waiting to see if it works but thought I'd share the setup steps for future users: see issue: #1
OK: Installed battery-notify
First Available options Usage
|
A few notes:
Edit:
|
Thanks Unfortunately it seems to not notify me at all, but maybe the service isn't running, I will try restart. |
It just came to me that I totally forgot to fix the path for the service. That's why it doesn't work. I'll update the script |
Please try the new version (revision 8), it should work now. I also added output for the uninstall process steps and made it so it only checks for the "required files" when installing. Edit: (Revision 10), revised |
Must I uninstall before running the new script? |
If you used the previous version of my script you can just run the install instruction again, you can also do this if you wish to change the username which the service runs with. The only time you need to uninstall first is if you change an installation location inside the script file (i.e. |
Okay the service is running and I'm testing now, waiting for battery to charge. I was wondering though if it's worth improving the security of the service file using the portmaster file as an example, this is what i came up with:
|
The author, @the-weird-aquarian would have to look into that, I am not too familiar with systemd units and I don't know what features they might want to add that could conflict with these restrictions. |
Okay well as I said the service is running and I set my notification to go off at 75% but it hasn't gone off even if over 75%, and EDIT no notification at 81% |
Troubleshooting this would require me to either test it on some device that has a battery, or (more practically) use a fake/simulated battery kernel module. I'd be happy to do that, I am actually curious why it doesn't work, but I have more pressing stuff to finally get done right now. Maybe I can fit it in in the next few days, but no guarantees. |
Yes, no of course. You've done a lot already. Out of interest |
Hi guys so, what would it take to get this over the line? |
I actually recently wrote a script for my SteamDeck to keep the battery between 45 and 55% while plugged in, which obviously works with immutable systems. It should be trivial to modify it for this purpose, the only thing is I’d have to research how sending the notification is implemented in bash scripts. I’ll get back to you when I figure it out. |
Okay perfect! |
Any chance we can solve this soon or should I look at duttaprasanta/battery_alert#4 |
Not sure what functionality you are looking for, I wrote this Systemd unit that contains a basic battery level notification system: https://gist.github.com/WinkelCode/3c87dfc2a96d0263a03d240c8bb8786d (Check the gist description for installation infos) If you run into any issues, run |
Will have a look, thanks |
I had a look, it seems like that notifies when you battery is low at 35%, am I right?
Or fixing this script: https://gist.github.com/WinkelCode/168028a9e20baa4393a60791cdb7e4b9 |
Hi thanks for this script, I installed and waiting to see if it works (doesn't seem to be).
But had this warning when installing:
$ cd Battery-Notifier
[@fedora Battery-Notifier]$ sh install.sh
Battery Notifier
Installing in /var/home/User/laptop_battery_notify ...
Fixing permissions ...
Please select if you're using a dark or light theme
Setting up cronjob ...
install.sh: line 37: crontab: command not found
install.sh: line 37: crontab: command not found
Also is it fine to edit the .sh and change the % values to ones of your own choosing?
Finally is there a way to set it to play a custom sound? Like a voice recording that says Battery low, please charge?
The text was updated successfully, but these errors were encountered: