mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2025-12-06 06:36:10 +00:00
Jai MERGE TOUT SEUL
This commit is contained in:
4
trick.py
4
trick.py
@@ -33,11 +33,13 @@ class Trick(ABC):
|
||||
from tricks.glorify_goose import GlorifyGooseTrick
|
||||
from tricks.anim_ascii import AnimAsciiTrick
|
||||
from tricks.reflection import ReflectionTrick
|
||||
from tricks.rotation import RotationTrick
|
||||
tricks = [
|
||||
LaughingGooseTrick,
|
||||
GlorifyGooseTrick,
|
||||
AnimAsciiTrick,
|
||||
ReflectionTrick
|
||||
ReflectionTrick,
|
||||
RotationTrick
|
||||
]
|
||||
|
||||
return random.choice(tricks)()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import time
|
||||
import os
|
||||
import random
|
||||
|
||||
from trick import Trick
|
||||
from command_helper import CommandHelper
|
||||
|
||||
|
||||
class ReflectionTrick(Trick):
|
||||
@@ -22,6 +22,7 @@ class ReflectionTrick(Trick):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
os.system("xrandr --output $(xrandr -q | grep ' connected' | cut -f 1 -d ' ' | cut -f 1 -d '\n') --reflect x")
|
||||
selected = random.choice(["x", "y", "xy"])
|
||||
os.system(f"xrandr --output $(xrandr -q | grep ' connected' | cut -f 1 -d ' ' | cut -f 1 -d '\n') --reflect {selected}")
|
||||
time.sleep(5)
|
||||
os.system("xrandr --output $(xrandr -q | grep ' connected' | cut -f 1 -d ' ' | cut -f 1 -d '\n') --reflect normal")
|
||||
|
||||
26
tricks/rotation.py
Normal file
26
tricks/rotation.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import time
|
||||
import os
|
||||
|
||||
from trick import Trick
|
||||
|
||||
|
||||
class RotationTrick(Trick):
|
||||
@property
|
||||
def name(self):
|
||||
return "Rotation"
|
||||
|
||||
@property
|
||||
def delay(self):
|
||||
return 5
|
||||
|
||||
@property
|
||||
def is_reversible(self):
|
||||
return False
|
||||
|
||||
def revert(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
os.system("xrandr --output $(xrandr -q | grep ' connected' | cut -f 1 -d ' ' | cut -f 1 -d '\n') --rotation inverted")
|
||||
time.sleep(5)
|
||||
os.system("xrandr --output $(xrandr -q | grep ' connected' | cut -f 1 -d ' ' | cut -f 1 -d '\n') --rotation normal")
|
||||
Reference in New Issue
Block a user