Comments (5)
[igor@nixos:~/Downloads]$ sudo ./bat -c
100
[igor@nixos:~/Downloads]$ sudo ./bat -t 60
Charging threshold set.
Use sudo bat --persist
to persist the setting between restarts.
[igor@nixos:~/Downloads]$ sudo ./bat -c
100
[igor@nixos:~/Downloads]$ sudo ./bat -p
2022/06/10 23:14:33 open /etc/systemd/system/bat-suspendthenhibernate.service: read-only file system
Actually NixOS would never allow to write to system files. Thank you for your efforts. I wrote a simple script for cron. Works perfect even on Arch. Just on NixOS I run cron job using NixOS way.
from bat.
It seems, that you need to add another bash path to your services.go: "/run/current-system/sw/bin/bash"
is it possible to use just "bash" string instead of the full path?
from bat.
Thank you for pointing that out, @igor-frolikov. I think it has to be the full path because some of these are run before path variables are set. But that said, there is probably a better way to set it. Can you check if running command -v bash
gives the right location for Bash on your system?
from bat.
[igor@nixos:~]$ command -v bash
/run/current-system/sw/bin/bash
NixOS has different file structure. Here are almost all symlinks. The path is standard for all NixOS Linux systems.
Another idea is replacing "bash" by "sh". This way "bin/sh" will work fine.
from bat.
Here's a fix. Please let me know if it works.
from bat.
Related Issues (20)
- issue: Charging does not stop no matter if the laptop is running or sleeping HOT 5
- issue: How to set charge resume level? HOT 3
- issue: Fails to build: cannot load embed: malformed module path "embed" HOT 3
- Works with T14 Gen2 Intel ThinkPads HOT 1
- issue: bat uninstall HOT 6
- bat-asus-battery-bin package on AUR failed to build HOT 2
- Not working. After connect charger battery charging. ASUS TUF Gaming F17 FX706HE_FX706HE 1.0 HOT 2
- issue: when i run " # ./bat --threshold" HOT 1
- Request procedure how to update the app HOT 5
- Use system call to retrieve the Linux kernel version
- Run CI checks in parallel
- feat: battery health command HOT 18
- issue: 目前本人用thinkpad t15g gen1 移动工作站,以后可能换dell precision,请贵编以后加强下dell HOT 1
- issue: Battery percentage setting doesn't persist; systemctl does not indicate that [email protected] is running. HOT 44
- feat: replace dependency on Bash with /bin/sh for cross-platform compatibility
- Not working on Asus Zenbook with Ubuntu 23.04 HOT 6
- build: create additional Make targets
- issue: charge threshold not working after waking up from sleep HOT 19
- build: package bat for NixOS HOT 2
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 bat.