tfew more scripts - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 77253c4d41cb7f64154c8ab2bfbc6f9cfcfb00aa
(DIR) parent 9b4d822f28692f182a0240a1f244029bc70c55e7
(HTM) Author: z3bra <willy@mailoo.org>
Date: Thu, 2 Apr 2015 23:37:17 +0200
few more scripts
Diffstat:
A irc | 36 +++++++++++++++++++++++++++++++
A mfp | 11 +++++++++++
A pops | 22 ++++++++++++++++++++++
M popup | 4 ++--
4 files changed, 71 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/irc b/irc
t@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# join an irc channel quickly
+
+BASEDIR=$HOME/var/irc
+NICK=${NICK:-'z3bra'}
+PASS=${PASS:-'password'}
+
+CHANNEL=${1:-'#nixers'}
+SERVER=${2:-'irc.nixers'}
+
+CHANDIR=$BASEDIR/$SERVER/$CHANNEL
+
+export NICK PASS CHANNEL SERVER
+
+cat << EOF
+
+nick : $NICK
+serv : $SERVER
+chan : $CHANNEL
+
+connecting to $SERVER...
+EOF
+ii -i $BASEDIR -s "$SERVER" -n "$NICK" -k "$PASS" &
+
+echo "joining $CHANNEL.."
+echo "/j $CHANNEL" > $BASEDIR/$SERVER/in
+
+while ! test -f $CHANDIR/out; do sleep 0.5; done
+
+notii $CHANDIR/out &
+
+tmux new-session -d "tail -n100 -f $CHANDIR/out | hiii" \;\
+ split-window "sob > $CHANDIR/in" \;\
+ resize-pane -y 2 \;\
+ attach
(DIR) diff --git a/mfp b/mfp
t@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# z3bra - 2015 (c) wtfpl
+# plays mix from http://musicforprogramming.net in random order
+
+curl -s http://musicforprogramming.net/rss.php \
+ | grep comments \
+ | sed 's/\s*<.\?comments>\s*//g' \
+ | shuf \
+ | tr '\n' ' ' \
+ | xargs mplayer -nocache 2>&1 >/dev/null
(DIR) diff --git a/pops b/pops
t@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# z3bra - (c) wtfpl 2014
+# Create a small popup with the given text
+
+# bar options
+font="-*-creep-*-*-*--16-*-*-*-*-*-*-1"
+bg="#ff040201"
+fg="#ffdfd5d2"
+
+x=$(wattr w `lsw -r`)
+y=$(wattr h `lsw -r`)
+
+width=180
+height=20
+
+offy=10
+offx=$(( x - 14 - $width ))
+
+geom=${width}x${height}+${offx}+${offy}
+
+skroll -r -n25 | lemonbar -d -g $geom -f $font -B $bg -F $fg
(DIR) diff --git a/popup b/popup
t@@ -13,8 +13,8 @@ fts="12" # size of the said font
#font='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*'
#font="-*-profont-medium-*-*--12-*-*-*-*-*-*-1"
font="-*-creep-*-*-*--16-*-*-*-*-*-*-1"
-bg="#ff161616"
-fg="#ffffffff"
+bg="#ff040201"
+fg="#ffdfd5d2"
hl="#ff443232"
x=$(wattr w `lsw -r`)