summaryrefslogtreecommitdiff
path: root/desktop/sfwbar
diff options
context:
space:
mode:
authorDamian Perticone <mjolnirdam@gmail.com>2022-05-19 23:22:47 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-05-21 08:25:15 +0700
commitf7287a1438db560a675387646cf6d473e57e68e3 (patch)
tree60a1bbe5689878d7a4d97da133ed7036e16fb28f /desktop/sfwbar
parentfb2c52aa31e4eb713cc3d4e7a6a93609bf785a00 (diff)
downloadslackbuilds-f7287a1438db560a675387646cf6d473e57e68e3.tar.gz
desktop/sfwbar: Added (Sway Floating Window Bar)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/sfwbar')
-rw-r--r--desktop/sfwbar/README31
-rw-r--r--desktop/sfwbar/inhibit_check.patch22
-rw-r--r--desktop/sfwbar/sfwbar.SlackBuild121
-rw-r--r--desktop/sfwbar/sfwbar.info10
-rw-r--r--desktop/sfwbar/slack-desc19
5 files changed, 203 insertions, 0 deletions
diff --git a/desktop/sfwbar/README b/desktop/sfwbar/README
new file mode 100644
index 0000000000..325bfe1da8
--- /dev/null
+++ b/desktop/sfwbar/README
@@ -0,0 +1,31 @@
+SFWBar (Sway Floating Window Bar) is a flexible taskbar application for
+wayland compositors, designed with a stacking layout in mind. Originally
+developed for Sway, SFWBar will work with other wayland compositors
+supporting layer shell protocol, and the taskbar functionality shall
+work with any compositor supportinig foreign toplevel protocol, but the
+pager, switcher and placement functionality requires sway
+(or at least i3 IPC support).
+
+SFWBar implements the following features:
+• Taskbar - to control floating windows
+• Task Switcher - to allow switching active window with a keyboard
+ (Alt-Tab)
+• Pager - to allow switching between workspaces
+• Tray - a systm tray using status notification item protocol
+• Window placement engine - to open new windows in more logical
+ locations
+• A simple widget set to display information from system files
+
+CONFIGURATION:
+Copy sfwbar.config from /usr/share/sfwbar/ to ~/.config/sfwbar/
+For more information on the format of configuration file, please see the
+man page
+
+you may want to add the following lines to your sway config file to open
+windows as floating by default:
+# open new windows as floating by default
+for_window [app_id="[.]*"] floating enable
+# set Alt-tab as a task switcher combo
+bindsym Alt+Tab bar hidden_state toggle
+# set $mod+c to hide/unhide taskbar
+bindsym $mod+c bar mode toggle
diff --git a/desktop/sfwbar/inhibit_check.patch b/desktop/sfwbar/inhibit_check.patch
new file mode 100644
index 0000000000..1c61883cf2
--- /dev/null
+++ b/desktop/sfwbar/inhibit_check.patch
@@ -0,0 +1,22 @@
+--- a/src/wayland.c 2022-04-14 21:01:09.000000000 +0100
++++ b/src/wayland.c 2022-05-16 21:32:21.208252447 +0100
+@@ -215,6 +215,9 @@
+ struct wl_surface *surface;
+ struct zwp_idle_inhibitor_v1 *inhibitor;
+
++ if(!idle_inhibit_manager)
++ return;
++
+ surface = gdk_wayland_window_get_wl_surface(
+ gtk_widget_get_window(widget));
+ inhibitor = g_object_get_data(G_OBJECT(widget),"inhibitor");
+@@ -237,6 +240,9 @@
+
+ void wayland_reset_inhibitors ( GtkWidget *w, gpointer data )
+ {
++ if(!idle_inhibit_manager)
++ return;
++
+ if(GTK_IS_CONTAINER(w))
+ gtk_container_foreach(GTK_CONTAINER(w),wayland_reset_inhibitors,data);
+
diff --git a/desktop/sfwbar/sfwbar.SlackBuild b/desktop/sfwbar/sfwbar.SlackBuild
new file mode 100644
index 0000000000..c6dd0324c1
--- /dev/null
+++ b/desktop/sfwbar/sfwbar.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+# Slackware build script for sfwbar
+
+# Copyright 2022 Damian Perticone Berisso,Argentina
+# 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=sfwbar
+VERSION=${VERSION:-1.0_beta6}
+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 {} \;
+
+#patch for river
+patch -p1 <$CWD/inhibit_check.patch
+
+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 \
+
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+
+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
+
+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 LICENSE README.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/sfwbar/sfwbar.info b/desktop/sfwbar/sfwbar.info
new file mode 100644
index 0000000000..587e2a6fbb
--- /dev/null
+++ b/desktop/sfwbar/sfwbar.info
@@ -0,0 +1,10 @@
+PRGNAM="sfwbar"
+VERSION="1.0_beta6"
+HOMEPAGE="https://github.com/LBCrion/sfwbar"
+DOWNLOAD="https://github.com/LBCrion/sfwbar/archive/v1.0_beta6/sfwbar-1.0_beta6.tar.gz"
+MD5SUM="7a55d7996921efd87e4b79aa54808459"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="gtk-layer-shell"
+MAINTAINER="Damian Perticone"
+EMAIL="mjolnirdam@gmail.com"
diff --git a/desktop/sfwbar/slack-desc b/desktop/sfwbar/slack-desc
new file mode 100644
index 0000000000..c9a996cce5
--- /dev/null
+++ b/desktop/sfwbar/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------------------------------------------------------|
+sfwbar: sfwbar (Sway Floating Window Bar)
+sfwbar:
+sfwbar: Sfwbar is a flexible taskbar application for wayland compositors,
+sfwbar: Originally developed for Sway, SFWBar will work with other wayland
+sfwbar: compositors supporting layer shell protocol.
+sfwbar:
+sfwbar:
+sfwbar:
+sfwbar:
+sfwbar: Home: https://github.com/LBCrion/sfwbar
+sfwbar: