summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfilter-gcode6
-rwxr-xr-xfirefox-youtube-handler9
l---------git-blamestat1
-rw-r--r--openbox-shutdown.conf6
m---------remotes/falconindy-bin0
-rwxr-xr-xreplace.py17
-rwxr-xr-xscreen-locker.sh2
-rwxr-xr-xset-background.sh5
-rwxr-xr-xslic3r7
-rwxr-xr-xstart-rsyncd.sh34
-rwxr-xr-xvpn-connect10
11 files changed, 91 insertions, 6 deletions
diff --git a/filter-gcode b/filter-gcode
new file mode 100755
index 0000000..e6c4293
--- /dev/null
+++ b/filter-gcode
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+sed -i "$1" \
+ -e '/^M190 S90 ;.*$/d' \
+ -e '/^M104 S220 ;.*$/d' \
+ -e '/^M109 S220 ;.*$/d' \
diff --git a/firefox-youtube-handler b/firefox-youtube-handler
new file mode 100755
index 0000000..b339612
--- /dev/null
+++ b/firefox-youtube-handler
@@ -0,0 +1,9 @@
+#!/bin/bash
+proto='yt://'
+url=$1
+id=${url##$proto}
+#smplayer $(youtube-dl -g ${id})
+
+#urxvt -e bash -c "youtube-viewer -I \"http://youtube.com/watch?v=$id\"; sleep 5"
+smplayer "http://youtube.com/watch?v=$id"
+
diff --git a/git-blamestat b/git-blamestat
new file mode 120000
index 0000000..d20839c
--- /dev/null
+++ b/git-blamestat
@@ -0,0 +1 @@
+remotes/falconindy-bin/git-blamestat \ No newline at end of file
diff --git a/openbox-shutdown.conf b/openbox-shutdown.conf
index eb4350c..bf9e64a 100644
--- a/openbox-shutdown.conf
+++ b/openbox-shutdown.conf
@@ -18,7 +18,7 @@
[reboot]
#command = openbox --exit
-command = sudo shutdown -r now
+command = systemctl reboot
image = /usr/share/icons/hydroxygen/72x72/apps/gnome-session-reboot.png
info_text = Reboot
#label = _Neu starten
@@ -26,7 +26,7 @@ label = None
[shutdown]
#command = openbox --exit
-command = sudo shutdown -h now
+command = systemctl poweroff
image = /usr/share/icons/hydroxygen/72x72/apps/gnome-session-halt.png
info_text = Halt
#label = _Herunterfahren
@@ -34,7 +34,7 @@ label = None
[suspend]
command = screen-locker.sh
-command = sudo pm-suspend
+command = systemctl suspend
image = /usr/share/icons/hydroxygen/72x72/apps/gnome-session-suspend.png
info_text = Suspend2Ram
#label = _Suspend
diff --git a/remotes/falconindy-bin b/remotes/falconindy-bin
-Subproject 5bf3d6db10f439690b23e6ac67a3474dbea747b
+Subproject 242df7b3f1171087e1e74b4e08bd51f1ddcda61
diff --git a/replace.py b/replace.py
new file mode 100755
index 0000000..efa8b54
--- /dev/null
+++ b/replace.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import sys
+
+string_from = sys.argv[1]
+string_to = sys.argv[2]
+files = sys.argv[3:]
+
+for filename in files:
+ f = open(filename, "r+")
+ data = f.read()
+ data = data.replace(string_from, string_to)
+ f.seek(0)
+ f.truncate()
+ f.write(data)
+ f.close()
+
diff --git a/screen-locker.sh b/screen-locker.sh
index efb3dbb..a27557f 100755
--- a/screen-locker.sh
+++ b/screen-locker.sh
@@ -24,6 +24,6 @@ unlock () {
}
#if pidof i3lock &> /dev/null; then exit 1; fi
-if pidof slock &> /dev/null; then exit 1; fi
+if pgrep slock &> /dev/null; then exit 1; fi
(lock && unlock) &
diff --git a/set-background.sh b/set-background.sh
index 8d72476..ea48e05 100755
--- a/set-background.sh
+++ b/set-background.sh
@@ -26,10 +26,11 @@ cd "$(dirname "$1")"
FILE="$(pwd)/$(basename "$1")"
if [ -f "$FILE" ]; then
- echo "feh --bg-tile '${FILE}'" > "$HOME/.fehbg";
+ #echo "feh --bg-tile '${FILE}'" > "$HOME/.fehbg";
+ echo "habak -mS '${FILE}'" > "$HOME/.bg";
#rm "$HOME/backgrounds/current_bg";
#ln -sf "${FILE}" "$HOME/backgrounds/current_bg";
- source $HOME/.fehbg
+ source $HOME/.bg
else
notify-send -t 10000 "Background" "Error: File \"${FILE}\" doesn't exist";
exit 1
diff --git a/slic3r b/slic3r
new file mode 100755
index 0000000..f3e1753
--- /dev/null
+++ b/slic3r
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+for config in "$HOME"/.Slic3r/*/config.ini; do
+ opts+=(--load "$config")
+done
+
+perl "$HOME"/git/Slic3r/slic3r.pl "${opts[@]}" "$@"
diff --git a/start-rsyncd.sh b/start-rsyncd.sh
new file mode 100755
index 0000000..3fa22ee
--- /dev/null
+++ b/start-rsyncd.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+set -e
+
+while :; do
+ port=$RANDOM
+ [[ $port -gt 1024 && $port -lt 65535 ]] && break
+done
+
+tmpdir=$(mktemp -d /tmp/start-rsyncd.sh.XXXXXX)
+
+cleanup() {
+ rm -rf "$tmpdir"
+}
+
+trap cleanup EXIT INT TERM
+
+cat <<EOF >"$tmpdir/rsyncd.conf"
+max connections = 1
+pid file = $tmpdir/pid
+lock file = $tmpdir/lock
+use chroot = no
+log file = /dev/stderr
+read only = true
+port = $port
+uid = $USER
+[share]
+ path = $PWD
+EOF
+
+echo "use: rsync -rtP --port $port \"rsync://$(hostname -f)/share/\" \"share-copy/\""
+echo "stating rsyncd..."
+rsync --daemon --no-detach --config="$tmpdir/rsyncd.conf"
+
diff --git a/vpn-connect b/vpn-connect
new file mode 100755
index 0000000..692310e
--- /dev/null
+++ b/vpn-connect
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+vpnc tu.conf
+
+ip route delete default dev vpntun0
+ip route add default via 192.168.4.1 dev eth0
+
+for i in 128.130.0.0/15 192.35.240.0/24 193.170.3.0/24 193.170.72.0/21; do
+ ip route add $i dev vpntun0
+done