From ecaf342099d0db3e3e16b0efa84b028293633774 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 11 Apr 2013 19:01:35 -0500 Subject: remove a lot of stuff i don't use anymore --- Makefile | 5 +- Xdefaults | 22 ----- aliases | 27 ------ bin/alarm | 29 ------- bin/build-vim | 70 ---------------- bin/colors | 17 ---- bin/git/git-hub | 239 ----------------------------------------------------- bin/git/git-jump | 69 ---------------- bin/ipod_movie | 18 ---- bin/keyboard-swarp | 65 --------------- bin/playcd | 14 ---- bin/procmem | 67 --------------- bin/show_colors | 17 ++++ crontab | 2 - env | 11 +-- gitconfig | 1 - i3/config | 46 ----------- newsbeuter/config | 22 ----- newsbeuter/urls | 112 ------------------------- xinitrc | 7 +- xmobarrc | 20 ----- xmonad/xmonad.hs | 108 ------------------------ 22 files changed, 20 insertions(+), 968 deletions(-) delete mode 100755 bin/alarm delete mode 100755 bin/build-vim delete mode 100755 bin/colors delete mode 100755 bin/git/git-hub delete mode 100755 bin/git/git-jump delete mode 100755 bin/ipod_movie delete mode 100755 bin/keyboard-swarp delete mode 100755 bin/playcd delete mode 100755 bin/procmem create mode 100755 bin/show_colors delete mode 100644 crontab delete mode 100644 newsbeuter/config delete mode 100644 newsbeuter/urls delete mode 100644 xmobarrc delete mode 100644 xmonad/xmonad.hs diff --git a/Makefile b/Makefile index 649133b..1e9419d 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,6 @@ INSTALL = abcde.conf \ vimrc \ Xdefaults \ xinitrc \ - xmobarrc \ zlogout \ zshcomplete \ zshinput \ @@ -40,7 +39,6 @@ INSTALL = abcde.conf \ irssi \ fortune \ ncmpc \ - newsbeuter \ procmail \ pentadactyl \ re.pl \ @@ -51,7 +49,6 @@ INSTALL = abcde.conf \ themes \ urxvt \ vim \ - xmonad \ zsh INSTALLED = $(patsubst %,$(INTO)/.%,$(INSTALL)) @@ -66,7 +63,7 @@ RM = @rm -f build : $(BUILD) -install : build $(INSTALLED) /var/spool/cron/$(USER) +install : build $(INSTALLED) @for dir in $(EMPTYDIRS); do mkdir -p $(INTO)/$$dir; done $(ECHO) Installed into $(INTO) diff --git a/Xdefaults b/Xdefaults index b1ced12..177898b 100644 --- a/Xdefaults +++ b/Xdefaults @@ -45,7 +45,6 @@ xterm*visualBell:true xterm*loginShell:true xterm*background:black xterm*foreground:lightgrey -!xterm*transparent:true xterm*shading:50 xterm*saveLines:4096 xterm*cursorColor:green @@ -53,30 +52,9 @@ xterm*colorMode:true xterm*pointerColor:yellow xterm*pointerColor2:yellow xterm*borderWidth:1 -!xterm*truetintingType:true -!xterm*fading:80 xterm*scrollTtyOutput:false xterm*scrollBar_right:true xterm*scrollBar:false ! }}} -! aterm {{{ -aterm*visualBell:true -aterm*loginShell:true -aterm*background:black -aterm*foreground:lightgrey -!aterm*transparent:true -aterm*shading:50 -aterm*saveLines:4096 -aterm*cursorColor:green -aterm*pointerColor:yellow -aterm*pointerColor2:yellow -aterm*borderWidth:1 -!aterm*truetintingType:true -!aterm*fading:80 -aterm*scrollTtyOutput:true -aterm*scrollBar_right:true -aterm*scrollBar:false -aterm*boldFont:7x14 -! }}} ! vim:ft=xdefaults: diff --git a/aliases b/aliases index c886296..c645008 100644 --- a/aliases +++ b/aliases @@ -13,12 +13,6 @@ alias netstat="netstat -a --inet --numeric-port" alias nao="(TERM=rxvt telnet nethack.alt.org)" alias cao="(TERM=rxvt /usr/bin/ssh -C -i ${HOME}/.ssh/cao_key joshua@crawl.akrasiac.org)" alias cdo="ssh -C -i ${HOME}/.ssh/cao_key crawl@crawl.develz.org" -alias scn="(TERM=xterm-color telnet slashem.crash-override.net)" -alias spork="telnet sporkhack.nineball.org" -alias cgoban="javaws http://files.gokgs.com/javaBin/cgoban.jnlp" -alias counterstrike="wine c:\\Program\ Files\\Sierra\\Half-Life\\hl.exe -game cstrike -console -numericping -nojoy -noipx" -alias halflife="wine c:\\Program\ Files\\Sierra\\Half-Life\\hl.exe" # -console breaks -alias starcraft='wine c:\\Program\ Files\ \(x86\)\\Starcraft\\StarCraft.exe' # }}} # termcast {{{ alias tc="telnet termcast.org" @@ -26,9 +20,7 @@ alias tc="telnet termcast.org" # shells {{{ alias bishamon='ssh bishamon' alias apt="ssh ${USER}@apt.tozt.net" -alias jjaro="ssh ${USER}@jjaro.net" alias tozt="ssh -t ${USER}@tozt.net tmux a" -alias henzell="ssh henzell@crawl.akrasiac.org" # }}} # tmux sessions {{{ alias main='tmux a -t main' @@ -38,8 +30,6 @@ alias misc='tmux a -t misc' # }}} # other {{{ alias wgetff='wget --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070404 Firefox/2.0.0.3"' -alias dotperl="rsync -av lib/* ${HOME}/perl5/local/" -alias clean_packages='sudo pacman -Rsn $(pacman -Qqdt)' alias pm="find lib -type f | sort" alias bootstrap_cpanm="wget -O- -q http://xrl.us/cpanm | perl - App::cpanminus" alias v="vim -c 'call feedkeys(\"t\")'" @@ -63,9 +53,6 @@ function perldoc { fi } alias pd=perldoc -function incoming { - cpanm http://pause.cpan.org/incoming/$1.tar.gz -} function webcam { local width=$1 local height=$2 @@ -80,14 +67,6 @@ function webcam_record { if [[ -z $height ]]; then height=480; else shift; fi mencoder tv:// -tv driver=v4l2:width=${width}:height=${height}:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o $1 } -function luado { # thanks rici - local e=$1 - shift - lua /dev/fd/3 $* 4<&0- <<<$e 3<&0- 0<&4- -} -function moose { - perl -Moose -E "$*" -} function setfont { printf '\e]710;%s\007\e]711;%s\007' "$1" "$1" } @@ -106,12 +85,6 @@ function opened_files { function alert { echo "DISPLAY=$DISPLAY xmessage -center -default okay $1" | at $2 } -function nopaste_moose { - nopaste --chan=#moose --services=Shadowcat --desc="$1" -} -function gist { - nopaste --services=Gist --desc="$1" -} function fm22avi { fceux --playmov $1.fm2 --sound 1 --soundq 1 --soundrate 48000 --nospritelim 1 --pal 0 --xscale 1 --yscale 1 --opengl 0 --special 0 $2 --videolog "mencoder - -o $1.avi -ovc x264 -x264encopts qp=0 -oac mp3lame -lameopts mode=3:preset=128 -noskip -nocache -mc 0 -aspect 4/3 NESVSETTINGS" } diff --git a/bin/alarm b/bin/alarm deleted file mode 100755 index d247c58..0000000 --- a/bin/alarm +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -reset_mixer() -{ - amixer set Master $OLDVOL_M $M > /dev/null - amixer set PCM $OLDVOL_P $P > /dev/null -} - -set_mixer() -{ - OLDVOL_M=`amixer get Master | egrep "$Front Left.*\[.*%\]" | sed s/".*\[\(.*%\)].*"/"\1"/` - OLDVOL_P=`amixer get PCM | egrep "$Front Left.*\[.*%\]" | sed s/".*\[\(.*%\)].*"/"\1"/` - OLDMUTE_M=`amixer get Master | egrep "$Front Left.*\[.*%\]" | sed s/".*\[\(.*%\)].*\[\(.*\)\]"/"\2"/` - OLDMUTE_P=`amixer get PCM | egrep "$Front Left.*\[.*%\]" | sed s/".*\[\(.*%\)].*\[\(.*\)\]"/"\2"/` - echo $OLDMUTE_M | grep -q on || M='mute' - echo $OLDMUTE_P | grep -q on || P='mute' - amixer set Master 100% unmute > /dev/null - amixer set PCM 100% unmute > /dev/null -} - -trap reset_mixer 2 -trap reset_mixer 3 -trap reset_mixer 15 -for i in {1..100};do - set_mixer - mplayer ~/.alarm.mp3 > /dev/null - reset_mixer - sleep 600 -done -reset_mixer diff --git a/bin/build-vim b/bin/build-vim deleted file mode 100755 index 508e52c..0000000 --- a/bin/build-vim +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -PREFIX=/usr/local -BUILDDIR="${PWD}/.build" -SRCDIR="${BUILDDIR}${PREFIX}" -echo "Building with: PREFIX=$PREFIX BUILDDIR=$BUILDDIR SRCDIR=$SRCDIR" - -OPTS="--prefix=${PREFIX} --localstatedir=/var/lib/vim --mandir=${PREFIX}/share/man --with-features=big --disable-gpm --enable-acl --with-x=yes --enable-multibyte --enable-cscope --enable-perlinterp" -echo "Configure options: $OPTS" - - -mkdir -p $BUILDDIR || exit 1 - -make distclean || exit 1 -./configure $OPTS || exit 1 -make || exit 1 -make DESTDIR=$BUILDDIR install || exit 1 - -pushd ${SRCDIR}/bin || exit 1 - rm -f ex view || exit 1 - mv vim vim-normal || exit 1 - ln -sf vim-normal vim || exit 1 - ln -sf vim-normal rview || exit 1 - ln -sf vim-normal rvim || exit 1 - ln -sf vim-normal vimdiff || exit 1 -popd || exit 1 - -find ${SRCDIR}/share/man -type d -name 'man1' 2> /dev/null | \ - while read _mandir; do - pushd ${_mandir} || exit 1 - rm -f ex.1 view.1 || exit 1 - rm -f evim.1 || exit 1 - popd || exit 1 - done - -sudo rsync -av ${SRCDIR}/ $PREFIX || exit 1 - -rm -rf $BUILDDIR || exit 1 -mkdir -p $BUILDDIR || exit 1 - -make distclean || exit 1 -./configure $OPTS --enable-gui=gtk2 || exit 1 -make || exit 1 -make DESTDIR=$BUILDDIR install || exit 1 - -pushd ${SRCDIR}/bin || exit 1 - rm -f xxd ex view vimtutor vimdiff rview rvim || exit 1 - mv vim vim-big || exit 1 - ln -sf vim-big eview || exit 1 - ln -sf vim-big evim || exit 1 - ln -sf vim-big gview || exit 1 - ln -sf vim-big gvim || exit 1 - ln -sf vim-big gvimdiff || exit 1 - ln -sf vim-big rgview || exit 1 - ln -sf vim-big rgvim || exit 1 -popd || exit 1 - -find ${SRCDIR}/share/man -type d -name 'man1' 2> /dev/null | \ - while read _mandir; do - pushd ${_mandir} || exit 1 - rm -f ex.1 view.1 || exit 1 - rm -f rvim.1 rview.1 vim.1 vimtutor.1 vimdiff.1 xxd.1 || exit 1 - popd || exit 1 - done - -rm -rf ${SRCDIR}/share/vim || exit 1 - -sudo rsync -av ${SRCDIR}/ $PREFIX || exit 1 - -rm -rf $BUILDDIR || exit 1 diff --git a/bin/colors b/bin/colors deleted file mode 100755 index 136ad98..0000000 --- a/bin/colors +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -############################################################ -# Nico Golde Homepage: http://www.ngolde.de -# Last change: Mon Feb 16 16:24:41 CET 2004 -############################################################ - -for attr in 0 1 4 5 7 ; do - echo "----------------------------------------------------------------" - printf "ESC[%s;Foreground;Background - \n" $attr - for fore in 30 31 32 33 34 35 36 37; do - for back in 40 41 42 43 44 45 46 47; do - printf '\033[%s;%s;%sm %02s;%02s ' $attr $fore $back $fore $back - done - printf '\n' - done - printf '\033[0m' -done diff --git a/bin/git/git-hub b/bin/git/git-hub deleted file mode 100755 index 86c7955..0000000 --- a/bin/git/git-hub +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -package App::Git::Hub; - -use File::pushd; -use List::MoreUtils qw(any); -use Net::GitHub::V2; - -sub git { - if (wantarray) { - chomp(my @ret = qx{git $_[0]}); - return @ret; - } - else { - chomp(my $ret = qx{git $_[0]}); - return $ret; - } -} - -sub new { - my $class = shift; - my @argv = @_; - - bless { - argv => \@argv, - }, $class; -} - -sub user { shift->_github->login } -sub argv { @{ shift->{argv} } } - -sub shift_argv { - my $self = shift; - return shift @{ $self->{argv} }; -} - -sub run { - my $self = shift; - - my $command = $self->shift_argv; - $self->usage unless defined $command; - $self->run_command($command); -} - -sub usage { - my @subcommands = do { no strict 'refs'; grep { /^run_command_/ } keys %{ __PACKAGE__ . '::' } }; - die "usage: git hub [args...]\n" - . "subcommands:\n" - . " " . (join "\n ", map { s/^run_command_//; $_ } @subcommands) - . "\n"; -} - -sub run_command { - my $self = shift; - my ($command) = @_; - - my $meth = "run_command_$command"; - if ($self->can($meth)) { - return $self->$meth($self->argv); - } - else { - $self->usage; - } -} - -sub run_command_create { - my $self = shift; - my ($name, $description, $url) = @_; - die "usage: git hub create [url]" - unless @_ >= 2; - - $self->_github(repo => $name)->repos->create( - $name, $description, $url || '', 1 - ); -} - -sub run_command_delete { - my $self = shift; - die "usage: git hub delete [-f] " - unless @_ == 1 || @_ == 2; - - my $force; - if ($_[0] eq '-f') { - $force = 1; - shift @_; - } - - my ($name) = @_; - - warn "not actually deleting $name (-f not set)\n" unless $force; - - $self->_github(repo => $name)->repos->delete( - $force ? ({confirm => 1}) : () - ); -} - -sub run_command_fork { - my $self = shift; - my ($owner, $repo) = @_; - die "usage: git hub fork " - unless @_ == 2; - - $self->_github(owner => $owner, repo => $repo)->repos->fork; -} - -sub run_command_clone { - my $self = shift; - die "usage: git hub clone [--fork] [owner] " - unless @_ == 1 || @_ == 2 || @_ == 3; - - my $fork; - if ($_[0] eq '--fork') { - shift @_; - $fork = 1; - } - - if (@_ == 1) { - my ($repo) = @_; - my $user = $self->user; - git "clone git\@github.com:$user/$repo.git"; - } - else { - my ($owner, $repo) = @_; - if ($fork) { - $self->run_command_fork($owner, $repo); - $self->run_command_clone($repo); - { - my $d = pushd($repo); - $self->run_command_add($owner, $repo); - } - } - else { - git "clone git://github.com/$owner/$repo.git"; - } - } -} - -sub run_command_list { - my $self = shift; - die "usage: git hub list [-v] [owner]" - unless @_ <= 2; - - my $verbose; - if (@_ > 0 && $_[0] eq '-v') { - $verbose = 1; - shift @_; - } - - my $owner = defined $_[0] ? $_[0] : $self->user; - - print for map { - $verbose - ? ("$_->{name}:\n" - . ($_->{description} ? " $_->{description}\n" : '') - . ($_->{homepage} ? " $_->{homepage}\n" : '')) - : "$_->{name}\n" - } @{ $self->_github(owner => $owner, repo => '')->repos->list }; -} - -sub run_command_pullreq { - my $self = shift; - my ($owner, $repo, $title, $branch, $body) = @_; - die "usage: git hub pullreq [branch] [description]" - unless @_ == 3 || @_ == 4 || @_ == 5; - - # XXX: should default to the current branch - $branch ||= 'master'; - - $self->_github(owner => $owner, repo => $repo)->pull_request->pull_request( - title => $title, - body => $body, - head => $self->user . ':' . $branch - ); -} - -sub run_command_add { - my $self = shift; - die "usage: git hub add [owner] <repo>" - unless @_ == 1 || @_ == 2; - my ($owner, $repo) = (@_ > 1 ? @_ : (undef, $_[0])); - - my $remote; - if ($owner) { - $remote = $owner; - git "remote add $remote git://github.com/$owner/$repo.git"; - } - else { - $owner = $self->user; - $remote = (any { /\borigin\b/ } git "remote") ? 'github' : 'origin'; - git "remote add $remote git\@github.com:$owner/$repo.git"; - } - - git "fetch $remote"; -} - -sub run_command_pull { - my $self = shift; - die "usage: git hub pull <num>" - unless @_ == 1; - my ($num) = @_; - - my $remote = (any { /\bgithub\b/ } git "remote") ? 'github' : 'origin'; - git "fetch $remote refs/pull/$num/head:pull-$num"; -} - -sub _github { - my $self = shift; - my %opts = @_; - - my $user = $ENV{USER}; - my $token; - - if (open my $login_info, '<', "$ENV{HOME}/.github") { - $user = <$login_info>; - chomp $user; - $token = <$login_info>; - chomp $token; - } - - Net::GitHub::V2->new( - (defined $user - ? (owner => $user, login => $user) - : ()), - (defined $token - ? (token => $token) - : ()), - repo => 'something_not_real', - %opts, - ); -} - -package main; - -my $res = App::Git::Hub->new(@ARGV)->run; -if (ref($res) eq 'HASH' && exists $res->{error}) { - die $res->{error}[0], "\n"; -} diff --git a/bin/git/git-jump b/bin/git/git-jump deleted file mode 100755 index a33674e..0000000 --- a/bin/git/git-jump +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -usage() { - cat <<\EOF -usage: git jump <mode> [<args>] - -Jump to interesting elements in an editor. -The <mode> parameter is one of: - -diff: elements are diff hunks. Arguments are given to diff. - -merge: elements are merge conflicts. Arguments are ignored. - -grep: elements are grep hits. Arguments are given to grep. -EOF -} - -open_editor() { - editor=`git var GIT_EDITOR` - eval "$editor -q \$1" -} - -mode_diff() { - git diff --relative "$@" | - perl -ne ' - if (m{^\+\+\+ b/(.*)}) { $file = $1; next } - defined($file) or next; - if (m/^@@ .*\+(\d+)/) { $line = $1; next } - defined($line) or next; - if (/^ /) { $line++; next } - if (/^[-+]\s*(.*)/) { - print "$file:$line: $1\n"; - $line = undef; - } - ' -} - -mode_merge() { - git ls-files -u | - perl -pe 's/^.*?\t//' | - sort -u | - while IFS= read fn; do - grep -Hn '^<<<<<<<' "$fn" - done -} - -# Grep -n generates nice quickfix-looking lines by itself, -# but let's clean up extra whitespace, so they look better if the -# editor shows them to us in the status bar. -mode_grep() { - git grep -n "$@" | - perl -pe ' - s/[ \t]+/ /g; - s/^ *//; - ' -} - -if test $# -lt 1; then - usage >&2 - exit 1 -fi -mode=$1; shift - -trap 'rm -f "$tmp"' 0 1 2 3 15 -tmp=`mktemp -t git-jump.XXXXXX` || exit 1 -type "mode_$mode" >/dev/null 2>&1 || { usage >&2; exit 1; } -"mode_$mode" "$@" >"$tmp" -test -s "$tmp" || exit 0 -open_editor "$tmp" diff --git a/bin/ipod_movie b/bin/ipod_movie deleted file mode 100755 index 8f0cdb4..0000000 --- a/bin/ipod_movie +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -in_name=$1 -out_name=$( echo ${in_name} | sed 's/\(.*\)\..*/\1_ipod.mov/' ) -aspect=$2 - -echo "Writing out ${in_name} in iPod format to ${out_name}..." -echo - -ffmpeg -vcodec xvid -b 350 -bufsize 4096 -g 300 -acodec aac -ab 96 -ac 2 -i "${in_name}" -s 320x240 -aspect ${aspect} "${out_name}" - -if [[ $? -eq 0 ]]; then - echo - echo "done." -else - echo - echo "failed." -fi diff --git a/bin/keyboard-swarp b/bin/keyboard-swarp deleted file mode 100755 index bcb8d67..0000000 --- a/bin/keyboard-swarp +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -use List::Util 'max'; - -my $keyboard = do { - no warnings 'qw'; - [ - [ qw(1 2 3 4 5 6 7 8 9 0 - =) ], - [ qw(q w e r t y u i o p [ ]) ], - [ qw(a s d f g h j k l ; ') ], - [ qw(z x c v b n m , . /) ], - ] -}; - -if ($ARGV[0] eq '--debug') { - require Term::ReadKey; - my ($xres, $yres) = Term::ReadKey::GetTerminalSize(); - my %offset_map = _calculate_offset_map($keyboard, $xres, $yres); - print "\e[2J"; - for my $row (@$keyboard) { - for my $key (@$row) { - my $offset = $offset_map{$key}; - print "\e[$offset->[1];$offset->[0]H$key"; - } - } - getc; -} -else { - my $key = $ARGV[0]; - my ($xres, $yres) = `xrandr` =~ /Screen 0:.*current (\d+) x (\d+),/; - my %offset_map = _calculate_offset_map($keyboard, $xres, $yres); - my $offset = $offset_map{$key}; - - # make sure the new location gains focus - system("swarp", 0, 0); - system("swarp", $xres, $yres); - - system("swarp", $offset->[0], $offset->[1]); -} - -sub _calculate_offset_map { - my ($keyboard, $xres, $yres) = @_; - - my %map; - - my $width = max map { $_ + 2 * @{ $keyboard->[$_] } } 0..$#$keyboard; - my $xincr = $xres / $width; - - my $height = @$keyboard; - my $yincr = $yres / $height; - - my $ypos = 0.5 * $yincr; - for my $row (0..$#$keyboard) { - my $xpos = (0.5 + $row) * $xincr; - for my $key (@{ $keyboard->[$row] }) { - $map{$key} = [int($xpos + 0.5), int($ypos + 0.5)]; - $xpos += 2 * $xincr; - } - $ypos += $yincr; - } - - return %map; -} diff --git a/bin/playcd b/bin/playcd deleted file mode 100755 index 1c2bde1..0000000 --- a/bin/playcd +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [[ -z $1 ]]; then - cdda2wav -q -e -d0 -N -B dev=/dev/cdrom & -else - cdda2wav -q -e -d0 -N -t$1 dev=/dev/cdrom & -fi - -PID=$! - -# this program skips a lot -sudo renice -5 ${PID} - -wait ${PID} diff --git a/bin/procmem b/bin/procmem deleted file mode 100755 index 3a7ce76..0000000 --- a/bin/procmem +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -if [ "$1" = "--help" -o "$1" = "-h" ]; then - echo "Syntax: `basename $0` [pid]..." - echo "If no pids are specified, all processes are listed" - exit 1 -fi - -cd /proc 2> /dev/null || { echo "No /proc directory."; exit 1; } - - -get_cmdline() { - local cmd - cmd="`tr '\000' ' ' < $1/cmdline`" - test -z "$cmd" && cmd="[`tr -d '()' < $1/stat | cut -d' ' -f2`]" - echo "$cmd" -} - -get_rss() { - grep "^VmRSS:" $1/status | awk '{ print $2 }' -} - - -# Determine the width of the stdout tty (if it is a tty) for clipping -width=`stty -F $$/fd/1 size 2> /dev/null | awk '{ print $2 }'` - -clip_line() { - test -n "$width" && expr substr "$1" 1 "$width" || echo "$1" -} - - -test -z "$1" && set -- `echo [0-9]* | tr " " "\n" | sort -n` - -header=$(printf "%5s %6s %6s %6s %6s %6s %s\n" \ -PID VSZ DEVMAP LIBMAP ALLOC RSS CMDLINE) - -clip_line "$header" - -for pid; do - totalmap=0 - devmap=0 - libmap=0 - alloc=0 - - test -f $pid/maps || continue - - { while read -u 99 range _ _ _ _ lib; do - size=$(( -(0x${range/-/-0x}) )) - let totalmap+=size - case $lib in - /dev/*) - let devmap+=size - ;; - "") - let alloc+=size - ;; - *) - let libmap+=size - esac - done; } 99< $pid/maps # '99<' is a workaround for a stupid bash bug - - output=$(printf "%5d %6d %6d %6d %6d %6d %s\n" \ - $pid $((totalmap/1024)) $((devmap/1024)) $((libmap/1024)) \ - $((alloc/1024)) "`get_rss $pid`" "`get_cmdline $pid`") - - clip_line "$output" -done diff --git a/bin/show_colors b/bin/show_colors new file mode 100755 index 0000000..136ad98 --- /dev/null +++ b/bin/show_colors @@ -0,0 +1,17 @@ +#!/bin/sh +############################################################ +# Nico Golde <nico(at)ngolde.de> Homepage: http://www.ngolde.de +# Last change: Mon Feb 16 16:24:41 CET 2004 +############################################################ + +for attr in 0 1 4 5 7 ; do + echo "----------------------------------------------------------------" + printf "ESC[%s;Foreground;Background - \n" $attr + for fore in 30 31 32 33 34 35 36 37; do + for back in 40 41 42 43 44 45 46 47; do + printf '\033[%s;%s;%sm %02s;%02s ' $attr $fore $back $fore $back + done + printf '\n' + done + printf '\033[0m' +done diff --git a/crontab b/crontab deleted file mode 100644 index f6699fc..0000000 --- a/crontab +++ /dev/null @@ -1,2 +0,0 @@ -0 */3 * * * newsbeuter -x reload -0 5 * * * . $HOME/.bashrc && perlbrew switch perl-5.16.0 && minicpan && killall minicpan_webserver diff --git a/env b/env index 86c8937..2199e8d 100644 --- a/env +++ b/env @@ -1,17 +1,10 @@ export PATH="${HOME}/.bin/nethack:${HOME}/.bin:/usr/local/sbin:/usr/local/bin:/usr/lib/ccache/bin:$PATH" export MPD_HOST=bishamon -export LUA_CPATH='/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?/init.so;./?.so' -export LUA_PATH='/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;?.lua' export MANPAGER="${HOME}/.bin/vimmanpager" export EDITOR=$(which vim) export SVN_SSH="${HOME}/.bin/ssh" -export DARCS_SSH="${HOME}/.bin/ssh" -export DARCS_SCP="${HOME}/.bin/scp" -export DARCS_SFTP="${HOME}/.bin/sftp" export GIT_SSH="${HOME}/.bin/ssh" export RSYNC_RSH="${HOME}/.bin/ssh" -export PERL5LIB="${HOME}/perl5/local/" -export CVS_RSH="${HOME}/.bin/ssh" export TEXINPUTS=".:${HOME}/conf/tex:" export LESS='-QR' export NOPASTE_SERVICES="ssh" @@ -19,10 +12,8 @@ export NOPASTE_SSH_SERVER="paste.tozt.net" export NOPASTE_SSH_DOCROOT="paste" export NOPASTE_SSH_WEBPATH="http://paste.tozt.net" export NOPASTE_SSH_MODE=0644 -export PERL_CPANM_OPT="-q --mirror file://${HOME}/perl5/minicpan/ --mirror http://mirrors.kernel.org/cpan/ --mirror http://search.cpan.org/CPAN --prompt" +export PERL_CPANM_OPT="-q --mirror file://${HOME}/perl5/minicpan/ --mirror http://mirrors.kernel.org/cpan/ --mirror http://cpan.metacpan.org/ --prompt" type git > /dev/null 2>&1 && export GIT_EXEC_PATH="${HOME}/.bin/git:"`git --exec-path` -[ -x /usr/bin/lesspipe ] && export LESSOPEN='|/usr/bin/lesspipe %s' -[ -x /usr/bin/lesspipe.sh ] && export LESSOPEN='|/usr/bin/lesspipe.sh %s' [ -f $HOME/perl5/perlbrew/etc/bashrc ] && source $HOME/perl5/perlbrew/etc/bashrc [ -f $HOME/python/bin/activate ] && source $HOME/python/bin/activate diff --git a/gitconfig b/gitconfig index be0bead..5823845 100644 --- a/gitconfig +++ b/gitconfig @@ -10,7 +10,6 @@ log-branch = !git log master..HEAD review-branch = !git review master..HEAD review = "!f() { for rev in $(git rev-list --reverse \"$@\"); do git show $rev; done; }; f" - unstage = reset -q HEAD info = remote show -n origin graph = log --all --graph --color=always --pretty='[%C(cyan)%h%Creset]%C(bold cyan)%d%Creset %s' prune-all = !git remote | xargs -n 1 git remote prune diff --git a/i3/config b/i3/config index 644e6c6..ce4e1d2 100644 --- a/i3/config +++ b/i3/config @@ -70,52 +70,6 @@ bindsym $mod+j focus down bindsym $mod+k focus up bindsym $mod+l focus right -bindsym $mod+Mod4+1 exec keyboard-swarp 1 -bindsym $mod+Mod4+2 exec keyboard-swarp 2 -bindsym $mod+Mod4+3 exec keyboard-swarp 3 -bindsym $mod+Mod4+4 exec keyboard-swarp 4 -bindsym $mod+Mod4+5 exec keyboard-swarp 5 -bindsym $mod+Mod4+6 exec keyboard-swarp 6 -bindsym $mod+Mod4+7 exec keyboard-swarp 7 -bindsym $mod+Mod4+8 exec keyboard-swarp 8 -bindsym $mod+Mod4+9 exec keyboard-swarp 9 -bindsym $mod+Mod4+0 exec keyboard-swarp 0 -bindsym $mod+Mod4+minus exec keyboard-swarp - -bindsym $mod+Mod4+equal exec keyboard-swarp = -bindsym $mod+Mod4+q exec keyboard-swarp q -bindsym $mod+Mod4+w exec keyboard-swarp w -bindsym $mod+Mod4+e exec keyboard-swarp e -bindsym $mod+Mod4+r exec keyboard-swarp r -bindsym $mod+Mod4+t exec keyboard-swarp t -bindsym $mod+Mod4+y exec keyboard-swarp y -bindsym $mod+Mod4+u exec keyboard-swarp u -bindsym $mod+Mod4+i exec keyboard-swarp i -bindsym $mod+Mod4+o exec keyboard-swarp o -bindsym $mod+Mod4+p exec keyboard-swarp p -bindsym $mod+Mod4+bracketleft exec keyboard-swarp [ -bindsym $mod+Mod4+bracketright exec keyboard-swarp ] -bindsym $mod+Mod4+a exec keyboard-swarp a -bindsym $mod+Mod4+s exec keyboard-swarp s -bindsym $mod+Mod4+d exec keyboard-swarp d -bindsym $mod+Mod4+f exec keyboard-swarp f -bindsym $mod+Mod4+g exec keyboard-swarp g -bindsym $mod+Mod4+h exec keyboard-swarp h -bindsym $mod+Mod4+j exec keyboard-swarp j -bindsym $mod+Mod4+k exec keyboard-swarp k -bindsym $mod+Mod4+l exec keyboard-swarp l -bindsym $mod+Mod4+semicolon exec keyboard-swarp ; -bindsym $mod+Mod4+apostrophe exec keyboard-swarp ' -bindsym $mod+Mod4+z exec keyboard-swarp z -bindsym $mod+Mod4+x exec keyboard-swarp x -bindsym $mod+Mod4+c exec keyboard-swarp c -bindsym $mod+Mod4+v exec keyboard-swarp v -bindsym $mod+Mod4+b exec keyboard-swarp b -bindsym $mod+Mod4+n exec keyboard-swarp n -bindsym $mod+Mod4+m exec keyboard-swarp m -bindsym $mod+Mod4+comma exec keyboard-swarp , -bindsym $mod+Mod4+period exec keyboard-swarp . -bindsym $mod+Mod4+slash exec keyboard-swarp / - bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up diff --git a/newsbeuter/config b/newsbeuter/config deleted file mode 100644 index 1ddcd56..0000000 --- a/newsbeuter/config +++ /dev/null @@ -1,22 +0,0 @@ -error-log "~/.newsbeuter/error.log" - -auto-reload yes -reload-threads 4 -suppress-first-reload yes -show-read-feeds no - -browser firefox - -color listfocus black cyan -color info green blue bold - -bind-key j down -bind-key k up -bind-key i quit -unbind-key i feedlist - -macro w set-tag webcomics -macro b set-tag blog - -ignore-article "http://drmcninja.com/feed" "title !~ \"[[:digit:]]+p[[:digit:]]+\"" -ignore-article "http://rsspect.com/rss/asw.xml" "title !~ \"A Softer World: [[:digit:]]\"" diff --git a/newsbeuter/urls b/newsbeuter/urls deleted file mode 100644 index 2bfd2ee..0000000 --- a/newsbeuter/urls +++ /dev/null @@ -1,112 +0,0 @@ -# blogs -http://stevan-little.blogspot.com/feeds/posts/default programming blog -http://feeds2.feedburner.com/yuvalkogman?format=xml programming blog -http://blog.sartak.org/feeds/posts/default programming blog -http://blog.urth.org/atom.xml programming blog -http://www.shadowcat.co.uk/feed/blog/matt-s-trout programming blog -http://rjbs.manxome.org/rubric/entries/user/rjbs/has_body/1?format=rss programming blog -http://chris.prather.org/atom.xml programming blog -http://blog.weftsoar.net/feeds/posts/default programming blog -http://perldition.org/feeds/articles/atom programming blog -http://perl-yarg.blogspot.com/feeds/posts/default programming blog -http://feeds.bulknews.net/bulknews programming blog -http://blog.plover.com/index.rss programming blog -http://www.onemogin.com/blog/rss.xml programming blog -http://feeds.feedburner.com/jshirley programming blog -http://jjnapiorkowski.typepad.com/modern-perl/atom.xml programming blog -http://www.modernperlbooks.com/mt/atom.xml programming blog -http://prog21.dadgum.com/atom.xml programming blog -http://ewontfix.com/feed.rss programming blog -http://verbistheword.wordpress.com/feed/ blog -http://genehack.org/feed/rss/index.xml blog -http://blog.moose.perl.org/atom.xml programming blog -http://me.veekun.com/atom.xml programming blog -http://clique.jonirons.net/feed/ marathon blog -http://www.patheos.com/community/slacktivist/feed/ religion politics blog -http://pervocracy.blogspot.com/feeds/posts/default sex blog -http://quizzicalpussy.com/feed/ sex blog -http://zeroatthebone.wordpress.com/feed/ blog -http://www.racialicious.com/feed/ blog -http://gentlemansc.blogspot.com/feeds/posts/default prof blog -http://learningcurves.blogspot.com/feeds/posts/default prof blog -http://ohboyteaching.wordpress.com/feed/ prof blog -http://feeds.feedburner.com/thelastpsychiatrist/fLMy blog -http://www.freshgreenskinnyjeans.com/feed/ blog -http://lightskaleaction.com/feed/ blog -http://offtopic.akrasiac.org/?feed=rss2 crawl-offtopic gender blog -http://offtopic.akrasiac.org/?feed=sfw crawl-offtopic links -http://offtopic.akrasiac.org/?feed=nsfw crawl-offtopic links -http://bettermyths.com/feed/ writing -http://tevisthompson.com/feed/ writing -http://blog.okcupid.com/index.php/feed/ -http://yoisthisracist.com/rss -http://www.archlinux.org/feeds/news/ -http://memepool.com/memepool.rss - -# webcomics -http://www.questionablecontent.net/QCRSS.xml webcomics -http://drmcninja.com/feed webcomics -http://rsspect.com/rss/qwantz.xml webcomics -http://rsspect.com/rss/asw.xml webcomics -http://www.xkcd.com/rss.xml webcomics -http://www.overcompensating.com/index.xml webcomics -http://achewood.com/rss.php webcomics -http://www.giantitp.com/comics/oots.rss webcomics -http://www.rsspect.com/rss/vagrant.xml webcomics -http://www.viruscomix.com/rss.xml webcomics -http://www.rsspect.com/rss/pfsc.xml webcomics -http://dresdencodak.com/category/comic/feed/ webcomics -http://basicinstructions.net/basic-instructions/rss.xml webcomics -http://www.marriedtothesea.com/rss/rss.php webcomics -http://www.dumbingofage.com/feed/rss/ webcomics -http://shaynamarchese.com/voids/?feed=rss2 webcomics -http://www.thenerdsofparadise.com/nerdsfeed.xml webcomics -http://feeds.feedburner.com/ScenesFromAMultiverse webcomics -http://garfieldminusgarfield.net/rss -http://feeds.feedburner.com/smbc-comics/PvLb - -# webcomics i'm behind on -#http://www.asciiartfarts.com/farts.rss webcomics catchup -#http://axecop.com/index.php/achome/rss_2.0/ webcomics catchup -#http://axecop.com/index.php/achome/rss_aac/ webcomics catchup -#http://feeds.feedburner.com/sintitulocomic webcomics catchup -#http://feeds.feedburner.com/TheSecretKnots webcomics catchup - -# webcomics - things to read eventually -#http://www.mspaintadventures.com/ -#http://girlyyy.com/ -#http://www.rice-boy.com/ -#http://www.threepanelsoul.com/ -#http://www.biggercheese.com/ -#http://catandgirl.com/ -#http://e-merl.com/ -#http://www.gunnerkrigg.com/ -#http://www.robertsergel.com/comics/ -#http://www.journeytomtmoriah.com/ -#http://nobodyscores.loosenutstudio.com/ -#http://www.phdcomics.com/ -#http://secretvespers.com/ -#http://www.gwscomic.com/ -#http://templaraz.com/ -#http://www.thezombiehunters.com/ -#http://wondermark.com/ -#http://www.freakangels.com/ -#http://www.gunshowcomic.com/ -#http://www.somethingpositive.net/ -#http://requiem.seraph-inn.com/ -#http://www.happletea.com/ - -# webcomics - no longer updating (but may come back?) -#http://pbfcomics.com/ -#http://blipcomic.com -#http://www.artistegullible.com/ - -# webcomics - finished -#http://anderslovesmaria.reneengstrom.com/ -#http://www.undefined.net/1/0/ -#http://www.alessonislearned.com/ -#http://www.krakow.krakowstudios.com/krakow/ -#http://www.qwantz.com/apologies/ -#http://www.kiwisbybeat.com/minus.html -#http://www.bohemiandrive.com/comics/npwil.html -#http://www.brightestcomic.com/ diff --git a/xinitrc b/xinitrc index f3281c1..d17e785 100644 --- a/xinitrc +++ b/xinitrc @@ -1,9 +1,4 @@ -#!/bin/bash - -ulimit -Sm 2048000 - -cd $HOME -. "$HOME/.bashrc" +#!/bin/sh pidof svscan || (svscan $HOME/.services 2>&1 | readproctitle $USER ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................) & diff --git a/xmobarrc b/xmobarrc deleted file mode 100644 index d8b061f..0000000 --- a/xmobarrc +++ /dev/null @@ -1,20 +0,0 @@ -Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" - , bgColor = "black" - , fgColor = "grey" - , position = Bottom - , lowerOnStart = True - , commands = [ Run Weather "KORD" ["-t","<tempF>F","-L","50","-H","75","--normal","darkgreen","--high","darkred","--low","lightblue"] 36000 - , Run Network "wlan0" ["-L","0","-H","32","--normal","darkgreen","--high","darkred"] 10 - , Run Cpu ["-L","3","-H","50","--normal","darkgreen","--high","darkred"] 10 - , Run Memory ["-t","Mem: <usedratio>%"] 10 - , Run Swap [] 10 - , Run Date "%a %b %_d %H:%M:%S" "date" 10 - , Run Battery [] 10 - , Run StdinReader - ] - , sepChar = "%" - , alignSep = "}{" - , template = "%StdinReader% }{ %KORD% | %cpu% | %memory% * %swap% | %wlan0% | %battery% | <fc=#ee9a00>%date%</fc>" - } - --- vim:ft=haskell: diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs deleted file mode 100644 index 6383265..0000000 --- a/xmonad/xmonad.hs +++ /dev/null @@ -1,108 +0,0 @@ --- --- xmonad example config file. --- --- A template showing all available configuration hooks, --- and how to override the defaults in your own xmonad.hs conf file. --- --- Normally, you'd only override those defaults you care about. --- - -import XMonad -import XMonad.Actions.CycleWS -import XMonad.Hooks.ManageDocks -import XMonad.Hooks.DynamicLog -import XMonad.Hooks.FadeInactive -import XMonad.Hooks.UrgencyHook -import XMonad.Layout.Reflect -import XMonad.Layout.WindowNavigation -import XMonad.Prompt -import XMonad.Prompt.AppLauncher -import XMonad.Prompt.Input -import XMonad.Prompt.Shell -import XMonad.Prompt.XMonad -import XMonad.Util.Font(stringToPixel) -import XMonad.Util.Run(spawnPipe) -import XMonad.Util.EZConfig(additionalKeysP) -import qualified XMonad.StackSet as W -import System.IO -import Data.List -import System.Directory -import Data.Char - -main = do - xmproc <- spawnPipe "xmobar" - xmonad $ withUrgencyHookC BorderUrgencyHook urgencyConfig { suppressWhen = Never } $ defaultConfig { - terminal = "urxvtc", - modMask = mod4Mask, - normalBorderColor = "#000000", - focusedBorderColor = "#aaaaaa", - workspaces = ["term", "browser", "docs", "4", - "5", "6", "7", "8", "9"], - layoutHook = avoidStruts myLayout, - manageHook = myManageHook <+> - manageDocks <+> - manageHook defaultConfig, - logHook = myFadeInactiveLogHook >> - (myXmobarLogHook xmproc) - } `additionalKeysP` [("C-M1-o", spawn "urxvtc") - ,("C-M1-b", spawn "firefox") - ,("C-S-l", spawn "xscreensaver-command -lock") - -- ugh, can't customize the prompt text - ,("C-M1-i", launchApp defaultXPConfig "urxvtc -name pwsafe -geometry 47x2 -e pwsafe -p") - ,("C-M1-r", shellPrompt defaultXPConfig) - ,("C-M1-x", xmonadPrompt defaultXPConfig) - ,("C-M1-q", killAllPrompt) - ,("C-M1-c", restart "xmonad" True) - ,("C-M1-<Left>", prevWS) - ,("C-M1-<Right>", nextWS) - ,("C-M1-<Up>", focusUrgent) - ,("C-S-M1-<Left>", shiftToPrev) - ,("C-S-M1-<Right>", shiftToNext) - ,("M1-<Tab>", windows W.focusDown) - ,("M1-S-<Tab>", windows W.focusUp) - ,("C-M1-h", sendMessage $ Go L) - ,("C-M1-j", sendMessage $ Go D) - ,("C-M1-k", sendMessage $ Go U) - ,("C-M1-l", sendMessage $ Go R) - ] - -myLayout = configurableNavigation noNavigateBorders (tiled ||| Mirror tiled ||| Full) - where - tiled = reflectHoriz $ Tall nmaster delta ratio - nmaster = 2 - ratio = 0.662 - delta = 0.0005 - -myFadeInactiveLogHook = - fadeInactiveLogHook 0xbbbbbbbb - -myXmobarLogHook xmproc = - dynamicLogWithPP $ xmobarPP - { ppOutput = hPutStrLn xmproc - , ppTitle = xmobarColor "green" "" . shorten 100 - , ppUrgent = xmobarColor "yellow" "red" . xmobarStrip - } - -data BorderUrgencyHook = BorderUrgencyHook deriving (Read, Show) - -instance UrgencyHook BorderUrgencyHook where - urgencyHook _ win = - do color <- withDisplay (\display -> io (stringToPixel display "#ff0000")); withDisplay (\display -> io (setWindowBorder display win color)) - -myManageHook = composeAll [ resource =? "xmessage" --> doFloat - , resource =? "qemu" --> doFloat - , resource =? "pwsafe" --> doFloat - , resource =? "urxvt-kuake" --> doFloat - , resource =? "qemu-system-x86_64" --> doFloat - , resource =? "plugin-container" --> doFloat - , resource =? "explorer.exe" --> doFloat - , stringProperty "WM_WINDOW_ROLE" =? "CallWindow" --> doFloat - , resource =? "firefox-bin" --> doF (W.shift "browser") - , resource =? "win" --> doF (W.shift "docs") -- xpdf - , resource =? "feh" --> doF (W.shift "docs") - ] - -killAllPrompt = inputPromptWithCompl defaultXPConfig "killall" runningProcessesCompl ?+ killAll -killAll procName = spawn ("killall " ++ procName) -runningProcessesCompl str = runningProcesses >>= (\procs -> return $ filter (\proc -> str `isPrefixOf` proc) procs) -runningProcesses = getDirectoryContents "/proc" >>= (\dir -> return $ map (\pid -> "/proc/" ++ pid ++ "/comm") $ filter (\dir -> all isDigit dir) $ dir) >>= (\filenames -> sequence $ map (\filename -> openFile filename ReadMode >>= hGetContents) filenames) >>= (\procs -> return $ sort $ nub $ map (\proc -> init proc) procs) -- cgit v1.2.3-54-g00ecf