example removal, fstring additions
This commit is contained in:
parent
2a08d48f4c
commit
14c601be0a
@ -1,27 +0,0 @@
|
||||
from shellfm.windows.controller import WindowController
|
||||
|
||||
|
||||
def main():
|
||||
print("\n\n-------------------------------------------\n\n")
|
||||
window_controller = WindowController()
|
||||
|
||||
# Create "File Window" 1
|
||||
window = window_controller.create_window()
|
||||
window.set_nickname("Win1")
|
||||
window_controller.add_tab_for_window_by_nickname(window.get_nickname())
|
||||
|
||||
# Create "File Window" 2
|
||||
window2 = window_controller.create_window()
|
||||
window2.set_nickname("Win2")
|
||||
window_controller.add_tab_for_window_by_nickname(window2.get_nickname())
|
||||
|
||||
window_controller.list_windows()
|
||||
|
||||
|
||||
print("\n\n-------------------------------------------\n\n")
|
||||
window2.set_is_hidden(True)
|
||||
window_controller.list_windows()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -17,8 +17,8 @@ def threaded(fn):
|
||||
class WindowController:
|
||||
def __init__(self):
|
||||
USER_HOME = path.expanduser('~')
|
||||
CONFIG_PATH = USER_HOME + "/.config/solarfm"
|
||||
self._session_file = CONFIG_PATH + "/session.json"
|
||||
CONFIG_PATH = f"{USER_HOME}/.config/solarfm"
|
||||
self._session_file = f"{CONFIG_PATH}/session.json"
|
||||
|
||||
self._event_sleep_time = 1
|
||||
self._active_window_id = ""
|
||||
@ -35,7 +35,7 @@ class WindowController:
|
||||
|
||||
def create_window(self):
|
||||
window = Window()
|
||||
window.set_nickname(f"window_{str(len(self._windows) + 1)}")
|
||||
window.set_nickname(f"window_{len(self._windows) + 1}")
|
||||
self._windows.append(window)
|
||||
return window
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user