99
1010from auto_cpufreq .core import check_for_update , is_running
1111from auto_cpufreq .globals import GITHUB , IS_INSTALLED_WITH_SNAP
12- from auto_cpufreq .gui .objects import CPUFreqStatsLabel , CurrentGovernorBox , DaemonNotRunningView , DropDownMenu , MonitorModeView , RadioButtonView , CPUTurboOverride , SystemStatsLabel , UpdateDialog
12+ from auto_cpufreq .gui .objects import BatteryInfoBox , BluetoothBootControl , CPUFreqScalingBox , CurrentGovernorBox , DaemonNotRunningView , DropDownMenu , MonitorModeView , RadioButtonView , CPUTurboOverride , SystemStatsLabel , SystemStatisticsBox , UpdateDialog
1313from auto_cpufreq .gui .objects import get_stats
14+ from auto_cpufreq .power_helper import bluetoothctl_exists
1415
1516if IS_INSTALLED_WITH_SNAP :
1617 CSS_FILE = "/snap/auto-cpufreq/current/style.css"
@@ -40,7 +41,7 @@ def main(self):
4041 self .hbox .pack_start (self .systemstats , False , False , 0 )
4142 self .add (self .hbox )
4243
43- self .vbox_right = Gtk .Box (orientation = Gtk .Orientation .VERTICAL , spacing = 52 )
44+ self .vbox_right = Gtk .Box (orientation = Gtk .Orientation .VERTICAL , spacing = 15 )
4445
4546 self .menu = DropDownMenu (self )
4647 self .hbox .pack_end (self .menu , False , False , 0 )
@@ -51,8 +52,17 @@ def main(self):
5152 if "Warning: CPU turbo is not available" not in get_stats ():
5253 self .vbox_right .pack_start (CPUTurboOverride (), False , False , 0 )
5354
54- self .cpufreqstats = CPUFreqStatsLabel ()
55- self .vbox_right .pack_start (self .cpufreqstats , False , False , 0 )
55+ self .batteryinfo = BatteryInfoBox ()
56+ self .vbox_right .pack_start (self .batteryinfo , False , False , 0 )
57+
58+ self .cpufreqscaling = CPUFreqScalingBox ()
59+ self .vbox_right .pack_start (self .cpufreqscaling , False , False , 0 )
60+
61+ self .systemstats_box = SystemStatisticsBox ()
62+ self .vbox_right .pack_start (self .systemstats_box , False , False , 0 )
63+
64+ if bluetoothctl_exists :
65+ self .vbox_right .pack_start (BluetoothBootControl (), False , False , 0 )
5666
5767 self .hbox .pack_start (self .vbox_right , False , False , 0 )
5868
@@ -121,4 +131,6 @@ def refresh_in_thread(self):
121131 def _refresh (self ):
122132 self .systemstats .refresh ()
123133 self .currentgovernor .refresh ()
124- self .cpufreqstats .refresh ()
134+ self .batteryinfo .refresh ()
135+ self .cpufreqscaling .refresh ()
136+ self .systemstats_box .refresh ()
0 commit comments