mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-30 00:54:55 +02:00
Make certain dialogs clearer & fix superfluous snap message
This commit is contained in:
parent
7925c21023
commit
64af2b4ec6
@ -58,8 +58,12 @@ def gnome_power_detect():
|
|||||||
if systemctl_exists and not bool(gnome_power_status):
|
if systemctl_exists and not bool(gnome_power_status):
|
||||||
warning()
|
warning()
|
||||||
print("Detected running GNOME Power Profiles daemon service!")
|
print("Detected running GNOME Power Profiles daemon service!")
|
||||||
print("This daemon might interfere with auto-cpufreq and will be automatically disabled.")
|
print("\nThis daemon might interfere with auto-cpufreq and will be automatically")
|
||||||
print("\nSteps to perform this action using auto-cpufreq: power_helper script:")
|
print("disabled when auto-cpufreq daemon is installed and")
|
||||||
|
print("it will be re-enabled after auto-cpufreq is removed.")
|
||||||
|
|
||||||
|
print("\nOnly necessary to be manually done on Snap package installs!")
|
||||||
|
print("Steps to perform this action using auto-cpufreq: power_helper script:")
|
||||||
print(f"git clone {GITHUB}.git")
|
print(f"git clone {GITHUB}.git")
|
||||||
print("cd auto-cpufreq/auto_cpufreq")
|
print("cd auto-cpufreq/auto_cpufreq")
|
||||||
print("python3 power_helper.py --gnome_power_disable")
|
print("python3 power_helper.py --gnome_power_disable")
|
||||||
@ -70,9 +74,9 @@ def gnome_power_detect_install():
|
|||||||
if systemctl_exists and not bool(gnome_power_status):
|
if systemctl_exists and not bool(gnome_power_status):
|
||||||
warning()
|
warning()
|
||||||
print("Detected running GNOME Power Profiles daemon service!")
|
print("Detected running GNOME Power Profiles daemon service!")
|
||||||
print("This daemon might interfere with auto-cpufreq and has been disabled.\n")
|
print("\nThis daemon might interfere with auto-cpufreq and has been disabled.\n")
|
||||||
print('This daemon is not automatically disabled in "monitor" mode and')
|
print('This daemon is not automatically disabled in "monitor" mode and')
|
||||||
print("will be enabled after auto-cpufreq is removed.\n")
|
print("will be enabled after auto-cpufreq daemon is removed.")
|
||||||
|
|
||||||
|
|
||||||
# notification on snap
|
# notification on snap
|
||||||
@ -128,7 +132,7 @@ def gnome_power_svc_status():
|
|||||||
def bluetooth_disable():
|
def bluetooth_disable():
|
||||||
if IS_INSTALLED_WITH_SNAP: bluetooth_notif_snap()
|
if IS_INSTALLED_WITH_SNAP: bluetooth_notif_snap()
|
||||||
elif bluetoothctl_exists:
|
elif bluetoothctl_exists:
|
||||||
print("* Turn off bluetooth on boot")
|
print("* Turn off bluetooth on boot (can be turned on any time later on!)")
|
||||||
btconf = Path("/etc/bluetooth/main.conf")
|
btconf = Path("/etc/bluetooth/main.conf")
|
||||||
try:
|
try:
|
||||||
orig_set = "AutoEnable=true"
|
orig_set = "AutoEnable=true"
|
||||||
@ -175,7 +179,7 @@ def gnome_power_rm_reminder():
|
|||||||
if systemctl_exists and bool(gnome_power_status):
|
if systemctl_exists and bool(gnome_power_status):
|
||||||
warning()
|
warning()
|
||||||
print("Detected GNOME Power Profiles daemon service is stopped!")
|
print("Detected GNOME Power Profiles daemon service is stopped!")
|
||||||
print("This service will now be enabled and started again.")
|
print("This service will now be enabled and started again.\n")
|
||||||
|
|
||||||
|
|
||||||
def gnome_power_rm_reminder_snap():
|
def gnome_power_rm_reminder_snap():
|
||||||
@ -229,8 +233,8 @@ def gnome_power_svc_disable():
|
|||||||
print("There was a problem, couldn't determine GNOME Power Profiles Daemon")
|
print("There was a problem, couldn't determine GNOME Power Profiles Daemon")
|
||||||
snap_pkg_check = 0
|
snap_pkg_check = 0
|
||||||
|
|
||||||
if not bool(gnome_power_status) and powerprofilesctl_exists:
|
if snap_pkg_check == 1:
|
||||||
if snap_pkg_check == 1:
|
if not bool(gnome_power_status) and powerprofilesctl_exists:
|
||||||
print("auto-cpufreq snap package not installed.\nGNOME Power Profiles Daemon should be enabled, run:\n\n"
|
print("auto-cpufreq snap package not installed.\nGNOME Power Profiles Daemon should be enabled, run:\n\n"
|
||||||
"sudo python3 power_helper.py --gnome_power_enable"
|
"sudo python3 power_helper.py --gnome_power_enable"
|
||||||
)
|
)
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
MID="$((`tput cols` / 2))"
|
MID="$((`tput cols` / 2))"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
printf "%0.s─" $(seq $((MID-(${#1}/2)-2)))
|
printf "%0.s─" $(seq $(( (MID-(${#1}/2)-2) / 2 )))
|
||||||
printf " Running auto-cpufreq daemon install script "
|
printf " Running auto-cpufreq daemon install script "
|
||||||
printf "%0.s─" $(seq $((MID-(${#1}/2)-2)))
|
printf "%0.s─" $(seq $(( (MID-(${#1}/2)-2) / 2 )))
|
||||||
echo; echo
|
echo; echo
|
||||||
|
|
||||||
# root check
|
# root check
|
||||||
@ -69,7 +69,7 @@ case "$(ps h -o comm 1)" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
systemd)
|
systemd)
|
||||||
echo -e "\n* Deploying auto-cpufreq systemd unit file"
|
echo -e "Deploying auto-cpufreq systemd unit file"
|
||||||
cp /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service
|
cp /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service
|
||||||
|
|
||||||
echo -e "\n* Reloading systemd manager configuration"
|
echo -e "\n* Reloading systemd manager configuration"
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
MID="$((`tput cols` / 2))"
|
MID="$((`tput cols` / 2))"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
printf "%0.s─" $(seq $((MID-(${#1}/2)-2)))
|
printf "%0.s─" $(seq $(( (MID-(${#1}/2)-2) / 2 )))
|
||||||
printf " Running auto-cpufreq daemon removal script "
|
printf " Running auto-cpufreq daemon removal script "
|
||||||
printf "%0.s─" $(seq $((MID-(${#1}/2)-2)))
|
printf "%0.s─" $(seq $(( (MID-(${#1}/2)-2) / 2 )))
|
||||||
echo; echo
|
echo; echo
|
||||||
|
|
||||||
# root check
|
# root check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user