diff --git a/auto_cpufreq/gui/app.py b/auto_cpufreq/gui/app.py index 6f0c81c..635cd9b 100644 --- a/auto_cpufreq/gui/app.py +++ b/auto_cpufreq/gui/app.py @@ -39,7 +39,7 @@ class ToolWindow(Gtk.Window): self.hbox.pack_start(self.systemstats, False, False, 0) self.add(self.hbox) - self.vbox_right = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=20) + self.vbox_right = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=52) self.menu = DropDownMenu(self) self.hbox.pack_end(self.menu, False, False, 0) @@ -79,9 +79,3 @@ class ToolWindow(Gtk.Window): self.cpufreqstats.refresh() return True - -win = ToolWindow() -win.connect("destroy", Gtk.main_quit) -win.show_all() -GLib.set_application_name("auto-cpufreq") -Gtk.main() \ No newline at end of file diff --git a/bin/auto-cpufreq-gtk b/bin/auto-cpufreq-gtk new file mode 100644 index 0000000..17f757d --- /dev/null +++ b/bin/auto-cpufreq-gtk @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import sys + +sys.path.append("../") + +import gi +gi.require_version("Gtk", "3.0") + +from gi.repository import Gtk, GLib +from auto_cpufreq.gui.app import ToolWindow + +if __name__ == "__main__": + win = ToolWindow() + win.connect("destroy", Gtk.main_quit) + win.show_all() + GLib.set_prgname("auto-cpufreq") + Gtk.main() \ No newline at end of file diff --git a/scripts/start_app b/scripts/start_app index a532e93..02c1fbc 100644 --- a/scripts/start_app +++ b/scripts/start_app @@ -3,7 +3,7 @@ # load python virtual environment venv_dir=/opt/auto-cpufreq/venv . "${venv_dir}/bin/activate" -python_command="${venv_dir}/bin/python ${venv_dir}/bin/app.py" +python_command="${venv_dir}/bin/python ${venv_dir}/bin/auto-cpufreq-gtk" # if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then # # necessary for running on wayland