From dc3b800f8a06de40cd8c5e3daa3d22787f7db1c8 Mon Sep 17 00:00:00 2001 From: Damian Perticone Date: Sat, 16 Apr 2022 05:57:03 +0100 Subject: desktop/sway: Added (wayland i3 clone) Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- desktop/sway/README | 23 ++++++++ desktop/sway/slack-desc | 19 +++++++ desktop/sway/sway.SlackBuild | 131 +++++++++++++++++++++++++++++++++++++++++++ desktop/sway/sway.info | 10 ++++ 4 files changed, 183 insertions(+) create mode 100644 desktop/sway/README create mode 100644 desktop/sway/slack-desc create mode 100644 desktop/sway/sway.SlackBuild create mode 100644 desktop/sway/sway.info (limited to 'desktop') diff --git a/desktop/sway/README b/desktop/sway/README new file mode 100644 index 0000000000..ca286b276b --- /dev/null +++ b/desktop/sway/README @@ -0,0 +1,23 @@ +Sway is a tiling Wayland compositor and a drop-in replacement +for the i3 window manager for X11. + +It works with your existing i3 configuration and supports +most of i3's features, plus a few extras. + +Sway allows you to arrange your application windows logically, +rather than spatially. Windows are arranged into a grid by default +which maximizes the efficiency of your screen and can be quickly +manipulated using only the keyboard. + + +Sway config: make a sway directory in your /home/(user).config dir +copy config file from /etc/sway to /home/(user)/.config/sway +edit the config file to your taste. + +You'll need a menu launcher like for example bemenu or others. + +OPTIONAL DEPENDENCIES: + +grim for screenshots. +alacritty terminal or native wayland terminal like foot. +waybar or yambar for wayland bar. diff --git a/desktop/sway/slack-desc b/desktop/sway/slack-desc new file mode 100644 index 0000000000..10a70dbbd3 --- /dev/null +++ b/desktop/sway/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 ':'. + + |-----handy-ruler------------------------------------------------------| +sway: sway (wayland i3 clone) +sway: +sway: Sway is an "i3 like" desktop environment for wayland, built on +sway: top of the wlroots wayland compositor library. +sway: +sway: +sway: Home: https://swaywm.org/ +sway: +sway: +sway: +sway: diff --git a/desktop/sway/sway.SlackBuild b/desktop/sway/sway.SlackBuild new file mode 100644 index 0000000000..82f6f4f157 --- /dev/null +++ b/desktop/sway/sway.SlackBuild @@ -0,0 +1,131 @@ +#!/bin/bash + +# Slackware build script for sway + +# Copyright 2022 Damian Perticone Berisso,Argentina +# based on Biker-rat user work, kudos to him!. +# 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=sway +VERSION=${VERSION:-1.7} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +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 {} \; + +sed -i 's/0.60.0/0.59.4/g' meson.build +sed -i "s/'libsystemd', 'libelogind'/'libelogind'/g" meson.build + +mkdir build +cd build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + meson .. \ + --buildtype=release \ + --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc \ + -Dstrip=true \ + -Ddefault-wallpaper=true \ + -Dswaybar=true \ + -Dxwayland=enabled \ + -Dtray=enabled \ + -Dgdk-pixbuf=enabled \ + -Dswaynag=true \ + -Dbash-completions=true \ + -Dzsh-completions=true \ + -Dfish-completions=true \ + -Dsd-bus-provider=libelogind + + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +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 + +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 + +find $PKG -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CONTRIBUTING.md LICENSE *.md $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 diff --git a/desktop/sway/sway.info b/desktop/sway/sway.info new file mode 100644 index 0000000000..bed1f41b9c --- /dev/null +++ b/desktop/sway/sway.info @@ -0,0 +1,10 @@ +PRGNAM="sway" +VERSION="1.7" +HOMEPAGE="https://swaywm.org/" +DOWNLOAD="https://github.com/swaywm/sway/archive/v1.7/sway-1.7.tar.gz" +MD5SUM="fa6316f217d869cf0859adece8c3f745" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="seatd wlroots swaybg" +MAINTAINER="Damian Perticone" +EMAIL="mjolnirdam@gmail.com" -- cgit v1.2.3