From a9902270f25119680ae5af532d83b9ec4b74a35e Mon Sep 17 00:00:00 2001 From: "Edinaldo P. Silva" Date: Fri, 23 Oct 2015 10:42:32 +0700 Subject: desktop/velox: Added (simple window manager). Signed-off-by: Willy Sudiarto Raharjo --- desktop/velox/README | 16 +++++++ desktop/velox/build-fixes.patch | 74 +++++++++++++++++++++++++++++ desktop/velox/doinst.sh | 3 ++ desktop/velox/slack-desc | 19 ++++++++ desktop/velox/velox.SlackBuild | 100 ++++++++++++++++++++++++++++++++++++++++ desktop/velox/velox.conf.sample | 76 ++++++++++++++++++++++++++++++ desktop/velox/velox.info | 10 ++++ desktop/velox/xcb-atom.patch | 12 +++++ desktop/velox/xcb-aux.patch | 12 +++++ 9 files changed, 322 insertions(+) create mode 100644 desktop/velox/README create mode 100644 desktop/velox/build-fixes.patch create mode 100644 desktop/velox/doinst.sh create mode 100644 desktop/velox/slack-desc create mode 100644 desktop/velox/velox.SlackBuild create mode 100644 desktop/velox/velox.conf.sample create mode 100644 desktop/velox/velox.info create mode 100644 desktop/velox/xcb-atom.patch create mode 100644 desktop/velox/xcb-aux.patch diff --git a/desktop/velox/README b/desktop/velox/README new file mode 100644 index 000000000000..6c99fda17785 --- /dev/null +++ b/desktop/velox/README @@ -0,0 +1,16 @@ +velox (velox is a simple window manager based on swc) + +velox is a simple window manager based on swc. It is inspired by dwm +and xmonad. + +velox uses tag-based window management similar to dwm. This allows you +to construct your workspace by selecting a set of tags to work with. +However, in contrast with dwm, windows do not have any screen +associated with them; they are shown on whichever screen has their tag +selected, allowing you to easily move windows between screens by +selecting their tag on a different screen. This is similar to the +multi-monitor workspace switching in xmonad. + +Copy /usr/doc/velox-0.0.3/velox.conf.sample to your $HOME/.velox.conf. + +Optional dependencie: dmenu. diff --git a/desktop/velox/build-fixes.patch b/desktop/velox/build-fixes.patch new file mode 100644 index 000000000000..730080f43478 --- /dev/null +++ b/desktop/velox/build-fixes.patch @@ -0,0 +1,74 @@ +diff -up src/velox-0.0.3/modules/alsa.c.orig src/velox-0.0.3/modules/alsa.c +--- src/velox-0.0.3/modules/alsa.c.orig 2014-03-27 03:59:31.000000000 -0600 ++++ src/velox-0.0.3/modules/alsa.c 2014-03-27 04:00:01.000000000 -0600 +@@ -20,8 +20,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + #include + #include +diff -up src/velox-0.0.3/velox/event.c.orig src/velox-0.0.3/velox/event.c +--- src/velox-0.0.3/velox/event.c.orig 2014-03-27 03:57:53.000000000 -0600 ++++ src/velox-0.0.3/velox/event.c 2014-03-27 03:58:00.000000000 -0600 +@@ -272,7 +272,7 @@ static void unmap_notify(xcb_unmap_notif + + xcb_grab_server(c); + +- property_values[0] = XCB_WM_STATE_WITHDRAWN; ++ property_values[0] = XCB_ICCCM_WM_STATE_WITHDRAWN; + property_values[1] = 0; + xcb_change_property(c, XCB_PROP_MODE_REPLACE, window->window_id, WM_STATE, WM_STATE, 32, 2, property_values); + +diff -up src/velox-0.0.3/velox/velox.c.orig src/velox-0.0.3/velox/velox.c +--- src/velox-0.0.3/velox/velox.c.orig 2014-03-27 03:56:23.000000000 -0600 ++++ src/velox-0.0.3/velox/velox.c 2014-03-27 03:57:38.000000000 -0600 +@@ -314,7 +314,7 @@ void show_window(xcb_window_t window_id) + + DEBUG_ENTER + +- property_values[0] = XCB_WM_STATE_NORMAL; ++ property_values[0] = XCB_ICCCM_WM_STATE_NORMAL; + property_values[1] = 0; + xcb_change_property(c, XCB_PROP_MODE_REPLACE, window_id, WM_STATE, WM_STATE, 32, 2, property_values); + +@@ -327,7 +327,7 @@ void hide_window(xcb_window_t window_id) + + DEBUG_ENTER + +- property_values[0] = XCB_WM_STATE_WITHDRAWN; // FIXME: Maybe this should be iconic? ++ property_values[0] = XCB_ICCCM_WM_STATE_WITHDRAWN; // FIXME: Maybe this should be iconic? + property_values[1] = 0; + xcb_change_property(c, XCB_PROP_MODE_REPLACE, window_id, WM_STATE, WM_STATE, 32, 2, property_values); + +@@ -766,7 +766,7 @@ void manage(xcb_window_t window_id) + + xcb_map_window(c, window->window_id); + +- property_values[0] = XCB_WM_STATE_NORMAL; ++ property_values[0] = XCB_ICCCM_WM_STATE_NORMAL; + property_values[1] = 0; + xcb_change_property(c, XCB_PROP_MODE_REPLACE, window->window_id, WM_STATE, WM_STATE, 32, 2, property_values); + +@@ -885,7 +885,7 @@ void manage_existing_windows() + continue; + } + +- if (window_attributes_replies[child]->map_state == XCB_MAP_STATE_VIEWABLE || ((uint32_t *) xcb_get_property_value(state_replies[child]))[0] == XCB_WM_STATE_ICONIC) ++ if (window_attributes_replies[child]->map_state == XCB_MAP_STATE_VIEWABLE || ((uint32_t *) xcb_get_property_value(state_replies[child]))[0] == XCB_ICCCM_WM_STATE_ICONIC) + { + manage(children[child]); + } +@@ -894,7 +894,7 @@ void manage_existing_windows() + { + if (*((xcb_window_t *) xcb_get_property_value(property_replies[child])) && + (window_attributes_replies[child]->map_state == XCB_MAP_STATE_VIEWABLE || +- ((uint32_t *) xcb_get_property_value(state_replies[child]))[0] == XCB_WM_STATE_ICONIC)) ++ ((uint32_t *) xcb_get_property_value(state_replies[child]))[0] == XCB_ICCCM_WM_STATE_ICONIC)) + { + manage(children[child]); + } diff --git a/desktop/velox/doinst.sh b/desktop/velox/doinst.sh new file mode 100644 index 000000000000..5fb28930db0b --- /dev/null +++ b/desktop/velox/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/velox/slack-desc b/desktop/velox/slack-desc new file mode 100644 index 000000000000..368dcb3cf539 --- /dev/null +++ b/desktop/velox/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------------------------------------------------------| +velox: velox (simple window manager) +velox: +velox: velox is a simple window manager based on swc. It is inspired by dwm +velox: and xmonad. +velox: +velox: Home page: https://www.openhub.net/p/velox-wm +velox: +velox: +velox: +velox: +velox: diff --git a/desktop/velox/velox.SlackBuild b/desktop/velox/velox.SlackBuild new file mode 100644 index 000000000000..1aa9988cac1b --- /dev/null +++ b/desktop/velox/velox.SlackBuild @@ -0,0 +1,100 @@ +#!/bin/sh +# +# Slackware build script for velox. +# +# Copyright 2015 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# 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="velox" +VERSION=${VERSION:-0.0.3} +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 + +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 -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 {} \; + +patch -Np2 < $CWD/xcb-atom.patch +patch -Np2 < $CWD/xcb-aux.patch +patch -Np2 < $CWD/build-fixes.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +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 + +DOCS="$CWD/velox.conf.sample AUTHORS.mkd COPYING NEWS.mkd README.mkd" + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/desktop/velox/velox.conf.sample b/desktop/velox/velox.conf.sample new file mode 100644 index 000000000000..675c4baac341 --- /dev/null +++ b/desktop/velox/velox.conf.sample @@ -0,0 +1,76 @@ +# velox.conf + +# property value +set mod logo +set window.border_color_active 0xff338833 +set window.border_color_inactive 0xff888888 +set window.border_width 2 + +set tag.1.name 1 +set tag.2.name 2 +set tag.3.name 3 +set tag.4.name 4 +set tag.5.name 5 +set tag.6.name 6 +set tag.7.name 7 +set tag.8.name 8 +set tag.9.name 9 + +# name type arguments +action spawn_terminal spawn st-wl +action spawn_run spawn dmenu_run-wl -b -fn Terminus:pixelsize=14 -nb "#1a1a1a" -nf "#999999" -sb "#338833" -sf "#ffffff" + +# key modifiers action +key j mod focus_next +key k mod focus_prev +key Return mod zoom +key space mod layout_next +key Tab mod previous_tags +key q mod,shift quit + +key g mod window.switch_layer +key c mod,shift window.close + +key h mod tall.decrease_master_size +key l mod tall.increase_master_size +key h mod,shift tall.increase_num_masters +key l mod,shift tall.decrease_num_masters +key h mod,ctrl tall.increase_num_columns +key l mod,ctrl tall.decrease_num_columns + +key Return mod,shift spawn_terminal +key r mod spawn_run + +key 1 mod tag.1.activate +key 2 mod tag.2.activate +key 3 mod tag.3.activate +key 4 mod tag.4.activate +key 5 mod tag.5.activate +key 6 mod tag.6.activate +key 7 mod tag.7.activate +key 8 mod tag.8.activate +key 9 mod tag.9.activate + +key 1 mod,ctrl tag.1.toggle +key 2 mod,ctrl tag.2.toggle +key 3 mod,ctrl tag.3.toggle +key 4 mod,ctrl tag.4.toggle +key 5 mod,ctrl tag.5.toggle +key 6 mod,ctrl tag.6.toggle +key 7 mod,ctrl tag.7.toggle +key 8 mod,ctrl tag.8.toggle +key 9 mod,ctrl tag.9.toggle + +key 1 mod,shift tag.1.apply +key 2 mod,shift tag.2.apply +key 3 mod,shift tag.3.apply +key 4 mod,shift tag.4.apply +key 5 mod,shift tag.5.apply +key 6 mod,shift tag.6.apply +key 7 mod,shift tag.7.apply +key 8 mod,shift tag.8.apply +key 9 mod,shift tag.9.apply + +button left mod window.begin_move:window.end_move +button left mod,shift window.begin_resize:window.end_resize + diff --git a/desktop/velox/velox.info b/desktop/velox/velox.info new file mode 100644 index 000000000000..4a8d7628f9b9 --- /dev/null +++ b/desktop/velox/velox.info @@ -0,0 +1,10 @@ +PRGNAM="velox" +VERSION="0.0.3" +HOMEPAGE="https://www.openhub.net/p/velox-wm" +DOWNLOAD="https://github.com/downloads/michaelforney/velox/velox-0.0.3.tar.bz2" +MD5SUM="0eda26856cdc9fbc68593b6b360970db" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libmpdclient" +MAINTAINER="Edinaldo P. Silva" +EMAIL="edps.mundognu@gmail.com" diff --git a/desktop/velox/xcb-atom.patch b/desktop/velox/xcb-atom.patch new file mode 100644 index 000000000000..08cc92663497 --- /dev/null +++ b/desktop/velox/xcb-atom.patch @@ -0,0 +1,12 @@ +diff -up src/velox-0.0.3/cmake/Modules/FindXCB-Atom.cmake.orig src/velox-0.0.3/cmake/Modules/FindXCB-Atom.cmake +--- src/velox-0.0.3/cmake/Modules/FindXCB-Atom.cmake.orig 2014-03-27 03:48:31.000000000 -0600 ++++ src/velox-0.0.3/cmake/Modules/FindXCB-Atom.cmake 2014-03-27 03:48:42.000000000 -0600 +@@ -16,7 +16,7 @@ find_path(XCB-Atom_INCLUDE_DIR + ) + + find_library(XCB-Atom_LIBRARY +- NAMES xcb-atom ++ NAMES xcb-util + PATHS ${XCB-Atom_PKGCONF_LIBRARY_DIRS} + ) + diff --git a/desktop/velox/xcb-aux.patch b/desktop/velox/xcb-aux.patch new file mode 100644 index 000000000000..5c8ea80c7fea --- /dev/null +++ b/desktop/velox/xcb-aux.patch @@ -0,0 +1,12 @@ +diff -up src/velox-0.0.3/cmake/Modules/FindXCB-Aux.cmake.orig src/velox-0.0.3/cmake/Modules/FindXCB-Aux.cmake +--- src/velox-0.0.3/cmake/Modules/FindXCB-Aux.cmake.orig 2014-03-27 03:51:44.000000000 -0600 ++++ src/velox-0.0.3/cmake/Modules/FindXCB-Aux.cmake 2014-03-27 03:52:11.000000000 -0600 +@@ -16,7 +16,7 @@ find_path(XCB-Aux_INCLUDE_DIR + ) + + find_library(XCB-Aux_LIBRARY +- NAMES xcb-aux ++ NAMES xcb-util + PATHS ${XCB-Aux_PKGCONF_LIBRARY_DIRS} + ) + -- cgit v1.2.3