diff --git a/.config/hypr/config/programs.conf b/.config/hypr/config/programs.conf index 94ba7d7..aaa4ce2 100644 --- a/.config/hypr/config/programs.conf +++ b/.config/hypr/config/programs.conf @@ -17,7 +17,7 @@ exec-once = [workspace 6 silent] $spotify exec-once = xrandr --output DP-3 --primary exec-once = XDG_MENU_PREFIX=arch- kbuildsycoca6 -exec-once = sleep 2 & waybar & +exec-once = sleep 2 && waybar & exec-once = hyprpaper exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dunst diff --git a/.config/hypr/games.py b/.config/hypr/games.py index 6158b5e..c1dae41 100644 --- a/.config/hypr/games.py +++ b/.config/hypr/games.py @@ -1,27 +1,47 @@ games = [ - "Stardew Valley", - "steam_app_.*", - ("ffxiv*", "sf"), - "Hollow Knight", + ("all", "Stardew Valley"), + ("initialclass", "steam_app_.*", "tile", "max"), + ("all", "ffxiv*", "sf"), + ("all", "Hollow Knight"), + ("all", "HELLDIVERS*") ] def main(): f = open("config/games.conf", "w") conf: str = "# Auto generated window rules for Games\n\n" for game in games: - if type(game) is tuple: - name = game[0] - for setting in game[1::]: - match setting: - case "sf": - conf += f"windowrulev2 = stayfocused, class:({name}), title:({name})\n" - else: - name = game + if type(game) is not tuple: + continue - conf += f"""windowrulev2 = fullscreen, class:({name}), title:({name}) -windowrulev2 = monitor DP-3, class:({name}), title:({name}) -windowrulev2 = forceinput, class:({name}), title:({name}) + name = game[1] + match game[0]: + case "initialclass": + selector = f"initialclass:({name})" + case "title": + selector = f"title:({name})" + case "class": + selector = f"class:({name})" + case "all": + selector = f"title:({name}), class:({name})" + case s: + print(f"Could not find selector for \"{s}\"") + continue + for setting in game[2::]: + match setting: + case "sf": + conf += f"windowrulev2 = stayfocused, {selector}\n" + case "tile": + conf += f"windowrulev2 = tile, {selector}\n" + case "max": + conf += f"windowrulev2 = maximize, {selector}\n" + case s: + print(f"Could not find setting \"{s}\"") + + + conf += f"""windowrulev2 = fullscreen, {selector} +windowrulev2 = monitor DP-3, {selector} +windowrulev2 = forceinput, {selector}\n """ f.write(conf) f.close()