Fix.
This commit is contained in:
parent
df32a93912
commit
72733caa7b
1 changed files with 5 additions and 5 deletions
10
setsysmode
10
setsysmode
|
@ -68,15 +68,15 @@ def notify_tablet_mode():
|
|||
def toggle_mode(notify):
|
||||
"""Toggles between laptop and tablet mode."""
|
||||
|
||||
if systemctl('status', LAPTOP_MODE_SERVICE):
|
||||
systemctl('stop', LAPTOP_MODE_SERVICE, root=True)
|
||||
systemctl('start', TABLET_MODE_SERVICE, root=True)
|
||||
if systemctl('status', TABLET_MODE_SERVICE):
|
||||
systemctl('stop', TABLET_MODE_SERVICE, root=True)
|
||||
systemctl('start', LAPTOP_MODE_SERVICE, root=True)
|
||||
|
||||
if notify:
|
||||
notify_tablet_mode()
|
||||
else:
|
||||
systemctl('stop', TABLET_MODE_SERVICE, root=True)
|
||||
systemctl('start', LAPTOP_MODE_SERVICE, root=True)
|
||||
systemctl('stop', LAPTOP_MODE_SERVICE, root=True)
|
||||
systemctl('start', TABLET_MODE_SERVICE, root=True)
|
||||
|
||||
if notify:
|
||||
notify_laptop_mode()
|
||||
|
|
Loading…
Reference in a new issue