mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
desktop/i3status: Added (status line generator for dzen2 / xmobar)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
cb4c0c65e2
commit
644ba9389a
5 changed files with 134 additions and 0 deletions
11
desktop/i3status/README
Normal file
11
desktop/i3status/README
Normal file
|
@ -0,0 +1,11 @@
|
|||
i3status - status line generator (for dzen2 and xmobar)
|
||||
|
||||
i3status is a small program (less than 1000 SLOC) for generating a
|
||||
status bar for dzen2, xmobar, or similar programs. It is designed
|
||||
to be very efficient by issuing a very small number of system calls,
|
||||
as one generally wants to update such a status line every second.
|
||||
This ensures that even under high load, your status bar is updated
|
||||
correctly. Also, it saves a bit of energy by not hogging your CPU
|
||||
as much as spawning the corresponding amount of shell commands would.
|
||||
|
||||
This requires confuse and dzen2.
|
15
desktop/i3status/doinst.sh
Normal file
15
desktop/i3status/doinst.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
config etc/i3status.conf.new
|
||||
|
79
desktop/i3status/i3status.SlackBuild
Normal file
79
desktop/i3status/i3status.SlackBuild
Normal file
|
@ -0,0 +1,79 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for i3status
|
||||
|
||||
# Written by Eugene Suter (easuter@gmail.com)
|
||||
|
||||
PRGNAM=i3status
|
||||
VERSION=${VERSION:-2.1}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e # Exit on most errors
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
LDFLAGS="-lm" \
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
# Don't clobber the config file
|
||||
mv $PKG/etc/i3status.conf $PKG/etc/i3status.conf.new
|
||||
|
||||
mv $PKG/usr/share/man $PKG/usr/
|
||||
rmdir $PKG/usr/share
|
||||
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
10
desktop/i3status/i3status.info
Normal file
10
desktop/i3status/i3status.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="i3status"
|
||||
VERSION="2.1"
|
||||
HOMEPAGE="http://i3.zekjur.net/i3status/"
|
||||
DOWNLOAD="http://i3.zekjur.net/i3status/i3status-2.1.tar.bz2"
|
||||
MD5SUM="712aba3f5e9f235b65bff51129d8eb04"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Eugene Suter"
|
||||
EMAIL="easuter@gmail.com"
|
||||
APPROVED="rworkman"
|
19
desktop/i3status/slack-desc
Normal file
19
desktop/i3status/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
i3status: i3status (status line generator for dzen2 and xmobar)
|
||||
i3status:
|
||||
i3status: i3status is a small program (less than 1000 SLOC) for generating a
|
||||
i3status: status bar for dzen2, xmobar, or similar programs. It is designed
|
||||
i3status: to be very efficient by issuing a very small number of system calls,
|
||||
i3status: as one generally wants to update such a status line every second.
|
||||
i3status: This ensures that even under high load, your status bar is updated
|
||||
i3status: correctly. Also, it saves a bit of energy by not hogging your CPU
|
||||
i3status: as much as spawning the corresponding amount of shell commands would.
|
||||
i3status:
|
||||
i3status: Website: http://i3.zekjur.net/i3status/
|
Loading…
Reference in a new issue