summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.Xresources1
-rw-r--r--.config/terminator/config14
-rw-r--r--.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml79
-rw-r--r--.zshrc2
-rwxr-xr-xScripts/Scanner.py31
-rwxr-xr-xScripts/makeGif.py52
-rw-r--r--Scripts/mayHem.py30
-rw-r--r--Scripts/overleafUp.sh4
-rw-r--r--Scripts/pythonSocket.py23
-rwxr-xr-xScripts/volume-change.py2
-rw-r--r--Scripts/whileUdDown.sh12
11 files changed, 159 insertions, 91 deletions
diff --git a/.Xresources b/.Xresources
index b7c7bb1..ba1585f 100644
--- a/.Xresources
+++ b/.Xresources
@@ -36,3 +36,4 @@ URxvt.url-select.video: mpv
URxvt.url-select.button: 1
! Mine farver
+
diff --git a/.config/terminator/config b/.config/terminator/config
index ee580ff..968b85b 100644
--- a/.config/terminator/config
+++ b/.config/terminator/config
@@ -16,26 +16,21 @@
[plugins]
[profiles]
[[default]]
- antialias = False
background_color = "#102313"
- background_darkness = 0.86
- background_image = None
+ background_darkness = 0.92
background_type = transparent
cursor_color = "#ffffff"
custom_command = TERM=xterm-256color tmux
- font = Terminus 10
+ font = xos4 Terminus 10
foreground_color = "#ffffff"
palette = "#050505:#b81109:#1cb228:#baa407:#2c5fad:#e35682:#16a085:#ffffff:#1c1b19:#e8160c:#24e534:#fcdf09:#408afc:#e02c6d:#1abc9c:#ebe3e3"
- scroll_on_output = False
scrollback_infinite = True
scrollbar_position = hidden
show_titlebar = False
use_system_font = False
[[Old]]
- antialias = False
background_color = "#100935"
background_darkness = 0.49
- background_image = None
background_type = transparent
custom_command = tmux
font = Terminus 10
@@ -45,10 +40,8 @@
show_titlebar = False
use_system_font = False
[[auto]]
- antialias = False
background_color = "#032c36"
background_darkness = 0.82
- background_image = None
background_type = transparent
font = Terminus 10
foreground_color = "#e8dfd6"
@@ -57,10 +50,8 @@
show_titlebar = False
use_system_font = False
[[custom]]
- antialias = False
background_color = "#032c36"
background_darkness = 0.77
- background_image = None
background_type = transparent
cursor_color = "#e8dfd6"
font = Terminus 12
@@ -71,7 +62,6 @@
use_system_font = False
[[souceror]]
background_color = "#151515"
- background_image = None
cursor_color = "#c2c2b0"
foreground_color = "#c2c2b0"
palette = "#151515:#aa4450:#719611:#ff9800:#6688aa:#8f6f8f:#528b8b:#d3d3d3:#272822:#ff6a6a:#b1d631:#87875f:#90b0d1:#8181a6:#87ceeb:#c1cdc1"
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
deleted file mode 100644
index 3c99b12..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<channel name="xfce4-panel" version="1.0">
- <property name="configver" type="int" value="2"/>
- <property name="panels" type="array">
- <value type="int" value="1"/>
- <property name="panel-1" type="empty">
- <property name="position" type="string" value="p=8;x=683;y=752"/>
- <property name="length" type="uint" value="100"/>
- <property name="position-locked" type="bool" value="true"/>
- <property name="size" type="uint" value="24"/>
- <property name="plugin-ids" type="array">
- <value type="int" value="1"/>
- <value type="int" value="8"/>
- <value type="int" value="3"/>
- <value type="int" value="15"/>
- <value type="int" value="4"/>
- <value type="int" value="7"/>
- <value type="int" value="6"/>
- <value type="int" value="11"/>
- <value type="int" value="5"/>
- </property>
- <property name="enter-opacity" type="uint" value="100"/>
- <property name="leave-opacity" type="uint" value="100"/>
- <property name="background-alpha" type="uint" value="57"/>
- <property name="background-style" type="uint" value="0"/>
- <property name="mode" type="uint" value="0"/>
- <property name="background-color" type="array">
- <value type="uint" value="65535"/>
- <value type="uint" value="65535"/>
- <value type="uint" value="65535"/>
- <value type="uint" value="65535"/>
- </property>
- <property name="nrows" type="uint" value="1"/>
- </property>
- </property>
- <property name="plugins" type="empty">
- <property name="plugin-3" type="string" value="tasklist"/>
- <property name="plugin-15" type="string" value="separator">
- <property name="expand" type="bool" value="true"/>
- <property name="style" type="uint" value="0"/>
- </property>
- <property name="plugin-5" type="string" value="clock">
- <property name="mode" type="uint" value="2"/>
- </property>
- <property name="plugin-6" type="string" value="systray">
- <property name="names-visible" type="array">
- <value type="string" value="cutegram"/>
- <value type="string" value="screenkey"/>
- <value type="string" value="pamac-tray"/>
- <value type="string" value="solaar"/>
- <value type="string" value="xfce4-power-manager"/>
- <value type="string" value="gpick"/>
- <value type="string" value="panelprogram til netværkhåndtering"/>
- <value type="string" value="telegram"/>
- </property>
- <property name="show-frame" type="bool" value="false"/>
- </property>
- <property name="plugin-8" type="string" value="launcher">
- <property name="items" type="array">
- <value type="string" value="14809329991.desktop"/>
- </property>
- </property>
- <property name="plugin-11" type="string" value="pulseaudio">
- <property name="enable-keyboard-shortcuts" type="bool" value="true"/>
- </property>
- <property name="plugin-1" type="string" value="applicationsmenu">
- <property name="button-icon" type="string" value="app-launcher"/>
- <property name="show-button-title" type="bool" value="false"/>
- </property>
- <property name="plugin-4" type="string" value="directorymenu">
- <property name="base-directory" type="string" value="/home/julian/Dropbox/Skole"/>
- </property>
- <property name="plugin-7" type="string" value="pager">
- <property name="rows" type="uint" value="2"/>
- <property name="miniature-view" type="bool" value="true"/>
- </property>
- </property>
-</channel>
diff --git a/.zshrc b/.zshrc
index 130993e..ec87098 100644
--- a/.zshrc
+++ b/.zshrc
@@ -93,6 +93,7 @@ alias lemon="~/.config/openbox/lemonbar | lemonbar -g 1355x20+5+5 -f terminus-9"
PATH=/home/julian/Scripts:$PATH
+PATH=/home/julian/.gem/ruby/2.4.0/bin:$PATH
fortune -n 100 computers | cowsay
rex
@@ -103,3 +104,4 @@ fi
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
+alias emacs="emacs -nw"
diff --git a/Scripts/Scanner.py b/Scripts/Scanner.py
new file mode 100755
index 0000000..04538c4
--- /dev/null
+++ b/Scripts/Scanner.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import getch
+import os
+
+page = 0
+
+name = input("Enter name of pdf: ")
+
+while(1):
+ print("Press q for exit, Space for scanning, and d for done")
+ x = getch.getch()
+ if(x == 'q'):
+ exit()
+ elif(x == ' '):
+ print("Starting scan of page " + str(page+1))
+ os.system("scanimage --device genesys:libusb:001:004 --format=tiff > scan" + str(page) + ".tiff")
+ page += 1
+ print("Scan done")
+ elif(x == 'd'):
+ print("Collecting tiff pages")
+ os.system("tiffcp scan*.tiff magazine.tiff");
+ print("Making pdf file")
+ os.system("convert magazine.tiff '" + name + ".pdf'")
+ print("Removing tiffs")
+ os.system("rm *.tiff")
+ print("Done resetting vars")
+ page = 0
+ name = input("Enter name of pdf: ")
+
+
diff --git a/Scripts/makeGif.py b/Scripts/makeGif.py
new file mode 100755
index 0000000..5a5ac98
--- /dev/null
+++ b/Scripts/makeGif.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+import sys
+import argparse
+import os
+
+parser = argparse.ArgumentParser()
+parser.add_argument('-s', '--start',
+ required=False,
+ type=int,
+ default=0,
+ dest="start",
+ help="Time to start gif at. [0]" )
+parser.add_argument('-l', '--lenght',
+ required=True,
+ type=int,
+ dest="lenght",
+ help="Lenght of gif in seconds" )
+parser.add_argument('-i', '--infile',
+ required=True,
+ type=str,
+ dest="infile",
+ help="Movie to convert" )
+parser.add_argument('-o', '--outfile',
+ required=False,
+ type=str,
+ default="output.gif",
+ dest="outfile",
+ help="Output gif name. [output.gif]")
+parser.add_argument('-f', '--fps',
+ required=False,
+ type=int,
+ default=10,
+ dest="fps",
+ help="Frames per second. [10]")
+parser.add_argument('-r', '--resolution',
+ required=False,
+ type=int,
+ default=320,
+ dest="res",
+ help="Resolution. [320]")
+args = parser.parse_args()
+
+
+os.system("ffmpeg -y -ss " + str(args.start) + " -t " + str(args.lenght) + " -i '" + args.infile + "' -vf fps=" + str(args.fps) + ",scale=" + str(args.res) + ":-1:flags=lanczos,palettegen palette.png")
+
+string = 'fps=' + str(args.fps) + ',scale=' + str(args.res) + ':-1:flags=lanczos[x];[x][1:v]paletteuse'
+
+os.system('ffmpeg -ss ' + str(args.start) + ' -t ' + str(args.lenght) + ' -i "' + args.infile + '" -i palette.png -filter_complex "' + string + '" "' + args.outfile + '"')
+
+os.remove("palette.png")
+
+print("\n\nDONE - your file " + args.outfile + " is ready. Have a nice day :-D")
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