svn commit: r490400 - in head/x11-wm/sway: . files
Jan Beich
jbeich at FreeBSD.org
Tue Jan 15 20:42:15 UTC 2019
Author: jbeich
Date: Tue Jan 15 20:42:13 2019
New Revision: 490400
URL: https://svnweb.freebsd.org/changeset/ports/490400
Log:
x11-wm/sway: improve default config
- Don't hardcode urxvt
- Make Windows key work
Added:
head/x11-wm/sway/files/
head/x11-wm/sway/files/swayterm (contents, props changed)
Modified:
head/x11-wm/sway/Makefile (contents, props changed)
head/x11-wm/sway/pkg-plist (contents, props changed)
Modified: head/x11-wm/sway/Makefile
==============================================================================
--- head/x11-wm/sway/Makefile Tue Jan 15 18:59:11 2019 (r490399)
+++ head/x11-wm/sway/Makefile Tue Jan 15 20:42:13 2019 (r490400)
@@ -3,6 +3,7 @@
PORTNAME= sway
DISTVERSION= 1.0-beta.2-189
DISTVERSIONSUFFIX= -g2573606b
+PORTREVISION= 1
CATEGORIES= x11-wm
MAINTAINER= jbeich at FreeBSD.org
@@ -46,8 +47,17 @@ post-patch:
# Let @sample handle default files under etc/
@${REINPLACE_CMD} -e '/config\.in/{ N; s/@BASENAME@/&.sample/; }' \
${WRKSRC}/meson.build
+# Let terminal chooser pick default
+ @${REINPLACE_CMD} -e 's/urxvt/swayterm/' \
+ ${WRKSRC}/config.in
post-patch-MANPAGES-off:
@${REINPLACE_CMD} -i '' "s/'scdoc/&-disabled/" ${WRKSRC}/meson.build
+
+post-install:
+ ${INSTALL_SCRIPT} ${FILESDIR}/swayterm ${STAGEDIR}${PREFIX}/bin
+ ${MKDIR} ${STAGEDIR}${ETCDIR}/config.d
+# x11/libxkbcommon has --with-default-rules="xorg" but x11/libinput expects "evdev"
+ ${ECHO_CMD} 'input * xkb_rules evdev' >${STAGEDIR}${ETCDIR}/config.d/evdev
.include <bsd.port.mk>
Added: head/x11-wm/sway/files/swayterm
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11-wm/sway/files/swayterm Tue Jan 15 20:42:13 2019 (r490400)
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# This file is in the public domain. It is based on i3-sensible-terminal.
+#
+# Find a terminal emulator among the list of known ones. Prefer user
+# default ($TERMINAL), system default (x-terminal-emulator on Debian)
+# then Wayland-native with few dependencies.
+#
+# See also https://lists.freedesktop.org/archives/xdg/2015-October/013583.html
+
+KNOWN_TERMINALS='
+ alacritty
+ sakura
+ termite
+ termit
+ tilix
+ kitty
+ cool-retro-term
+ qterminal
+ roxterm
+ xfce4-terminal
+ pantheon-terminal
+ terminology
+ gnome-terminal
+ mate-terminal
+ konsole
+ aminal
+ evilvte
+ mlterm
+ lxterminal
+ lilyterm
+ terminator
+ hyper
+ mrxvt
+ urxvt
+ xterm
+ st
+ Eterm
+ rxvt
+ aterm
+'
+
+for command in "$TERMINAL" x-terminal-emulator $KNOWN_TERMINALS; do
+ if hash "$command" 2>/dev/null; then
+ exec "$command" "$@"
+ fi
+done
+
+swaynag -m "${0##*/} could not find a terminal emulator. Please, \
+either install one, define \$TERMINAL or adjust Sway config."
Modified: head/x11-wm/sway/pkg-plist
==============================================================================
--- head/x11-wm/sway/pkg-plist Tue Jan 15 18:59:11 2019 (r490399)
+++ head/x11-wm/sway/pkg-plist Tue Jan 15 20:42:13 2019 (r490400)
@@ -3,6 +3,8 @@ bin/swaybar
bin/swaybg
bin/swaymsg
bin/swaynag
+bin/swayterm
+%%ETCDIR%%/config.d/evdev
@sample %%ETCDIR%%/config.sample
%%ETCDIR%%/security.d/10-freebsd
%%MANPAGES%%man/man1/sway.1.gz
More information about the svn-ports-head
mailing list