zenity initial startup dialog; mate-panel requires mate-file-manager-schemas

This commit is contained in:
Jens Petersen 2013-09-12 17:15:35 +09:00
parent 45110e44ac
commit 4c48cb875f
2 changed files with 35 additions and 28 deletions

View File

@ -9,16 +9,12 @@ if [ ! -d $XMONAD_DIR ]; then
mkdir $XMONAD_DIR
cp -p /usr/share/xmonad/xmonad.hs $XMONAD_DIR
else
echo "xmonad-start: install xmonad-config to customize"
INFO="Install xmonad, xmonad-mate, or xmonad-config to customize xmonad."
echo "xmonad-start: $INFO"
fi
# display the manpage
case $DESKTOP_SESSION in
xmonad-mate) TERM_CMD="mate-terminal -x" ;;
*) TERM_CMD="xterm -e" ;;
esac
(sleep 5; $TERM_CMD man xmonad) &
else
XMONAD_CUSTOM=$XMONAD_DIR/xmonad-$(uname -i)-linux
# recompile if broken shared libs after an upgrade
if [ -r $XMONAD_DIR/xmonad.hs -a -x $XMONAD_CUSTOM ]; then
if ldd $XMONAD_CUSTOM | grep -q "not found"; then
xmonad --recompile
@ -26,12 +22,15 @@ else
fi
fi
case $DESKTOP_SESSION in
xmonad-mate)
# hack for gnome-session not starting screensaver for xmonad, etc
SCREENSAVER=/usr/bin/mate-screensaver
# FIXME STILL NEEDED? [ -x "$SCREENSAVER" ] && $SCREENSAVER & ;;
esac
XMONADSTART_CACHEDIR=$HOME/.cache/xmonad-start
NO_DIALOG_FILE=$HOME/.cache/xmonad-start/no-startup-dialog
if [ -x "/usr/bin/zenity" -a ! -r "$NO_DIALOG_FILE" ]; then
if ! zenity --question --text="To open an terminal press: Alt-Shift-Return\n\nManpage is available: man xmonad\n\n${INFO:+$INFO\n\n}\nShow this dialog next time?"; then
mkdir -p $XMONADSTART_CACHEDIR
touch $NO_DIALOG_FILE
fi
fi
if [ -r $XMONAD_DIR/session ]; then
sh $XMONAD_DIR/session

View File

@ -4,7 +4,7 @@
Name: %{pkg_name}
Version: 0.11
Release: 6%{?dist}
Release: 7%{?dist}
Summary: A tiling window manager
License: BSD
@ -76,6 +76,7 @@ Requires: xmonad-core = %{version}-%{release}
Requires: xterm
Requires: dmenu
Obsoletes: xmonad-core < 0.10-5
Requires: zenity
%description basic
xmonad is a tiling window manager for X. Windows are arranged
@ -94,6 +95,16 @@ configuration with xterm and dmenu.
If you want to customize xmonad, please install xmonad or xmonad-mate.
%package config
Summary: xmonad config
Requires: xmonad-core = %{version}-%{release}
Requires: ghc-xmonad-devel = %{version}-%{release}
Requires: ghc-xmonad-contrib-devel
%description config
This package provides a basic desktop configuration for xmonad.
%package core
Summary: A tiling window manager
# for xmessage
@ -106,22 +117,15 @@ To run the default xmonad configuration you should install xmonad-basic.
If you want to customize xmonad please install either xmonad or xmonad-mate.
%package config
Summary: xmonad config
Requires: xmonad-core = %{version}-%{release}
Requires: ghc-xmonad-devel = %{version}-%{release}
Requires: ghc-xmonad-contrib-devel
%description config
This package provides a basic desktop configuration for xmonad.
%package mate
Summary: xmonad MATE session
Requires: xmonad-config = %{version}-%{release}
Requires: mate-session-manager, mate-terminal
Requires: mate-panel, mate-settings-daemon
Obsoletes: xmonad-gnome < 0.11-3
# this makes mate-panel work without installing all of @mate
# https://bugzilla.redhat.com/show_bug.cgi?id=1007219
Requires: mate-file-manager-schemas
%description mate
xmonad is a tiling window manager for X. Windows are arranged
@ -178,6 +182,10 @@ rm %{buildroot}%{_pkgdocdir}/LICENSE
%{_datadir}/xsessions/%{name}.desktop
%files config
%{_datadir}/xmonad/xmonad.hs
%files core
%doc CONFIG LICENSE README README.fedora
%doc man/xmonad.{hs,1{.html,.markdown}}
@ -187,10 +195,6 @@ rm %{buildroot}%{_pkgdocdir}/LICENSE
%{_datadir}/applications/%{name}.desktop
%files config
%{_datadir}/xmonad/xmonad.hs
%files mate
%{_datadir}/xsessions/%{name}-mate.desktop
@ -204,6 +208,10 @@ rm %{buildroot}%{_pkgdocdir}/LICENSE
%changelog
* Thu Sep 12 2013 Jens Petersen <petersen@redhat.com> - 0.11-7
- mate-panel requires mate-file-manager-schemas to run (see #1007219)
- popup a zenity dialog for first-time users rather than manpage in terminal
* Mon Aug 19 2013 Jens Petersen <petersen@redhat.com> - 0.11-6
- use new _pkgdocdir to handled unversioned docdir