diff options
Diffstat (limited to 'Scripts')
-rw-r--r-- | Scripts/mayHem.py | 30 | ||||
-rw-r--r-- | Scripts/overleafUp.sh | 4 | ||||
-rw-r--r-- | Scripts/pythonSocket.py | 23 | ||||
-rwxr-xr-x | Scripts/volume-change.py | 2 | ||||
-rw-r--r-- | Scripts/whileUdDown.sh | 12 |
5 files changed, 71 insertions, 0 deletions
diff --git a/Scripts/mayHem.py b/Scripts/mayHem.py new file mode 100644 index 0000000..6ac90d6 --- /dev/null +++ b/Scripts/mayHem.py @@ -0,0 +1,30 @@ +import os +import tkinter as tk +import time +root = tk.Tk() +root.withdraw() + +control_c_sequence = '''keydown Shift_L; +key Left; +keyup Shift_L; +keydown Control_L; +key x; +keyup Control_L +''' + +left = 'key Left' +right = 'key Right' + +def keypress(sequence): + #print(sequence.replace('\n', '')) + for item in sequence.replace('\n', '').split(';'): + print("xdotool " + item) + os.system("xdotool " + item) + + +keypress(right) +while(True): + keypress(control_c_sequence) + keypress("keydown Shift_L key " + root.clipboard_get() + " keyup Shift_L") + keypress(right) + keypress(right) diff --git a/Scripts/overleafUp.sh b/Scripts/overleafUp.sh new file mode 100644 index 0000000..59f4355 --- /dev/null +++ b/Scripts/overleafUp.sh @@ -0,0 +1,4 @@ +cd /home/julian/Dokumenter/overleaf/fysikCirkelBevægelse + +git pull +pdflatex main.tex diff --git a/Scripts/pythonSocket.py b/Scripts/pythonSocket.py new file mode 100644 index 0000000..06c434b --- /dev/null +++ b/Scripts/pythonSocket.py @@ -0,0 +1,23 @@ +import socket +sock = socket.socket() + +server_addr = ('192.168.43.86', 5001) +sock.bind(server_addr) + +sock.listen(1) +print("Waiting for connection on " + str(server_addr)) +while True: + connection, client_address = sock.accept() + try: + print ('connection from', client_address) + + # Receive the data in small chunks and retransmit it + while True: + data = connection.recv(16) + print('received ' ,data) + if not data: + print('no more data from', client_address) + break + finally: + # Clean up the connection + connection.close()
\ No newline at end of file diff --git a/Scripts/volume-change.py b/Scripts/volume-change.py index 64d578a..d279ce6 100755 --- a/Scripts/volume-change.py +++ b/Scripts/volume-change.py @@ -8,6 +8,8 @@ # # Requires: python3 and python-dbus (on Arch) or python3-dbus # (on Debian) or equivalent +# +# Git link: https://github.com/garrett92895/gnome-volume-step-osd import dbus import sys from subprocess import getoutput diff --git a/Scripts/whileUdDown.sh b/Scripts/whileUdDown.sh new file mode 100644 index 0000000..2ca8f07 --- /dev/null +++ b/Scripts/whileUdDown.sh @@ -0,0 +1,12 @@ +C=1 +RED=$(curl -Ls -o /dev/null -w %{url_effective} http://uddataplus.dk) +echo "$C $RED" +COM="https://www.uddata.dk/uddataplus-nede/" +while [ "$RED" == "$COM" ] +do + C=$((C+1)) + RED=$(curl -Ls -o /dev/null -w %{url_effective} http://uddataplus.dk) + echo "$C $RED" + sleep 30 +done +notify-send 'Yo!' 'Uddata virker måske igen' --icon=dialog-information |