create file in /bin for gui

This commit is contained in:
shadeyg56 2023-08-12 17:09:53 -05:00
parent 2802ebad4a
commit 864d0c3b25
3 changed files with 20 additions and 8 deletions

View File

@ -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()

18
bin/auto-cpufreq-gtk Normal file
View File

@ -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()

View File

@ -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