Update hypr conf

This commit is contained in:
2026-01-06 11:03:50 +01:00
parent 714fcbb6a0
commit d613c14cd9
3 changed files with 19 additions and 16 deletions

View File

@@ -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)]