Commit Graph

88 Commits

Author SHA1 Message Date
Lab Rat 37e12a4266
Support for pyproject.toml (#576)
* feat: support for pyproject.toml

* Nix: Fix package to work with pyproject.toml

---------

Co-authored-by: shadeyg56 <shadeyg56@gmail.com>
2023-10-13 08:04:49 +02:00
shadeyg56 0f14a6a252 wrapper: switch sh to bash (Void fix) 2023-10-11 17:16:51 -05:00
Lab Rat 7f3b3e1fc1
chore: bumped version from 2.0 to 2.0.0 and improved error catching on update (#558) 2023-09-18 21:09:56 +02:00
Devesh Sharma 7e02a0769d
added optional path in --update (#538)
* add --dir

* add to path option to --update

* optional add to path in --update

* update

* update README.md

* resolve bugs
2023-09-18 19:59:46 +02:00
shadeyg56 674b3c4ae0
sysinfo: check for additional sensors and no longer default to first sensor (#548) 2023-09-07 18:24:49 +02:00
shadeyg56 0925b5d542
Gtk Application for auto-cpufreq (#486)
* Squashed commit of the following:

commit ec7e087b343f33af7a92b190ed666845dab60f20
Merge: 32b6e63 9912f9d
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Mon Feb 13 14:11:21 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit 32b6e632830fe8a7c3a3ce601ef2ba5b254572d7
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 13 14:10:34 2023 -0600

    increase MenuButton size

commit 12a2cda82a5f56bfbb532c893d822341e9b2d7cb
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 23:35:33 2023 -0600

    set app icon

commit d170d07e866644bcb662bf342530c497390f0303
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 23:35:15 2023 -0600

    remove unused pixbuf

commit 993333fb5aad448103e24e38bc85fb04e7e4dd0c
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 22:43:56 2023 -0600

    fix MenuButton icon

commit d1b8bd74caab2cf216bf40bdfc35ef3520e891c7
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 17:19:32 2023 -0600

    add icon

commit 13f43fa0c7d59b2405bac688119690d01a7ec019
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 17:19:10 2023 -0600

    add pkexec policy and change wrapper for gui

commit 4ddbb9c6667aa97bb7cd242fb4a376e061c9b308
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 14:09:35 2023 -0600

    add icon to destop entry and about dialog

commit 9912f9d809
Author: Siddharth Kumar Jha <101443068+siddharthkumarjha@users.noreply.github.com>
Date:   Sun Feb 12 12:55:14 2023 +0530

    Update Readme for issue of auto-cpufreq not autostarting on AUR  (#485)

    * Updated Readme for issue auto-cpufreq not autostarting

    Added solution to issue https://github.com/AdnanHodzic/auto-cpufreq/issues/463

    * Fixed minor errors

    * Fixed auto-cpufreq.serivce Typo

    * Reprashed text as per suggestion

commit 4379024adab282fcdb58a7091df2a6adf833e700
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Tue Feb 7 19:06:59 2023 -0600

    add removal of gui and desktop entry

commit 42693703324762418a7f810f04a3d77803afa236
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 6 23:28:44 2023 -0600

    CPU stats refresh and style stuff

commit 7149db72c0bb39af57ceccb16df8e9164c77fae3
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 6 23:10:29 2023 -0600

    daemon detection, daemon install/removal, and layout stuff

commit f7e03c9bcc2e2578703807ceeb7a652903571b71
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 19:26:42 2023 -0600

    improve AboutDialog

    Please enter the commit message for your changes. Lines starting

commit cb8cfe7b3194273dea229fe550fdf66cd6af82fa
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 18:28:19 2023 -0600

    add dropdown menu and (not completed) about dialog

commit ade1fed790f2ebbaae4e92ce8879ab812c9b2850
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 15:57:17 2023 -0600

    actually fix css

commit 67c8c97bcf2f2f408431bc162c38dee5c278ed0b
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 15:54:47 2023 -0600

    fix css

commit c65eac3472
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Sun Feb 5 09:29:19 2023 +0100

    Update readme, install psutil lib for power_helper

commit bd3feae38824764155d31ccd6debc1fcf18830da
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 00:42:52 2023 -0600

    add desktop entry for gui

commit 5426a6a443c90a9d65b858ae1951219898cba332
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 00:33:08 2023 -0600

    add gui to install file, update required packages, and create wrapper script

commit 84124dfa605b930b3722ed852486cbe11c254092
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 23:28:24 2023 -0600

    create system tray

commit 7b0d46d8ddafdeff9006a1ad10ccd99c24b9eb1e
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 23:28:01 2023 -0600

    small changes to layout

commit cd51ea317085ac6ea5b4918ef057ad4c19a71640
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 00:44:08 2023 -0600

    css styling support

commit 136b449febece04c036b72b4a14ccceb422f62dd
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 00:14:52 2023 -0600

    several improvements

commit f9f7170391e1abc1499b7d5ae93327999e013730
Merge: 242a8d0 8f343df
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Fri Feb 3 22:44:01 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit 8f343df8b8
Merge: dadfae0 b38919f
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Fri Feb 3 14:54:11 2023 -0600

    Merge pull request #481 from shadeyg56/master

    Fix uncaught error in checking for snap

commit b38919f56b
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Fri Feb 3 14:48:01 2023 -0600

    fix uncaught error in checking for snap

commit 242a8d0401d1ffd00c982aa731c04ef7ea726fee
Merge: f50b982 dadfae0
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Fri Feb 3 14:19:01 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit dadfae087f
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Fri Feb 3 20:02:03 2023 +0100

    Update README with  new config options

commit 471611de7d
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Fri Feb 3 18:44:33 2023 +0100

    Remove GNOME Power Profiles Daemon performance install

commit f574257dc4
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Fri Feb 3 18:32:04 2023 +0100

    Remove install_performance flag

commit 04b878360c
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Fri Feb 3 17:52:20 2023 +0100

    Snap tag 2.0-beta + governor_override improvements

commit fe21ddf245
Author: Adnan Hodzic <adnan@hodzic.org>
Date:   Fri Feb 3 17:28:12 2023 +0100

    Working governor override on Snap package

commit f50b9829e5438bb96ded73775668fa048fcd3951
Merge: a98225e 69ef913
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Thu Feb 2 18:19:10 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit a98225e7280802c2fb09a9a52a40f7e55b26b3b1
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 18:18:43 2023 -0600

    Revert "basic GUI"

    This reverts commit d2610c921b7209fde7d7be13f187510631cc33b3.

commit 9606472fdbbff6dd551cd291b37349df17098d2e
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 18:13:41 2023 -0600

    basic gui

commit d2610c921b7209fde7d7be13f187510631cc33b3
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 17:47:55 2023 -0600

    basic GUI

commit bdbe12018b380ed70f100729c9ea3732ba24f572
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 15:21:42 2023 -0600

    rename folder

commit 31095c472e4af734a3a601f804787de89ad47964
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Wed Jan 25 23:39:52 2023 -0600

    add tray

* Squashed commit of the following:

commit e2eaffc32b382f67f97d2e25858b5b5a4abffeae
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 20 23:08:57 2023 -0600

    move text to be inline with menu

commit e1dae9d9de25f13c51dd983f5b4b0fbdf1bf0349
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 19 17:50:26 2023 -0600

    move distro info to top of system stats box

commit 959405bedc52dce14f5fd70d2fcd5fbee57e59a5
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 19 17:49:15 2023 -0600

    fix app name on GNOME

commit 346093dfce6ce0bfa1954ed3bb6f5364250d05b7
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 19 17:01:03 2023 -0600

    fix snap dependencies

commit ec7e087b343f33af7a92b190ed666845dab60f20
Merge: 32b6e63 9912f9d
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Mon Feb 13 14:11:21 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit 32b6e632830fe8a7c3a3ce601ef2ba5b254572d7
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 13 14:10:34 2023 -0600

    increase MenuButton size

commit 12a2cda82a5f56bfbb532c893d822341e9b2d7cb
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 23:35:33 2023 -0600

    set app icon

commit d170d07e866644bcb662bf342530c497390f0303
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 23:35:15 2023 -0600

    remove unused pixbuf

commit 993333fb5aad448103e24e38bc85fb04e7e4dd0c
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 22:43:56 2023 -0600

    fix MenuButton icon

commit d1b8bd74caab2cf216bf40bdfc35ef3520e891c7
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 17:19:32 2023 -0600

    add icon

commit 13f43fa0c7d59b2405bac688119690d01a7ec019
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 17:19:10 2023 -0600

    add pkexec policy and change wrapper for gui

commit 4ddbb9c6667aa97bb7cd242fb4a376e061c9b308
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 12 14:09:35 2023 -0600

    add icon to destop entry and about dialog

commit 4379024adab282fcdb58a7091df2a6adf833e700
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Tue Feb 7 19:06:59 2023 -0600

    add removal of gui and desktop entry

commit 42693703324762418a7f810f04a3d77803afa236
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 6 23:28:44 2023 -0600

    CPU stats refresh and style stuff

commit 7149db72c0bb39af57ceccb16df8e9164c77fae3
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Mon Feb 6 23:10:29 2023 -0600

    daemon detection, daemon install/removal, and layout stuff

commit f7e03c9bcc2e2578703807ceeb7a652903571b71
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 19:26:42 2023 -0600

    improve AboutDialog

    Please enter the commit message for your changes. Lines starting

commit cb8cfe7b3194273dea229fe550fdf66cd6af82fa
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 18:28:19 2023 -0600

    add dropdown menu and (not completed) about dialog

commit ade1fed790f2ebbaae4e92ce8879ab812c9b2850
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 15:57:17 2023 -0600

    actually fix css

commit 67c8c97bcf2f2f408431bc162c38dee5c278ed0b
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 15:54:47 2023 -0600

    fix css

commit bd3feae38824764155d31ccd6debc1fcf18830da
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 00:42:52 2023 -0600

    add desktop entry for gui

commit 5426a6a443c90a9d65b858ae1951219898cba332
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sun Feb 5 00:33:08 2023 -0600

    add gui to install file, update required packages, and create wrapper script

commit 84124dfa605b930b3722ed852486cbe11c254092
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 23:28:24 2023 -0600

    create system tray

commit 7b0d46d8ddafdeff9006a1ad10ccd99c24b9eb1e
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 23:28:01 2023 -0600

    small changes to layout

commit cd51ea317085ac6ea5b4918ef057ad4c19a71640
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 00:44:08 2023 -0600

    css styling support

commit 136b449febece04c036b72b4a14ccceb422f62dd
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Sat Feb 4 00:14:52 2023 -0600

    several improvements

commit f9f7170391e1abc1499b7d5ae93327999e013730
Merge: 242a8d0 8f343df
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Fri Feb 3 22:44:01 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit 242a8d0401d1ffd00c982aa731c04ef7ea726fee
Merge: f50b982 dadfae0
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Fri Feb 3 14:19:01 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit f50b9829e5438bb96ded73775668fa048fcd3951
Merge: a98225e 69ef913
Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
Date:   Thu Feb 2 18:19:10 2023 -0600

    Merge branch 'AdnanHodzic:master' into gui

commit a98225e7280802c2fb09a9a52a40f7e55b26b3b1
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 18:18:43 2023 -0600

    Revert "basic GUI"

    This reverts commit d2610c921b7209fde7d7be13f187510631cc33b3.

commit 9606472fdbbff6dd551cd291b37349df17098d2e
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 18:13:41 2023 -0600

    basic gui

commit d2610c921b7209fde7d7be13f187510631cc33b3
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 17:47:55 2023 -0600

    basic GUI

commit bdbe12018b380ed70f100729c9ea3732ba24f572
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Thu Feb 2 15:21:42 2023 -0600

    rename folder

commit 31095c472e4af734a3a601f804787de89ad47964
Author: shadeyg56 <shadeyg56@gmail.com>
Date:   Wed Jan 25 23:39:52 2023 -0600

    add tray

* fix undefined var

* app no longer needs root to start, only asks when needed

* fix wmclass

* create file in /bin for gui

* fix bug with radio buttons and pkexec

* snap: update snap to package GTK gui

* update setup.py

* requirements.txt: fix conflict

* Merge master into dev

* gui: fix pkexec on launch
2023-08-15 17:58:16 +02:00
Devesh Sharma 3dffa23e00
Add auto-cpufreq --update feature (#535)
* update feature

* update feature added

* '--update'

* update feature
2023-07-15 21:32:23 +02:00
Lab Rat c34e3e7fbd
Fix bug related to repeated sudo prompt due to set_override calls (#531)
set_override method is now called only if force flag is invoked.

Here are the specific code changes made:

In auto_cpufreq/core.py:
- Line 96: Removed the root_check call from the set_override function.
           This was intended to be done to comply with code template,
           i.e., to use root_check in the main file.

In bin/auto-cpufreq:
- Line 45: Added a root_check call before calling set_override in main program.
           Also, set_override is only called if force option is invoked, saving
           us from precious extra overheads.

Fixes #530
2023-06-30 08:37:19 +02:00
Lab Rat 486a9a6dc2
Adding root_check before set_override method execution (#524)
This will ensure that set_override calls are always in su mode.
So, in effect all override using 'force' can clearly access
the governer_override_state path file, and write changes to it,
without externally tinkering the environment.
2023-06-24 07:42:56 +02:00
Adnan Hodzic 3dcf2fd837 Ensure all core indices are handled, RPI 4 support 2023-05-21 14:03:29 +02:00
Adnan Hodzic 9a935ebd5b Re-align how usage, temp, and freq are displayed 2023-05-21 13:10:44 +02:00
marchwicki b1758ba74b
check for CPU lable if no coretemp (#513)
Attempt to use "CPU" label before falling back to the first sensor.
2023-05-21 12:31:39 +02:00
Adnan Hodzic 04b878360c Snap tag 2.0-beta + governor_override improvements 2023-02-03 18:05:27 +01:00
Adnan Hodzic fe21ddf245 Working governor override on Snap package 2023-02-03 17:28:12 +01:00
Adnan Hodzic 69ef913c1b Change override.pickle location + add to snap 2023-02-02 17:18:58 +01:00
shadeyg56 2bfe71e8d8
[Feature] Force use of powersave or performance governors (#476)
* add the --force option and governor overrides

* update README to reflect --force option

* add --state option

* update README with --state option

* update README to expand on --force functionality

* change name of remove() func and remove pickle upon --remove

* check if daemon is not running when using --force and change --state

* add links to README

* change force section wording

* add quotes to --force help

* add override warning to stats file

* hide --get-state flag

* consolidate error messages and add daemon checks to --get-state and --stats

* add quotes
2023-02-01 16:39:14 +01:00
Gimbles 122dd0f96c
Use usr/local/bin instead of usr/bin for Silverblue and other immutable OSs (#460)
* usr/local/bin instead of usr/bin/

* fix shebang
2022-11-24 17:44:57 +01:00
Adnan Hodzic d77c1de6d6 Removed battery percentage 2022-11-18 06:29:15 +01:00
Adnan Hodzic d26ec98837 Add missing display system load average info 2022-11-13 19:17:35 +01:00
Ben d60642720a
Fixed bug where turbo boost will always be on in performance mode (#455)
* Fixed bug where Turbo Boost is always on in performance mode

* Removed debugging prints

* Added new line at EOF
2022-11-12 06:23:45 +01:00
Adnan Hodzic 2ae8ed4be2 Round battery cha/discharging percentage display 2022-11-12 06:20:52 +01:00
Adnan Hodzic 6e74a95f10 Add functionality to display system load average 2022-11-12 06:02:26 +01:00
Tobias ff72e1e0f3
fixed battery_percentage (#442) 2022-10-11 06:29:05 +02:00
BowDown097 43b33be51c
battery_percentage fix (#437) 2022-09-25 18:50:53 +02:00
Tobias 98569ad71a
SunkenHero Code optimization & addition of battery percentage (#432)
* Added fan speed display

* optimizations in temperatures

* Simplified charging function and added percentage display

* change print battery status

* Fixed charging not returning boolean

* battery_percentage returns now rounded value insead of 10 decimals

* changed charging function back

* changed charging back and some display changes

* little fix at display battery percentage

* battery percentage not showing %
2022-09-10 14:02:17 +02:00
hingen 620433d78d
Replaced obsolete "egrep" calls with "grep -E" (#435) 2022-09-10 08:37:19 +02:00
SunkenHero 1a35c3ca01
Added fan speed display (#431) 2022-09-08 07:46:34 +02:00
Martin Andersson 7573df7bb2
Omit the --all flag from calling nproc to get actual number of cores instead of threads. (#423) 2022-08-22 16:42:09 +02:00
Martin Andersson dad1c819fd
Don't overwrite /usr/bin/cpufreqctl.auto-cpufreq excessively. (#420)
Looks like the behavior of constantly overwriting it was not intended,
but introduced inadvertently in a91d4ba36e
2022-08-15 12:32:54 +02:00
Martin Andersson f67e909b59
Catch exception in call to psutil .cmdline() (#413)
There's a race condition where processes might disappear while filtering. The uncaught exception causes a crash.
2022-08-10 14:23:58 +02:00
Ishaan Bhimwal 29d5d87ded
fix multiple typos as reported by typos (#410) 2022-07-31 08:14:27 +02:00
tacheometry 812e97d8d9
Fix daemon typo (#409) 2022-07-28 09:35:52 +02:00
Adnan Hodzic d9295f4cf2 Revamped how log file is emptied 2022-06-05 20:10:33 +02:00
Adnan Hodzic c8f9095067 Real time auto-cpufreq refresh 2022-06-05 17:44:33 +02:00
Jeroenvb fbd4863213
Fixed where average all core temp is displayed with too many decimals. (#392)
* Fixed where average all core temp is displayed with too many decimals.

* Made both total system load, and avg temp 2 decimals in cleaner .format form.
2022-05-23 05:37:49 +02:00
Adnan Hodzic a15e594fba Add check for performance governor in available governors 2022-02-19 15:22:43 +01:00
Adnan Hodzic 8ff85e9371 Revamped performance mode install on non Snap env 2022-02-19 14:49:34 +01:00
Adnan Hodzic 8fb5469ace v1.9.1 release & Github issue template update 2022-01-09 14:03:35 +01:00
Ismael Arias 5e503f89c2
Fixed the --version command when installed from source (#347)
* Fixed the --version command when installed from source (#344)

The command only worked when running it inside the git repository.

Now, it works from everywhere, and the version is constructed using
the latest git tag and the SHA of the latest commit, which may help
with further debugging in future issues.

* Improving version output.

Renaming version_config to setuptools_git_versioning to be compliant with new plugin version.

Formatted the version when a git hash is present for a better readability.

The version is set in the setup.py file. This will be used for the tar.gz releases.
Snap version is also retrieved from setup.py too, so we avoid code repetition.
2022-01-09 13:49:41 +01:00
Adnan Hodzic 3a4beb34c5 Revert "Fixed the --version command when installed from source (#344)"
This reverts commit d2dba2fc31.
2022-01-08 18:58:12 +01:00
Adnan Hodzic 000ccf04fb Remove workaround to get distro package version 2022-01-08 15:55:56 +01:00
Adnan Hodzic 5b1f2a227f Snap v1.9.1 and minor snap output improvement 2022-01-08 15:43:43 +01:00
Ismael Arias d2dba2fc31 Fixed the --version command when installed from source (#344)
The command only worked when running it inside the git repository.

Now, it works from everywhere, and the version is constructed using
the latest git tag and the SHA of the latest commit, which may help
with further debugging in future issues.
2022-01-08 15:23:58 +01:00
Ákos Várady fc2d8e3645
Ability to reset scaling frequencies to default (#338)
* Ability to reset scaling frequencies to default

If one of the scaling frequencies option is missing, either because
it's commented out or auto-cpufreq.conf is not being used, the default
frequency limits will be set.
TODO: perform setting only once per battery state change

* Ability to reset scaling frequencies to default 2.

Additional changes to optimize auto-cpufreq speed, by conditionally
performing frequency scaling settings.
2021-12-30 13:29:14 +01:00
Ákos Várady 1aa1983ccf
Add min/max allowed frequencies option (#309) (#324)
* Add min/max allowed frequencies option (#309)

Setting the minimum/maximum allowed CPU frequencies is now possible
via 'scaling_min_freq' and 'scaling_max_freq' options in config
for both modes (charger and battery).
Values should be given in kHZ.

Example:
scaling_min_freq = 1800000
scaling_max_freq = 2000000

I also did autoformatting via 'black', using --line-length 100.
Code is now a bit tidier than before.

* Fixes for min/max allowed frequencies option

* Further modify min/max frequency option

* Fix temporary modification in min/max allowed frequency option

Co-authored-by: Akos Varady <akos.varady@ericsson.com>
2021-12-26 11:01:32 +01:00
bobslept 64e33827b8
Improve charging detection (#332) 2021-12-24 20:21:40 +01:00
tyleraharrison 78ddf145e7
Started the solution to Snap and PopOS not working (#329)
* Started the solution to Snap and PopOS not working

Needs Snap detection on line 102/103

This code does NOT function properly unless that detection added

Added ability for the program to resume if the PopOS fix works

* Implemented changes as suggested by bobslept
2021-12-23 19:22:46 +01:00
Ákos Várady 3121e2f454
Reformatted codebase (#325)
All python scripts are now reformatted with 'black' using line length
of 100.

Co-authored-by: Akos Varady <akos.varady@ericsson.com>
2021-12-22 08:28:08 +01:00
bobslept 6e3f45182b
Implement python virtual environment (#326)
* Implement python virtual environment

  * added venv instead of using system env pip
  * adjusted the unit file to startup the app from the venv
  * created a wrapper script to call the app from the venv
  * extended cleanup for venv and additional scripts
  * refactored the is_running() function to find the process now that it
    is called from a venv

* remove update_service_file since we changed the binary path to the venv location

* fix bug in argument handling; upgrade pip before installing python packages

* fix bug in syntax

* Renamed auto-cpufreq wrapper

* Change permissions to use --stats as user

* Changed init scripts to use wrapper

Co-authored-by: aroundthfur <velimir@foolcontrol.org>
2021-12-21 20:14:02 +01:00
bobslept dd5d871769
Fix #321, skip hid devices with battery (#322) 2021-12-21 18:25:46 +01:00