Update hypr conf
This commit is contained in:
12
hyprscript
12
hyprscript
@@ -138,12 +138,12 @@ class Workspace:
|
||||
"""
|
||||
new_id = (self.id - 1) // 10 * 10 + n
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
current = monitor.special_workspace
|
||||
if current is not None:
|
||||
subprocess.run(['hyprctl', 'dispatch', 'togglespecialworkspace', current.special_name()])
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
def previous(self, monitor: Monitor, move: bool = False):
|
||||
"""
|
||||
Goes to the previous workspace on the same monitor, or the last if we're on the first.
|
||||
@@ -157,12 +157,12 @@ class Workspace:
|
||||
if new_id % 10 == 0:
|
||||
new_id += 10
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
current = monitor.special_workspace
|
||||
if current is not None:
|
||||
subprocess.run(['hyprctl', 'dispatch', 'togglespecialworkspace', current.special_name()])
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
def next(self, monitor: Monitor, move: bool = False):
|
||||
"""
|
||||
Goes to the next workspace on the same monitor, or the first if we're on the last.
|
||||
@@ -176,12 +176,12 @@ class Workspace:
|
||||
if new_id % 10 == 1:
|
||||
new_id -= 10
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
current = monitor.special_workspace
|
||||
if current is not None:
|
||||
subprocess.run(['hyprctl', 'dispatch', 'togglespecialworkspace', current.special_name()])
|
||||
|
||||
subprocess.run(['hyprctl', 'dispatch', 'movetoworkspace' if move else 'workspace', str(new_id)])
|
||||
|
||||
|
||||
def to_bar(x):
|
||||
return bars[round((len(bars) - 1) * x / 100)]
|
||||
|
||||
Reference in New Issue
Block a user