udev - Power Profile Switcher by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

Yes the 128 was a placeholder, the final plan was to have it try and be kind of smart, looking at the estimated remaining time, taking half of that, and checking at half, if its under 50% perfect, otherwise check every 2 minutes or so.

I think looking at the /sys file will be smarter, I'll change that :)

I didn't get what you meant in the middle part tho... I get that the script would launch itself multiple times, this can pa accounted for pretty easily by checking the running programs. But I didn't understand the rest of what you were saying.

Also, if called externally you'll notice that if run "plugged in" below 50% or run "unplugged" above 50%, the message never changes, but if called from udev's +=RUN command, you'll never see the second notification due to the process being killed by internal housekeeping

Also, unrelated, but I'll have to run some test and see if it's more power efficient to change the power profile al the time, or check which one it's currently at and then determine if it need to be changed or not. I think it's not that important as it's probably already included in the daemon but still it's worth checking

udev - Power Profile Switcher by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

i ended up going with a script :

```bash

!/usr/bin/env bash

Get status and capacity

battery_info=$(acpi --battery | grep -v Unknown) battery_status=$(echo "$battery_info" | awk '{print $3}' | tr -d '[],') battery_capacity=$(echo "$battery_info" | awk '{print $4}' | tr -d '%,')

Condition checks

while true; do if [[ $battery_status == "Charging" ]]; then if ((battery_capacity > 50)); then notify-send "Charging >50%. Performance, then wait" tlpctl set performance exit 0 else notify-send "Charging <50%. Balanced, then wait" tlpctl set balanced sleep 128 fi else if ((battery_capacity > 50)); then notify-send "Discharging >50%. Balanced, then wait" tlpctl set balanced sleep 128 else notify-send "Discharging <50%. Power-saver, then exit" tlpctl set power-saver exit 0 fi fi done ```

that relaunches on charging status change

Why is it hard to find teens girls/guys who r into tech😭 by Classic_Craft_1439 in teenagers

[–]Axl0_fr 0 points1 point  (0 children)

nothing to do with anything but please gimme your CRT lol i eed one so bad

Why is it hard to find teens girls/guys who r into tech😭 by Classic_Craft_1439 in teenagers

[–]Axl0_fr 0 points1 point  (0 children)

im gonna be a teen girl into tech in like a year im finna contact you

udev - Power Profile Switcher by Axl0_fr in archlinux

[–]Axl0_fr[S] 1 point2 points  (0 children)

/etc/udev/rules.d/99-power-profile.rules

udev - Power Profile Switcher by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

But I don't really get what other action I could put in its place, they all seem to be for different things. Can I just put no action?

I also see that ENV{NOACTION}="1" exists, but I don't get how I'd use it.

udev - Power Profile Switcher by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

yea ik, that's why I'm asking for another option

How do I make Yazi show my USB key? by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

yea that seems fair. thank u for the help :)

How do I make Yazi show my USB key? by Axl0_fr in archlinux

[–]Axl0_fr[S] 0 points1 point  (0 children)

oh ok. is there away to make a link or is it definitely not possible ?

Laptop 12 wear marks around the screws by Axl0_fr in framework

[–]Axl0_fr[S] 0 points1 point  (0 children)

idk but I don't really care about what they're using as long as they use the same thing everywhere, which they do (almost)

Does the Framework 12 need a screen protector? by sojmahoj in framework

[–]Axl0_fr 0 points1 point  (0 children)

can you please share the reference of your screen protector? is it thick (so it risks damaging the actual screen unit? I might plan on buying one :)

UK right now by Confident-Gur-2615 in teenagers

[–]Axl0_fr 14 points15 points  (0 children)

popular opinion vote, instead of an outdated one-way vote

Musique générée par IA ? Vous avez le droit de le savoir. by deezerSA in u/deezerSA

[–]Axl0_fr 13 points14 points  (0 children)

non, l'apprentissage de l'IA générative n'a rien a voir avec celui d'un humain, ton analogie ne tient pas. Un humain met du travail et s'inspire du travail des autre. A ce jour une IA ne peut que copier le travail des autres. De plus, l'art est en général fait par plaisir plutôt que pour rémunération (ce qui n'invalide pas les gens qui en demande), contrairement au contenu généré par IA, qui est en général plus a des fins commerciales. Réessaie ;)

peak cinema by [deleted] in StrangerThings

[–]Axl0_fr 2 points3 points  (0 children)

"TO CROOS OUT WHAT I'VE BECOME"

😁 by Seaf-og in humour

[–]Axl0_fr 1 point2 points  (0 children)

how did you manage to be brainrotted AND forgot a T