diff options
author | David Ferrone <zapwai@gmail.com> | 2022-04-30 04:00:39 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-30 13:52:00 +0700 |
commit | 974d62f6dd5645f49c33a9fbb1904ecb8a620e9a (patch) | |
tree | 4dff6df047484e5e1a0c81860161c7d34ab925ad /desktop | |
parent | 7419aebe574b5596e00e15fe390f13199843439c (diff) |
desktop/sl-fortune: Added (fortune in X with a slack-ish icon)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/sl-fortune/README | 23 | ||||
-rw-r--r-- | desktop/sl-fortune/doinst.sh | 3 | ||||
-rw-r--r-- | desktop/sl-fortune/sl-fortune.SlackBuild | 61 | ||||
-rw-r--r-- | desktop/sl-fortune/sl-fortune.info | 10 | ||||
-rw-r--r-- | desktop/sl-fortune/slack-desc | 19 |
5 files changed, 116 insertions, 0 deletions
diff --git a/desktop/sl-fortune/README b/desktop/sl-fortune/README new file mode 100644 index 0000000000000..2904e610fed86 --- /dev/null +++ b/desktop/sl-fortune/README @@ -0,0 +1,23 @@ +sl-fortune (a fortune notification in X with a slack-ish icon) + +sl-fortune (Slack Fortune) calls fortune and sends the output to +your desktop via notify-send. Three slack-themed icons are provided. + +When run as root the icon can be set to one of {tux, bob, slk}. +#sl-fortune bob + +sl-fortune can autostart if a user runs it with the --install flag. +$sl-fortune -i + +Upon installation it has a random delay, accessible when run with -r +$sl-fortune -r + +To disable, remove the -r flag in ~/.config/autostart/sl-fortune.desktop + +J.R. "Bob" Dobbs is a trademark of The SubGenius Foundation, Inc. +Visit http://www.subgenius.com for the good word from the Slack Master. + +sl-fortune v0.1, copyright (c) 2021 David Ferrone +May be freely distributed +under the terms of the GNU General Public License v2.0 + diff --git a/desktop/sl-fortune/doinst.sh b/desktop/sl-fortune/doinst.sh new file mode 100644 index 0000000000000..5fb28930db0b9 --- /dev/null +++ b/desktop/sl-fortune/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/desktop/sl-fortune/sl-fortune.SlackBuild b/desktop/sl-fortune/sl-fortune.SlackBuild new file mode 100644 index 0000000000000..26e4fe2be3d2a --- /dev/null +++ b/desktop/sl-fortune/sl-fortune.SlackBuild @@ -0,0 +1,61 @@ +#!/bin/bash + +# Slackware build for sl-fortune + +# Copyright 2021 David Ferrone RI, USA +# All rights reserved. + +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=sl-fortune +VERSION=${VERSION:-0.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +PKGTYPE=${PKGTYPE:-tgz} + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +set -e +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + +cd $TMP +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +chown -R root:root $PRGNAM +mv $PRGNAM/* $PKG && rmdir $PRGNAM + +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 diff --git a/desktop/sl-fortune/sl-fortune.info b/desktop/sl-fortune/sl-fortune.info new file mode 100644 index 0000000000000..c35fe9e515d50 --- /dev/null +++ b/desktop/sl-fortune/sl-fortune.info @@ -0,0 +1,10 @@ +PRGNAM="sl-fortune" +VERSION="0.1" +HOMEPAGE="https://zapwai.net/sl-fortune/" +DOWNLOAD="https://zapwai.net/downloads/sl-fortune-0.1.tar.gz" +MD5SUM="dc6e73f84df64b1fe4b085eb6c36ba8d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="David Ferrone" +EMAIL="zapwai@gmail.com" diff --git a/desktop/sl-fortune/slack-desc b/desktop/sl-fortune/slack-desc new file mode 100644 index 0000000000000..82444553bed0b --- /dev/null +++ b/desktop/sl-fortune/slack-desc @@ -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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +sl-fortune: sl-fortune (a fortune notification in X with a slack-ish icon) +sl-fortune: +sl-fortune: Slack Fortune calls fortune and sends a notification +sl-fortune: to your desktop. Includes three slack-themed icons. +sl-fortune: +sl-fortune: Enable (auto-start on login) as a user with the --install flag, e.g. +sl-fortune: $sl-fortune --install +sl-fortune: +sl-fortune: +sl-fortune: +sl-fortune: |