diff --git a/hyperplane/shared.py.in b/hyperplane/shared.py.in index 969a100..bfffb22 100644 --- a/hyperplane/shared.py.in +++ b/hyperplane/shared.py.in @@ -33,13 +33,18 @@ PROFILE = "@PROFILE@" schema = Gio.Settings.new(APP_ID) state_schema = Gio.Settings.new(APP_ID + ".State") -home_path = Path(GLib.get_user_data_dir(), "hyperplane", "home") -home = Gio.File.new_for_path(str(home_path)) +app = None # pylint: disable=invalid-name +search = "" # pylint: disable=invalid-name +right_clicked_file = None # pylint: disable=invalid-name +undo_queue = {} +grid_view = state_schema.get_boolean("grid-view") show_hidden = state_schema.get_boolean("show-hidden") -tags = [] +home_path = Path(GLib.get_user_data_dir(), "hyperplane", "home") +home = Gio.File.new_for_path(str(home_path)) +tags = [] if (path := home_path / ".hyperplane").is_file(): tags = list( tag for tag in path.read_text(encoding="utf-8").strip().split("\n") if tag @@ -47,12 +52,6 @@ if (path := home_path / ".hyperplane").is_file(): del path -app = None # pylint: disable=invalid-name -search = "" # pylint: disable=invalid-name -right_clicked_file = None # pylint: disable=invalid-name -grid_view = state_schema.get_boolean("grid-view") -undo_queue = {} - postmaster = HypPostmasterGeneral() closed_folder_texture = texture = Gdk.Texture.new_from_resource(