Commit c0845589 authored by Scott J's avatar Scott J

initial commit

parents
Tomas Matejicek <www.slax.org>
Peter Munch-Ellingsen <www.peterme.net>
This diff is collapsed.
CC = gcc
LDFLAGS = -lImlib2 -lX11
CFLAGS ?= -O2 -s -std=c99
#CFLAGS ?= -ggdb -g3 # For debugging
all: xlunch entries.dsv
install: xlunch
mkdir -p $(DESTDIR)/etc/xlunch/
mkdir -p $(DESTDIR)/usr/share/xlunch/svgicons/
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
mkdir -p $(DESTDIR)/usr/share/applications
cp extra/ghost.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png
cp docs/logo.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch.png
cp xlunch $(DESTDIR)/usr/bin/
cp extra/genentries $(DESTDIR)/usr/bin
cp extra/genentries.desktop $(DESTDIR)/usr/share/applications/
bash extra/genentries --path $(DESTDIR)/usr/share/xlunch/svgicons/ > $(DESTDIR)/etc/xlunch/entries.dsv
cp -r svgicons/ $(DESTDIR)/usr/share/xlunch/ 2>/dev/null || :
remove:
rm -r $(DESTDIR)/etc/xlunch
rm -r $(DESTDIR)/usr/share/xlunch
rm -r $(DESTDIR)/usr/bin/xlunch
rm -r $(DESTDIR)/usr/bin/genentries
rm $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png
rm $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch.png
rm $(DESTDIR)/usr/share/applications/genentries.desktop
livetest: xlunch
./extra/gentriesquick > /tmp/xlunch-tmp.dsv
./xlunch -g extra/wp.jpg -f "extra/OpenSans-Regular.ttf/10" -i /tmp/xlunch-tmp.dsv -b 140 --iconpadding 20 --textpadding 10 --paddingswap --leastmargin 10 --scroll || true
rm -f /tmp/xlunch-tmp.dsv
test: xlunch
./xlunch -g extra/wp.jpg -f "extra/OpenSans-Regular.ttf/10" -i extra/sample_entries.dsv -b 140 --outputonly --iconpadding 20 --textpadding 10 --paddingswap --leastmargin 10 --highlight extra/highlight.png
xlunch: xlunch.c
$(CC) xlunch.c -o xlunch $(LDFLAGS) $(CFLAGS)
entries.dsv:
bash extra/genentries > entries.dsv
clean:
rm -f xlunch
rm -f entries.dsv
release:
bash extra/makerelease
# xlunch
Graphical app launcher for X, using pure Xlib and Imlib2.
# website
detailed info at: http://www.xlunch.org/
# compile and test with:
make test
# screenshots
![Screenshot](/../Screenshot/screenshot.png?raw=true "Screenshot")
![Screenshot](/../Screenshot/screenshot2.png?raw=true "Screenshot")
Version 3 of xlunch added a lot of customization options, here are some of them in use:
![Screenshot](/../Screenshot/screenshot3.png?raw=true "Screenshot")
xlunch.org
\ No newline at end of file
Branch for www pages hosted on github
This diff is collapsed.
console.log('This would be the main JS file.');
{
"name": "Xlunch",
"tagline": "Graphical app launcher for X with little dependencies",
"body": "# xlunch\r\nGraphical app launcher for X, using pure Xlib and Imlib2. It allows you to run a program by clicking its icon. Alternatively\r\nyou can just type any command using your keyboard. UTF8 is supported.\r\nThe Run commandline also works as a filter for the icons, as long as the title or command matches, icon is visible.\r\n\r\n![Screenshot](https://raw.githubusercontent.com/Tomas-M/xlunch/Screenshot/screenshot.png \"Screenshot\")\r\n\r\n**Available Modes**\r\n\r\n- One time launcher mode - this is default mode. In this mode, the launcher\r\n opens as a fullscreen application, and offers screen with icons to select\r\n application to run, plus commandline which serves as a filter for\r\n the icons at the same time. Running any app or command ends the launcher.\r\n- Kiosk mode - in this mode, the Run comand is disabled, thus user cannot\r\n type any command and the command line is not displayed in the launcher.\r\n User can only select icons to run with arrow keys (if launcher has focus).\r\n Input focus is not affected by this mode at all.\r\n- Fork mode - in this mode, the commands or apps are started as new process\r\n and the launcher keeps running. Input focus is not affected by this mode at all.\r\n Note that unless you combine fork mode with desktop mode (see below),\r\n your forked application window will most likely end up behind the launcher\r\n so it will look like nothing was started.\r\n- Desktop mode - in this mode, the launcher sends itself to lowest position,\r\n so all other windows are above it. This emulates desktop with icons.\r\n Input focus is affected in the way that the launcher never gets focus,\r\n so even if kiosk mode is disabled, user cannot use keyboard to use the launcher.\r\n Only mouse will work.\r\n\r\nIt is possible to combine all modes together. Keep in mind that if you use\r\ndesktop mode while you are running some other desktop already, you may\r\nend up with launcher even under your other desktop, thus it may be inaccessible.\r\nThe desktop mode is intended only for users without other desktop.\r\n\r\n![Screenshot](https://raw.githubusercontent.com/Tomas-M/xlunch/Screenshot/screenshot2.png \"Screenshot\")\r\n\r\n\r\n**Commandline options:**\r\n\r\n -k kiosk mode, disable Run prompt, allow user to only run by icon\r\n -d desktop mode, keep the launcher lowest (behind other windows)\r\n -v fork mode, keep running after executing a program\r\n \r\n -r use root window's background image\r\n Fails if your root window has no image set\r\n -g [file] Image to set as background (jpg/png)\r\n -m [i] margin (integer) specifies margin in pixels between icons\r\n -p [i] padding (integer) specifies padding inside icons in pixels\r\n -b [i] border (integer) specifies spacing border size in pixels\r\n -i [i] icon size (integer) in pixels\r\n -c [file] path to config file which describes titles, icons and commands\r\n -n Disable fullscreen\r\n -t [i] Top position (integer) in pixels for the Run commandline\r\n -x [text] string to display instead of 'Run: '\r\n -f [name] font name including size after slash, for example: DejaVuSans/10\r\n\r\n\r\n\r\n**Format of config file (default is /etc/xlunch/icons.conf) is:**\r\n\r\n title;icon_path;cmd\r\n title;icon_path;cmd\r\n title;icon_path;cmd\r\n title;icon_path;cmd\r\n\r\n\r\n**Compile:**\r\n\r\n gcc xlunch.c -o xlunch -lImlib2 -lX11 -lXcursor\r\n\r\n\r\nConfig file can be generated by ./genconf > /etc/xlunch/icons.conf\r\n\r\nBest practice is when you have a keyboard shortcut to start xlunch, such as Alt+F2\r\nOr have a button in taskbar to run it.\r\n\r\nTo start xlunch on i3wm for example, add this line to ~/.i3/config:\r\n\r\n bindsym $mod+F2 exec /usr/bin/xlunch\r\n ",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}
\ No newline at end of file
xlunch (graphical launcher for xorg/x11)
Xlunch is a small and simple graphical launcher for Xorg/X11. It
requires only pure Xlib and Imlib2. It allows you to run a program by
clicking its icon; alternatively, you can also just type any arbitrary
command using your keyboard. It is possible to run xlunch in two
different modes: Desktop mode and Quick launch mode.
Author: Tomas Matejicek
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/xlunch/icons.conf.new
# 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------------------------------------------------------|
xlunch: xlunch (graphical launcher for xorg/x11)
xlunch:
xlunch: Xlunch is a small and simple graphical launcher for Xorg/X11.
xlunch: It requires only pure Xlib and Imlib2. It allows you to run
xlunch: a program by clicking its icon; alternatively, you can also
xlunch: just type any arbitrary command using your keyboard.
xlunch: It is possible to run xlunch in two different modes:
xlunch: Desktop mode and Quick launch mode.
xlunch:
xlunch: Author: Tomas Matejicek, www.xlunch.org, www.slax.org
xlunch:
#!/bin/sh
# Slackware build script for xlunch
# Copyright 2016 Tomas Matejicek
# 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=xlunch
VERSION=${VERSION:-2.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -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
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
make
mkdir -p $PKG/usr/bin
make install DESTDIR=$PKG
mv $PKG/etc/xlunch/icons.conf $PKG/etc/xlunch/icons.conf.new
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat LICENSE > $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE
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}
PRGNAM="xlunch"
VERSION="2.4.1"
HOMEPAGE="http://www.xlunch.org/"
DOWNLOAD="https://github.com/Tomas-M/xlunch/archive/v2.4.1/xlunch-2.4.1.tar.gz"
MD5SUM="a8c046f117ce65d327e3e2fe5ec45c38"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="imlib2"
MAINTAINER="Tomas Matejicek"
EMAIL="tomas@slax.org"
This diff is collapsed.
/*
The MIT License (MIT)
Copyright (c) 2016 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
.pl-c /* comment */ {
color: #969896;
}
.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-s .pl-v /* string variable */ {
color: #0099cd;
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: #9774cb;
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: #ddd;
}
.pl-ent /* entity.name.tag */ {
color: #7bcc72;
}
.pl-k /* keyword, storage, storage.type */ {
color: #cc2372;
}
.pl-s /* string */,
.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
.pl-sr /* string.regexp */,
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: #3c66e2;
}
.pl-v /* variable */ {
color: #fb8764;
}
.pl-id /* invalid.deprecated */ {
color: #e63525;
}
.pl-ii /* invalid.illegal */ {
color: #f8f8f8;
background-color: #e63525;
}
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: #7bcc72;
}
.pl-ml /* markup.list */ {
color: #c26b2b;
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: #264ec5;
}
.pl-mq /* markup.quote */ {
color: #00acac;
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: #ddd;
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: #ddd;
}
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
color: #bd2c00;
background-color: #ffecec;
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
color: #55a532;
background-color: #eaffea;
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: #9774cb;
}
.pl-mo /* meta.output */ {
color: #264ec5;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
padding: 0;
margin: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
border: 0;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
body {
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 13px;
line-height: 1.5;
color: #000;
}
a {
font-weight: bold;
color: #d5000d;
}
header {
padding-top: 35px;
padding-bottom: 10px;
}
header h1 {
font-size: 48px;
font-weight: bold;
line-height: 1.2;
color: #303030;
letter-spacing: -1px;
}
header h2 {
font-size: 24px;
font-weight: normal;
line-height: 1.3;
color: #aaa;
letter-spacing: -1px;
}
#downloads {
display: none;
}
#main_content {
padding-top: 20px;
}
code, pre {
margin-bottom: 30px;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
font-size: 12px;
color: #222;
}
code {
padding: 0 3px;
}
pre {
padding: 20px;
overflow: auto;
border: solid 1px #ddd;
}
pre code {
padding: 0;
}
ul, ol, dl {
margin-bottom: 20px;
}
/* COMMON STYLES */
table {
width: 100%;
border: 1px solid #ebebeb;
}
th {
font-weight: 500;
}
td {
font-weight: 300;
text-align: center;
border: 1px solid #ebebeb;
}
form {
padding: 20px;
background: #f2f2f2;
}
/* GENERAL ELEMENT TYPE STYLES */
h1 {
font-size: 2.8em;
}
h2 {
margin-bottom: 8px;
font-size: 22px;
font-weight: bold;
color: #303030;
}
h3 {
margin-bottom: 8px;
font-size: 18px;
font-weight: bold;
color: #d5000d;
}
h4 {
font-size: 16px;
font-weight: bold;
color: #303030;
}
h5 {
font-size: 1em;
color: #303030;
}
h6 {
font-size: .8em;
color: #303030;
}
p {
margin-bottom: 20px;
font-weight: 300;
}
a {
text-decoration: none;
}
p a {
font-weight: 400;
}
blockquote {
padding: 0 0 0 30px;
margin-bottom: 20px;
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
}
ul li {
list-style-position: inside;
list-style: disc;
padding-left: 20px;
}
ol li {
list-style-position: inside;
list-style: decimal;
padding-left: 3px;
}
dl dd {
font-style: italic;
font-weight: 100;
}
footer {
padding-top: 20px;
padding-bottom: 30px;
margin-top: 40px;
font-size: 13px;
color: #aaa;
}