aboutsummaryrefslogtreecommitdiff
path: root/desktop/nwg-shell
diff options
context:
space:
mode:
authorJay Lanagan <j@lngn.net>2023-03-03 23:37:30 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-04 08:06:29 +0700
commitb10e087eb039136506028f53c1a4f337f3365f0f (patch)
tree0dc6cda457d02f372cffc4c67b63aef2f4387c64 /desktop/nwg-shell
parent75ea21a87f2c3cf85b117e63336e8758d63fd3b8 (diff)
desktop/nwg-shell: Added (base shell and utils for sway-based shell)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/nwg-shell')
-rw-r--r--desktop/nwg-shell/README30
-rw-r--r--desktop/nwg-shell/nwg-shell.SlackBuild114
-rw-r--r--desktop/nwg-shell/nwg-shell.info10
-rw-r--r--desktop/nwg-shell/slack-desc19
-rw-r--r--desktop/nwg-shell/slackware.patch123
5 files changed, 296 insertions, 0 deletions
diff --git a/desktop/nwg-shell/README b/desktop/nwg-shell/README
new file mode 100644
index 0000000000000..91a2c5f78c48c
--- /dev/null
+++ b/desktop/nwg-shell/README
@@ -0,0 +1,30 @@
+nwg-shell (base shell and utils for Sway-based shell)
+
+Base package of utils and configurations for nwg-shell.
+
+This package acts as a meta-package to pull in all
+the dependencies for building the entire nwg-shell
+project.
+
+Installation of the nwg-shell WM on Slackware:
+
+First build/install this package and all of
+the dependencies.
+
+Ensure your $USER is in the 'video' group.
+
+1. Run (as $USER) 'xdg-user-dirs-update'
+2. then Run 'nwg-shell-installer -a'
+3. Launch 'sway'
+
+By default nwg-shell uses:
+-Firefox (web browsing)
+-mousepad (text editor)
+-thunar (file explorer)
+
+Ensure you have a full Slackware install
+(or everything but /kde). Default apps are
+from XFCE, so ensure you've installed the
+package series.
+
+All defaults are user configurable within the WM.
diff --git a/desktop/nwg-shell/nwg-shell.SlackBuild b/desktop/nwg-shell/nwg-shell.SlackBuild
new file mode 100644
index 0000000000000..02927e9df4859
--- /dev/null
+++ b/desktop/nwg-shell/nwg-shell.SlackBuild
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+# Slackware build script for nwg-shell
+
+# Copyright 2023 Jay Lanagan (j@lngn.net), Detroit, MI, 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=nwg-shell
+VERSION=${VERSION:-0.4.2}
+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 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
+
+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"
+elif [ "$ARCH" = "aarch64" ]; 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-v$VERSION.tar.?z
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+# patches removing refs to systemctl & replaced w/ loginctl & disable updater
+patch -Np1 -i $CWD/slackware.patch || exit 1
+
+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 {} \;
+
+python3 setup.py install --optimize=1 --root=$PKG
+mkdir -p $PKG/usr/share/backgrounds $PKG/usr/bin
+chmod 644 nwg-shell.jpg
+chmod 755 scripts/*
+cp nwg-shell.jpg $PKG/usr/share/backgrounds
+cp scripts/screenshot $PKG/usr/bin
+
+# Remove Arch updaters from our Slackware package, users are recommended
+# to use sbopkg, sboui, or their favorite SBo updater to get package updates.
+rm $PKG/usr/bin/nwg-shell-check-updates
+
+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
+
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+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/nwg-shell/nwg-shell.info b/desktop/nwg-shell/nwg-shell.info
new file mode 100644
index 0000000000000..a14e53bef0631
--- /dev/null
+++ b/desktop/nwg-shell/nwg-shell.info
@@ -0,0 +1,10 @@
+PRGNAM="nwg-shell"
+VERSION="0.4.2"
+HOMEPAGE="https://nwg-piotr.github.io/nwg-shell/"
+DOWNLOAD="https://github.com/nwg-piotr/nwg-shell/releases/download/v0.4.2/nwg-shell-v0.4.2.tar.gz"
+MD5SUM="d9892090a89a2d79ff85619f700b737d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="foot grim jq light papirus-icon-theme playerctl geopy slurp swappy sway swayidle swaylock swaybg wl-clipboard wlsunset azote gopsuinfo nwg-bar nwg-dock nwg-drawer nwg-menu nwg-look nwg-panel nwg-shell-config nwg-shell-wallpapers nwg-wrapper nwg-displays python3-autotiling python3-dasbus SwayNotificationCenter xdg-desktop-portal-wlr"
+MAINTAINER="Jay Lanagan"
+EMAIL="j@lngn.net"
diff --git a/desktop/nwg-shell/slack-desc b/desktop/nwg-shell/slack-desc
new file mode 100644
index 0000000000000..8d8eccbfa1cc8
--- /dev/null
+++ b/desktop/nwg-shell/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------------------------------------------------------|
+nwg-shell: nwg-shell (base shell and utils for sway-based shell)
+nwg-shell:
+nwg-shell: Base package of utils and configurations for nwg-shell.
+nwg-shell:
+nwg-shell: Homepage: https://github.com/nwg-piotr/nwg-shell
+nwg-shell:
+nwg-shell:
+nwg-shell:
+nwg-shell:
+nwg-shell:
+nwg-shell:
diff --git a/desktop/nwg-shell/slackware.patch b/desktop/nwg-shell/slackware.patch
new file mode 100644
index 0000000000000..9b05d1f639a0c
--- /dev/null
+++ b/desktop/nwg-shell/slackware.patch
@@ -0,0 +1,123 @@
+--- a/nwg_shell/skel/config/sway/autostart
++++ b/nwg_shell/skel/config/sway/autostart
+@@ -4,6 +4,5 @@
+ exec_always nwg-autotiling
+ exec_always nwg-drawer -r -s preset-0.css -term foot
+ exec_always nwg-panel -c preset-0 -s preset-0.css
+-exec_always nwg-shell-check-updates
+ exec nwg-look -a
+ exec nwg-shell-config
+
+--- a/nwg_shell/skel/config/nwg-bar/bar.json
++++ b/nwg_shell/skel/config/nwg-bar/bar.json
+@@ -11,12 +11,12 @@
+ },
+ {
+ "label": "Reboot",
+- "exec": "systemctl reboot",
++ "exec": "loginctl reboot",
+ "icon": "/usr/share/nwg-bar/images/system-reboot.svg"
+ },
+ {
+ "label": "Shutdown",
+- "exec": "systemctl -i poweroff",
++ "exec": "loginctl poweroff",
+ "icon": "/usr/share/nwg-bar/images/system-shutdown.svg"
+ }
+ ]
+
+--- a/nwg_shell/skel/config/nwg-panel/preset-0
++++ b/nwg_shell/skel/config/nwg-panel/preset-0
+@@ -81,11 +81,11 @@
+ },
+ {
+ "name": "Restart",
+- "cmd": "systemctl reboot"
++ "cmd": "loginctl reboot"
+ },
+ {
+ "name": "Shutdown",
+- "cmd": "systemctl -i poweroff"
++ "cmd": "loginctl poweroff"
+ }
+ ]
+ },
+
+--- a/nwg_shell/skel/config/nwg-panel/preset-1
++++ b/nwg_shell/skel/config/nwg-panel/preset-1
+@@ -83,11 +83,11 @@
+ },
+ {
+ "name": "Restart",
+- "cmd": "systemctl reboot"
++ "cmd": "loginctl reboot"
+ },
+ {
+ "name": "Shutdown",
+- "cmd": "systemctl -i poweroff"
++ "cmd": "loginctl poweroff"
+ }
+ ]
+ },
+
+--- a/nwg_shell/skel/config/nwg-panel/preset-2
++++ b/nwg_shell/skel/config/nwg-panel/preset-2
+@@ -103,11 +103,11 @@
+ },
+ {
+ "name": "Restart",
+- "cmd": "systemctl reboot"
++ "cmd": "loginctl reboot"
+ },
+ {
+ "name": "Shutdown",
+- "cmd": "systemctl -i poweroff"
++ "cmd": "loginctl poweroff"
+ }
+ ]
+ },
+@@ -150,8 +150,8 @@
+ "menu-start-settings": {
+ "cmd-lock": "swaylock -f -c 000000",
+ "cmd-logout": "swaymsg exit",
+- "cmd-restart": "systemctl reboot",
+- "cmd-shutdown": "systemctl -i poweroff",
++ "cmd-restart": "loginctl reboot",
++ "cmd-shutdown": "loginctl poweroff",
+ "autohide": true,
+ "file-manager": "thunar",
+ "height": 0,
+
+--- a/nwg_shell/skel/config/nwg-panel/preset-3
++++ b/nwg_shell/skel/config/nwg-panel/preset-3
+@@ -79,11 +79,11 @@
+ },
+ {
+ "name": "Restart",
+- "cmd": "systemctl reboot"
++ "cmd": "loginctl reboot"
+ },
+ {
+ "name": "Shutdown",
+- "cmd": "systemctl -i poweroff"
++ "cmd": "loginctl poweroff"
+ }
+ ]
+ },
+
+--- a/nwg_shell/skel/config/sway/config
++++ b/nwg_shell/skel/config/sway/config
+@@ -36,10 +36,9 @@
+
+ ############### Autostart ##################
+
+-exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
+ exec hash dbus-update-activation-environment 2>/dev/null && \
+- dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
+-exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
++ dbus-update-activation-environment --session DISPLAY WAYLAND_DISPLAY SWAYSOCK
++exec /usr/libexec/polkit-gnome-authentication-agent-1
+ exec ~/.azotebg
+
+ ### Turn off screen on lid closed
+