diff --git a/.gitignore b/.gitignore index a91bea8..718d97b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ schwanz3*sh .mac-adresses-csv-to-dhcpd.sh.swp .*.swp sut +ctt +consul diff --git a/backup-marker b/backup-marker index 344ab84..09b0b83 100755 --- a/backup-marker +++ b/backup-marker @@ -1,3 +1,4 @@ #!/bin/sh touch "$0" +date > ~/.last-backup diff --git a/delete-mails b/delete-mails index b05cb88..dc7fbba 100755 --- a/delete-mails +++ b/delete-mails @@ -1,3 +1,3 @@ #!/bin/sh notmuch search --output=files --format=text0 tag:spam or tag:deleted | xargs -0 --no-run-if-empty rm -notmuch new --quiet +notmuch new --quiet 2>/dev/null diff --git a/edit-server-text-aid-chromium b/edit-server-text-aid-chromium index 9d68b0e..d51d4df 100755 --- a/edit-server-text-aid-chromium +++ b/edit-server-text-aid-chromium @@ -34,8 +34,8 @@ our $LOCALHOST_ONLY = 1; # Configure the program that you want to run to handle the requests. # This editor invocation must NOT return control to this script until # you are done editing. -our $EDITOR_CMD = '/home/users/nico/bin/vim-term "%s"'; -#our $EDITOR_CMD = '/usr/bin/emacsclient -c "%s"'; +#our $EDITOR_CMD = '/home/users/nico/bin/vim-term "%s"'; +our $EDITOR_CMD = '/usr/bin/emacsclient -c "%s"'; # The settings to configure the temp dir and how soon old files are removed. # If TMPTEMPLATE contains the string -URL64-, then up to 64 chars of the munged diff --git a/figlet_alle_fonts b/figlet_alle_fonts index 54aa447..bc4ec04 100755 --- a/figlet_alle_fonts +++ b/figlet_alle_fonts @@ -4,10 +4,12 @@ set -e +text=${1:-cdist} + #cd /usr/figle*/share/figlet/ cd /usr/share/figlet cd /usr/share/figlet/fonts/ #for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo hallo | figlet -f $BLA; done #for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo CM Bofs | figlet -f $BLA; done #for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $BLA | figlet -f $BLA; done -for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo cdist | figlet -f $BLA; done +for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $text | figlet -f $BLA; done diff --git a/hole_mails b/hole_mails index 3ec5a5b..7cfa86b 100755 --- a/hole_mails +++ b/hole_mails @@ -1,16 +1,26 @@ #!/bin/sh -SLEEP=$1 +securemail +fetchmail -if [ -z "$SLEEP" ]; then - echo "$0 Zeit zum Schlafen" - exit 1 -fi +# Disabled by Mon Jun 20 10:56:19 CEST 2016 -- using mu now +# notmuch new -while true; do - fetchmail >/dev/null - offlineimap - fetchmail >/dev/null - echo "Mails abgeholt, schlafe nun $SLEEP Sekunde(n)" - sleep $SLEEP; -done +# offlineimap +# notmuch new + +exit 0 + +cd ~/Maildir +git add . +git commit --quiet -m "Update from $(hostname) $(date +%F-%H:%M)" +#git fetch --quiet origin +git fetch origin + +git merge -m "Merge from VM" origin/from-vm + +git push --quiet origin master:from-notebook + +notmuch new --quiet + +exit 0 diff --git a/lh b/lh index a19b816..bf15a59 100755 --- a/lh +++ b/lh @@ -6,4 +6,6 @@ datef="$2" file=$(date +%Y-%m-%d $datef) set -x -$EDITOR "${file}${suffix}" + +# $EDITOR "${file}${suffix}" +emacs "${file}${suffix}" diff --git a/lock-screen b/lock-screen index b51a510..7c53347 100755 --- a/lock-screen +++ b/lock-screen @@ -1,5 +1,14 @@ #!/bin/sh -i3lock -c fe0000 -d +# i3lock -c fe0000 -d + #~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png +# sleep 2 # xset dpms force off + +# i3lock -i ~/.background.png --dpms --nofork + +# try to start - if it already runs it will just exit +xscreensaver & + +xscreensaver-command -lock diff --git a/mailstats b/mailstats index 72e6a5f..dfaa1e1 100755 --- a/mailstats +++ b/mailstats @@ -2,11 +2,24 @@ # Nico Schottelius, Tue Dec 3 23:16:30 CET 2013 # Show mailstats +#notmuch count tag:inbox or tag:unread ( for dir in ~/Maildir ~/Maildir/firmen/ungleich \ - ~/Maildir/firmen/ungleich/panter \ - ~/Maildir/firmen/ungleich/entwine; do + ~/Maildir/firmen/ungleich/technik/INBOX/panter \ + ~/Maildir/firmen/ungleich/technik/INBOX/teralytics \ + ~/Maildir/bildung/zhaw \ + ~/Maildir/firmen/ungleich/technik/INBOX/entwine; do - find $dir/cur $dir/new -type f + #find $dir/cur $dir/new -type f + find $dir/new -type f done ) | wc -l + +echo -- +notmuch count tag:inbox +notmuch count tag:inbox and NOT tag:archive +echo -- +notmuch count tag:inbox and tag:unread +notmuch count tag:inbox and tag:new + + diff --git a/my-status-bar b/my-status-bar index d4edfb9..62b0582 100755 --- a/my-status-bar +++ b/my-status-bar @@ -4,5 +4,6 @@ i3status | while : do read line sut=$(sut) - echo "$sut | $line" || exit 1 + korea=$(TZ='Asia/Seoul' date "+%F %H:%M %Z") + echo "$korea | $sut | $line" || exit 1 done diff --git a/mympd b/mympd index 81e2469..4338cbe 100755 --- a/mympd +++ b/mympd @@ -1,5 +1,5 @@ #!/bin/sh -cd ~/oeffentlich/audio +cd ~/vcs/annex/audio mpd --no-daemon ./mpd.conf diff --git a/nz b/nz index 1208845..870652a 100755 --- a/nz +++ b/nz @@ -1,4 +1,10 @@ #!/bin/sh + +# exec > /tmp/nz +# exec 2>&1 + +set -x + ddir="${HOME}/vcs/notes" cd "$ddir" diff --git a/ruagdesktop b/ruagdesktop old mode 100644 new mode 100755 index 189dae6..5c28fbf --- a/ruagdesktop +++ b/ruagdesktop @@ -1,7 +1,7 @@ #!/bin/sh xrandr --output DP2 --above eDP1 --auto -xrandr --output HDMI1 --left-of DP2 --auto --rotate left +xrandr --output HDMI1 --right-of DP2 --auto --rotate left #i3 workspace 5 #i3 move workspace to output right diff --git a/rxvt_to_urxvt_hack.sh b/rxvt_to_urxvt_hack.sh index a530288..c074a3d 100755 --- a/rxvt_to_urxvt_hack.sh +++ b/rxvt_to_urxvt_hack.sh @@ -6,5 +6,4 @@ #============================================================================== echo '[ "$TERM" = "rxvt-unicode" ] && export TERM=rxvt' >> "$HOME/.profile" -echo '[ "$TERM" = "rxvt-unicode" ] && export TERM=rxvt' >> "$HOME/.bash_profile" echo 'if ( $TERM == rxvt-unicode ) setenv TERM rxvt' >> "$HOME/.cshrc" diff --git a/securemail b/securemail index 73184da..71fd51e 100755 --- a/securemail +++ b/securemail @@ -5,6 +5,8 @@ # used at conferences / congresses / meetings # +$HOME/bin/securemail.off + POP3=110 POP3S=995 IMAP=143 @@ -19,22 +21,33 @@ HOST="213.146.113.242" HOST="nico@62.65.138.78" HOST="home.schottelius.org" HOST="nico@77.109.138.222" -# HOST="root@backup1.ungleich.ch" +#HOST="ssh.schottelius.org" +HOST="root@wein.ungleich.ch" +HOST="root@kaffee.ungleich.ch" +HOST="root@mx.ungleich.ch" +HOST="oneadmin@kaffee.ungleich.ch" +HOST="root@mx-hetzner01.ungleich.ch" +HOST="root@mx.ungleich.ch" if [ $# -ge 1 ]; then HOST=$1; shift fi - #-L2323:mx3.schottelius.org:$IMAPS \ - #-L4241:mx3.schottelius.org:$SMTP \ +#ssh -T -f -C -N \ +# -L4241:mx.ungleich.ch:$SMTP \ +# -R :4242:localhost:22 \ +# -D 3128 "$@" \ +# "$HOST" && sendmail -q +# ssh -T -f -C -N \ - -L2323:77.109.138.221:$IMAPS \ - -L4241:77.109.138.221:$SMTP \ + -L2323:mx.ungleich.ch:$IMAPS \ + -L4241:mx.ungleich.ch:$SMTP \ -L2324:imap.googlemail.com:$IMAPS \ -L2325:mail.zhaw.ch:$IMAPS \ + -L2326:imap.googlemail.com:$POP3S \ -R :4242:localhost:22 \ - -D 12345 \ - "$HOST" "$@" + -D 3128 "$@" \ + "$HOST" && sendmail -q # Fernzugriff # ssh -T -f -C -N -R4242:localhost:22 "$HOST" diff --git a/show_calendar b/show_calendar index 5b3eb66..f844a75 100755 --- a/show_calendar +++ b/show_calendar @@ -25,5 +25,5 @@ for arg in "$@"; do grep_param="${grep_param} -e ^${arg}:" done -# set -x +set -x find "$CALDIR" -type f -exec egrep --with-filename -A 2 $grep_param {} \; diff --git a/sync-from b/sync-from index 72fae45..ca95b56 100755 --- a/sync-from +++ b/sync-from @@ -16,10 +16,7 @@ dst=$1; shift case $from in loch) - src=root@loch:/home/services/backup/bento-manuell/ - ;; - 42) - src=root@42:/home/services/backup/bento/ + src=root@loch:/home/services/backup/notebook-manuell/home/users/nico/ ;; esac @@ -30,6 +27,7 @@ sshconfig=$sshdir/config d1=$(date) set -x -rsync -avS -e "ssh -i $sshkey -F $sshconfig" --delete "$src" "$dst" +#rsync -avS -e "ssh -i $sshkey -F $sshconfig" --delete "$src" "$dst" +rsync -avS --delete "$src" "$dst" echo $d1 date diff --git a/sync-to b/sync-to index 17131e2..33616e4 100755 --- a/sync-to +++ b/sync-to @@ -5,14 +5,20 @@ set -x dsthost="$1"; shift case "$dsthost" in - 42) - dst=42:/home/services/backup/bento + loch|rloch) + dst=root@$dsthost:/home/services/backup/notebook-manuell/home/users/nico/ ;; - loch) - dst=root@loch:/home/services/backup/bento-manuell + nico-vm) + dst=nico-vm.schottelius.org:/data ;; - luchsingen) - dst=root@luchsingen.schottelius.org:/home/services/backup/bento-manuell + freiheit) + dst=freiheit: + ;; + local) + dst=root@192.168.0.20:/home/services/backup/notebook-manuell/home/users/nico/ + ;; + nico-data) + dst=nico-data.schottelius.org:/home/nico ;; *) echo "Unknown $1" >&2 @@ -22,17 +28,11 @@ esac start=$(date) rsync -avS --delete --progress \ - --exclude '/proc/*' \ - --exclude '/tmp/*' \ - --exclude '/sys/*' \ - --exclude '/dev/*' \ - --exclude '/run/*' \ - --exclude '/home/services/usbhd' \ - --exclude '/home/users/nico/.cache/chromium/' \ - --exclude '/home/users/nico/.bitcoin/blocks/' \ - --exclude '/home/users/nico/.bitcoin/chainstate/' \ + --exclude-from=/home/users/nico/.ccollect/defaults/exclude \ + --exclude /.cache \ + --exclude ~/temp/ \ "$@" \ - / "$dst" + ~/ "$dst" end=$(date) echo $start diff --git a/wlan b/wlan index 229c7b2..ffdcb8c 100755 --- a/wlan +++ b/wlan @@ -6,19 +6,16 @@ # # Failed due to many reasons. See the working hack/version below. # -# -#ip link set wlp0s3 down -#iwconfig wlp0s3 essid public -#ip link set wlp0s3 up -#iwconfig wlp0s3 essid public if [ "$#" -ge 1 ]; then dev=$1; shift else - dev=wlp2s0 dev=wlp3s0 dev=wlan0 + dev=wlp2s0 dev=wlp1s0 + dev=wlp4s0 + dev=wlp3s0 fi set -x @@ -37,13 +34,17 @@ set -e # ( rmmod iwlagn; modprobe iwlagn; sleep 2 ) # wpa_supplicant -B -Dwext -iwlp0s3 -c /etc/wpa_supplicant/wpa_supplicant.conf -wpa_supplicant -B -Dwext -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf +# wpa_supplicant -B -Dwext -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf +#wpa_supplicant -B -Dnl80211 -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf +wpa_supplicant -B -Dnl80211 -i$dev -c /etc/wpa_supplicant/wpa_supplicant-${dev}.conf # Give wpa some time to connect sleep 5 # Choose an dhcp client ( udhcpc -nqfi $dev || dhcpcd ) +wpa_cli + # vpnc ~nico/ethz/vpn/sg.conf #vpnc ~nico/firmen/ethz/vpn/vpnc.conf # vpnc-disconnect diff --git a/x-auto b/x-auto index c9de79f..4c44e52 100755 --- a/x-auto +++ b/x-auto @@ -1,12 +1,11 @@ #!/bin/sh -if [ "$#" -ne 1 ]; then - echo "$0 position" - exit 1 +if [ "$#" -lt 1 ]; then + set -- "$@" above fi -primary=eDP1 +primary=eDP-1 # position: something xrandr understands position=$1; shift diff --git a/x-oben b/x-oben index fe99a05..0375820 100755 --- a/x-oben +++ b/x-oben @@ -3,4 +3,5 @@ x-off xrandr --output HDMI1 --auto --rotate normal --above eDP1 xrandr --output DP1 --auto --rotate normal --above eDP1 +xrandr --output DP2 --auto --rotate normal --above eDP1 xrandr --output VGA1 --auto --rotate normal --above eDP1 diff --git a/x-off b/x-off index 1a11414..6bd4bcf 100755 --- a/x-off +++ b/x-off @@ -1,4 +1,4 @@ #!/bin/sh -xrandr --output DP1 --off -xrandr --output HDMI1 --off -xrandr --output VGA1 --off +for d in DP1 DP2 HDMI1 HDMI2 VIRTUAL1; do + xrandr --output $d --off +done diff --git a/x-terminal-emulator b/x-terminal-emulator index 769f84d..cf3ab30 100755 --- a/x-terminal-emulator +++ b/x-terminal-emulator @@ -1,5 +1,6 @@ #!/bin/sh -[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd +#[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd +#exec urxvt "$@" exec urxvtc "$@" diff --git a/zu-sanghee b/zu-sanghee deleted file mode 100755 index c8b7f5f..0000000 --- a/zu-sanghee +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -arrival="2014-7-14" -arrival="2014-8-20" - -export arrival - -python3 -c 'import os; import datetime; day=datetime.datetime.strptime(os.environ["arrival"], "%Y-%m-%d"); delta = day - datetime.datetime.now(); print("Sanghee is %sd away" % (delta.days))'