Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3988ff7

Browse files
committed
refactor(config): remove hide_taskbar option and related functionality
- hide_taskbar is not part of the YASB anymore. There was a many issues with it and it was not working as expected.
1 parent6f2590c commit3988ff7

File tree

4 files changed

+3
-37
lines changed

4 files changed

+3
-37
lines changed

‎docs/Configuration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ All valid options for the widgets are listed on the widgets page.
1515
|`watch_stylesheet`| boolean|`true`| Reload bar when style is changed.|
1616
|`watch_config`| boolean|`true`| Reload bar when config is changed.|
1717
|`debug`| boolean|`false`| Enable debug mode to see more logs|
18-
|`hide_taskbar`| boolean|`false`| Hide Windows taskbar from all screens. Note: for better performance set taskbar auto-hide.|
1918
|`env_file`| string|`None`| Load environment variables from file.|
2019

2120

‎src/core/utils/win32/windows.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
importctypes.wintypes
22
fromcore.event_enumsimportEvent
3-
importlogging
43

54
user32=ctypes.windll.user32
65
user32.SetWinEventHook.restype=ctypes.wintypes.HANDLE
@@ -19,7 +18,6 @@
1918
ctypes.wintypes.DWORD
2019
)
2120

22-
2321
classWinEvent(Event):
2422
"""
2523
Win32user Event Constants
@@ -101,22 +99,4 @@ class WinEvent(Event):
10199
EventUIAEventIdStart=0x4E00
102100
EventUIAEventIdEnd=0x4EFF
103101
EventUIAPropIdStart=0x7500
104-
EventUIAPropIdEnd=0x75FF
105-
106-
107-
classWindowsTaskbar:
108-
@staticmethod
109-
defhide(state,debug):
110-
SW_SHOWNORMAL=1
111-
SW_HIDE=0
112-
user32=ctypes.WinDLL('user32',use_last_error=True)
113-
try:
114-
forclass_namein ["Shell_TrayWnd","Shell_SecondaryTrayWnd"]:
115-
taskbar=user32.FindWindowW(class_name,None)
116-
iftaskbar:
117-
user32.ShowWindow(taskbar,SW_HIDEifstateelseSW_SHOWNORMAL)
118-
ifdebug:
119-
logging.info(f"Taskbar{taskbar} found and{'hide'ifstateelse'restore'}.")
120-
exceptExceptionase:
121-
ifdebug:
122-
logging.error(f"Failed to hide taskbar:{e}")
102+
EventUIAPropIdEnd=0x75FF

‎src/core/validation/config.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
'required':False,
2121
'default':None,
2222
},
23-
'hide_taskbar': {
24-
'type':'boolean',
25-
'default':False,
26-
'required':False,
27-
},
2823
'komorebi': {
2924
'type':'dict',
3025
'schema': {

‎src/main.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@
1313
importsettings
1414
importctypes
1515
importctypes.wintypes
16-
fromcore.utils.win32.windowsimportWindowsTaskbar
1716
fromdotenvimportload_dotenv
1817

1918
logging.getLogger('asyncio').setLevel(logging.WARNING)
2019

2120
defmain():
2221
config,stylesheet=get_config_and_stylesheet()
23-
globalhide_taskbar
24-
hide_taskbar=config['hide_taskbar']
25-
22+
2623
ifconfig['debug']:
2724
settings.DEBUG=True
2825
logging.info("Debug mode enabled.")
@@ -61,22 +58,17 @@ def stop_observer():
6158
ifobserver:
6259
observer.stop()
6360
observer.join()
64-
ifhide_taskbar:
65-
WindowsTaskbar.hide(False,settings.DEBUG)
61+
6662
app.aboutToQuit.connect(stop_observer)
6763

6864
withloop:
69-
ifhide_taskbar:
70-
WindowsTaskbar.hide(True,settings.DEBUG)
7165
loop.run_forever()
7266

7367

7468
if__name__=="__main__":
7569
init_logger()
7670
base_excepthook=sys.excepthook
7771
defexception_hook(exctype,value,traceback):
78-
ifhide_taskbar:
79-
WindowsTaskbar.hide(False,settings.DEBUG)
8072
EventService().clear()
8173
logging.error("Unhandled exception",exc_info=value)
8274
sys.exit(1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp