Unneeded stuff removed
This commit is contained in:
@@ -4,7 +4,6 @@ from i3ipc import Connection
|
|||||||
|
|
||||||
i3 = Connection()
|
i3 = Connection()
|
||||||
ipc_data = None
|
ipc_data = None
|
||||||
controls_list = []
|
|
||||||
|
|
||||||
outputs = {}
|
outputs = {}
|
||||||
taskbars_list = []
|
taskbars_list = []
|
||||||
|
@@ -44,9 +44,6 @@ def check_tree():
|
|||||||
if tree.ipc_data != common.ipc_data:
|
if tree.ipc_data != common.ipc_data:
|
||||||
for item in common.taskbars_list:
|
for item in common.taskbars_list:
|
||||||
item.refresh()
|
item.refresh()
|
||||||
"""for item in common.controls_list:
|
|
||||||
if item.popup_window.get_visible():
|
|
||||||
item.popup_window.hide()"""
|
|
||||||
|
|
||||||
common.ipc_data = common.i3.get_tree().ipc_data
|
common.ipc_data = common.i3.get_tree().ipc_data
|
||||||
|
|
||||||
@@ -113,8 +110,8 @@ def main():
|
|||||||
if os.path.isfile(pid_file):
|
if os.path.isfile(pid_file):
|
||||||
try:
|
try:
|
||||||
pid = int(load_text_file(pid_file))
|
pid = int(load_text_file(pid_file))
|
||||||
print("Running instace found, killing {}".format(pid))
|
|
||||||
os.kill(pid, signal.SIGINT)
|
os.kill(pid, signal.SIGINT)
|
||||||
|
print("Running instance killed: {}".format(pid))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -178,7 +175,6 @@ def main():
|
|||||||
inner_box.pack_start(left_box, False, True, 0)
|
inner_box.pack_start(left_box, False, True, 0)
|
||||||
if panel["controls"] and panel["controls-settings"]["alignment"] == "left":
|
if panel["controls"] and panel["controls-settings"]["alignment"] == "left":
|
||||||
cc = Controls(panel["controls-settings"], panel["position"], panel["controls-settings"]["alignment"], int(w/6))
|
cc = Controls(panel["controls-settings"], panel["position"], panel["controls-settings"]["alignment"], int(w/6))
|
||||||
common.controls_list.append(cc)
|
|
||||||
left_box.pack_start(cc, False, False, 0)
|
left_box.pack_start(cc, False, False, 0)
|
||||||
instantiate_content(panel, left_box, panel["modules-left"])
|
instantiate_content(panel, left_box, panel["modules-left"])
|
||||||
|
|
||||||
@@ -195,7 +191,6 @@ def main():
|
|||||||
|
|
||||||
if panel["controls"] and panel["controls-settings"]["alignment"] == "right":
|
if panel["controls"] and panel["controls-settings"]["alignment"] == "right":
|
||||||
cc = Controls(panel["controls-settings"], panel["position"], panel["controls-settings"]["alignment"], int(w/6))
|
cc = Controls(panel["controls-settings"], panel["position"], panel["controls-settings"]["alignment"], int(w/6))
|
||||||
common.controls_list.append(cc)
|
|
||||||
right_box.pack_end(cc, False, False, 0)
|
right_box.pack_end(cc, False, False, 0)
|
||||||
|
|
||||||
window.add(vbox)
|
window.add(vbox)
|
||||||
|
@@ -68,7 +68,8 @@ class Controls(Gtk.EventBox):
|
|||||||
|
|
||||||
self.build_box()
|
self.build_box()
|
||||||
self.refresh()
|
self.refresh()
|
||||||
self.refresh_bat()
|
if "battery" in settings["components"]:
|
||||||
|
self.refresh_bat()
|
||||||
|
|
||||||
if settings["interval"] > 0:
|
if settings["interval"] > 0:
|
||||||
Gdk.threads_add_timeout_seconds(GLib.PRIORITY_LOW, settings["interval"], self.refresh)
|
Gdk.threads_add_timeout_seconds(GLib.PRIORITY_LOW, settings["interval"], self.refresh)
|
||||||
|
Reference in New Issue
Block a user