Update games for more options, try fix waybar
This commit is contained in:
@@ -17,7 +17,7 @@ exec-once = [workspace 6 silent] $spotify
|
|||||||
|
|
||||||
exec-once = xrandr --output DP-3 --primary
|
exec-once = xrandr --output DP-3 --primary
|
||||||
exec-once = XDG_MENU_PREFIX=arch- kbuildsycoca6
|
exec-once = XDG_MENU_PREFIX=arch- kbuildsycoca6
|
||||||
exec-once = sleep 2 & waybar &
|
exec-once = sleep 2 && waybar &
|
||||||
exec-once = hyprpaper
|
exec-once = hyprpaper
|
||||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
exec-once = dunst
|
exec-once = dunst
|
||||||
|
|||||||
@@ -1,27 +1,47 @@
|
|||||||
games = [
|
games = [
|
||||||
"Stardew Valley",
|
("all", "Stardew Valley"),
|
||||||
"steam_app_.*",
|
("initialclass", "steam_app_.*", "tile", "max"),
|
||||||
("ffxiv*", "sf"),
|
("all", "ffxiv*", "sf"),
|
||||||
"Hollow Knight",
|
("all", "Hollow Knight"),
|
||||||
|
("all", "HELLDIVERS*")
|
||||||
]
|
]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
f = open("config/games.conf", "w")
|
f = open("config/games.conf", "w")
|
||||||
conf: str = "# Auto generated window rules for Games\n\n"
|
conf: str = "# Auto generated window rules for Games\n\n"
|
||||||
for game in games:
|
for game in games:
|
||||||
if type(game) is tuple:
|
if type(game) is not tuple:
|
||||||
name = game[0]
|
continue
|
||||||
for setting in game[1::]:
|
|
||||||
match setting:
|
|
||||||
case "sf":
|
|
||||||
conf += f"windowrulev2 = stayfocused, class:({name}), title:({name})\n"
|
|
||||||
else:
|
|
||||||
name = game
|
|
||||||
|
|
||||||
conf += f"""windowrulev2 = fullscreen, class:({name}), title:({name})
|
name = game[1]
|
||||||
windowrulev2 = monitor DP-3, class:({name}), title:({name})
|
match game[0]:
|
||||||
windowrulev2 = forceinput, class:({name}), title:({name})
|
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.write(conf)
|
||||||
f.close()
|
f.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user