mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-29 16:44:49 +02:00
create file in /bin for gui
This commit is contained in:
parent
2802ebad4a
commit
864d0c3b25
@ -39,7 +39,7 @@ class ToolWindow(Gtk.Window):
|
|||||||
self.hbox.pack_start(self.systemstats, False, False, 0)
|
self.hbox.pack_start(self.systemstats, False, False, 0)
|
||||||
self.add(self.hbox)
|
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.menu = DropDownMenu(self)
|
||||||
self.hbox.pack_end(self.menu, False, False, 0)
|
self.hbox.pack_end(self.menu, False, False, 0)
|
||||||
@ -79,9 +79,3 @@ class ToolWindow(Gtk.Window):
|
|||||||
self.cpufreqstats.refresh()
|
self.cpufreqstats.refresh()
|
||||||
return True
|
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
18
bin/auto-cpufreq-gtk
Normal 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()
|
@ -3,7 +3,7 @@
|
|||||||
# load python virtual environment
|
# load python virtual environment
|
||||||
venv_dir=/opt/auto-cpufreq/venv
|
venv_dir=/opt/auto-cpufreq/venv
|
||||||
. "${venv_dir}/bin/activate"
|
. "${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
|
# if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
|
||||||
# # necessary for running on wayland
|
# # necessary for running on wayland
|
||||||
|
Loading…
x
Reference in New Issue
Block a user