dotfiles/dot_config/hypr/scripts/executable_workspaces
punkfairie a53c7bb844
Add .config/cava/config
Add .config/dunst/dunstrc
Add .config/hypr/component/waybar/config
Add .config/hypr/component/waybar/style.css
Add .config/hypr/autostart
Add .config/hypr/hyprland.conf
Add .config/hypr/scripts/expand_toolbar
Add .config/hypr/scripts/launch_waybar
Add .config/hypr/scripts/lock
Add .config/hypr/scripts/rgb
Add .config/hypr/scripts/rgb_borders
Add .config/hypr/scripts/screenshot
Add .config/hypr/scripts/toolbar_state
Add .config/hypr/scripts/wall
Add .config/hypr/scripts/workspaces
Add .config/hypr/scripts/tools/dynamic
Add .config/hypr/scripts/tools/expand
Add .config/hypr/scripts/tools/notif
Add .config/hypr/scripts/tools/start_dyn
Add .config/hypr/store/dynamic_out.txt
Add .config/hypr/store/latest_notif
Add .config/hypr/store/prev.txt
Add .config/hypr/wallpapers/cloud.png
Add .config/hypr/wallpapers/clouds_realism.jpg
Add .config/hypr/wallpapers/evening-sky.png
Add .config/hypr/wallpapers/flower.jpg
Add .config/hypr/wallpapers/mountain.png
Add .config/hypr/wallpapers/totoro.png
Add .config/hypr/wallpapers/train.jpg
Update .config/packages/archgirlie
Add .config/wofi/config
Add .config/wofi/menu
Add .config/wofi/menu.css
Add .config/wofi/style.css
2024-05-18 14:34:14 -07:00

34 lines
807 B
Python

#!/usr/bin/python
import subprocess
import time
def current_workspace():
active = subprocess.run("hyprctl activewindow".split(), stdout=subprocess.PIPE).stdout.decode("utf-8").strip()
return int(active.split(":")[4].split()[0].strip())
def gen_map(e):
current = current_workspace()
print(f"{current=}")
if e < current:
return [i for i in range(e+1, current, -1)]
elif e > current:
return [i for i in range(current,e+1)]
else:
return [current]
def go_to(e):
print(f"change to {e}")
_map = gen_map(e)
print(f"{_map=}")
t = 0.03*len(_map)
for i in _map:
subprocess.run(f"hyprctl dispatch workspace {i}".split())
time.sleep(t)
if t != 0.01:
t -= 0.03
else:
t -= 0.02
go_to(10)