fixes to work on other Wayland compositors

This commit is contained in:
Piotr Miller
2021-03-11 11:02:13 +01:00
parent 1a89acf2f8
commit 8da5850c5d
2 changed files with 7 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GLib
from nwg_panel.tools import get_config_dir, load_json, save_json, load_string, list_outputs, check_key, list_configs, \
local_dir, create_pixbuf, update_image, is_command
local_dir, create_pixbuf, update_image, is_command, check_commands
from nwg_panel.__about__ import __version__
@@ -21,7 +21,7 @@ config_dir = get_config_dir()
configs = {}
editor = None
selector_window = None
outputs = list_outputs(sway=sway)
outputs = None
SKELETON_PANEL: dict = {
"name": "",
@@ -2007,6 +2007,10 @@ def main():
GLib.set_prgname('nwg-panel-config')
check_commands()
global outputs
outputs = list_outputs(sway=sway)
global selector_window
selector_window = PanelSelector()

View File

@@ -223,7 +223,7 @@ def main():
copy_executors(os.path.join(dir_name, "executors"), os.path.join(common.config_dir, "executors"))
copy_files(os.path.join(dir_name, "config"), common.config_dir, args.restore)
tree = common.i3.get_tree()
tree = common.i3.get_tree() if sway else None
common.outputs = list_outputs(sway=sway, tree=tree)
panels = load_json(config_file)