diff options
author | Rex Dieter <rdieter@math.unl.edu> | 2017-02-28 11:11:44 -0600 |
---|---|---|
committer | Rex Dieter <rdieter@math.unl.edu> | 2017-02-28 11:11:44 -0600 |
commit | 6387086e4938d568c2bab185632f60e1619b3f68 (patch) | |
tree | 5f1974eda7b609a456413a895c36b0905636230e | |
parent | 7836138fe83d7ac94a711d51038ebf456069e161 (diff) |
Add better support for Enlightenment and LXQt (BR98561)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | scripts/xdg-email.in | 2 | ||||
-rw-r--r-- | scripts/xdg-open.in | 2 | ||||
-rw-r--r-- | scripts/xdg-settings.in | 2 | ||||
-rw-r--r-- | scripts/xdg-su.in | 51 | ||||
-rw-r--r-- | scripts/xdg-terminal.in | 34 | ||||
-rw-r--r-- | scripts/xdg-utils-common.in | 4 |
7 files changed, 96 insertions, 3 deletions
@@ -10,6 +10,10 @@ 2016-11-23 Rex Dieter <rdieter@fedoraproject.org> * xdg-open/xdg-email: add flatpack support (BR98824) +2016-08-25 Simon Lees <sflees@suse.de> + * Add support for LXQt + * Add enlightenment to xdg-email, xdg-settings + 2016-06-10 Rex Dieter <rdieter@fedoraproject.org> * xdg-open: prefer open_generic_xdg_x_scheme_handler over open_envvar (BR96472) diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in index d6b2715..3614776 100644 --- a/scripts/xdg-email.in +++ b/scripts/xdg-email.in @@ -484,7 +484,7 @@ case "$DE" in open_flatpak "$url" ;; - generic) + generic|lxqt|enlightenment) open_generic "${mailto}" ;; diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 07d40f0..9817c5f 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -511,7 +511,7 @@ case "$DE" in open_xfce "$url" ;; - lxde) + lxde|lxqt) open_lxde "$url" ;; diff --git a/scripts/xdg-settings.in b/scripts/xdg-settings.in index 3d03507..b65e659 100644 --- a/scripts/xdg-settings.in +++ b/scripts/xdg-settings.in @@ -852,7 +852,7 @@ case "$DE" in dispatch_specific xfce "$@" ;; - generic) + generic|lxqt|enlightenment) dispatch_specific generic "$@" ;; diff --git a/scripts/xdg-su.in b/scripts/xdg-su.in index bd31d4c..b7a9865 100644 --- a/scripts/xdg-su.in +++ b/scripts/xdg-su.in @@ -78,6 +78,49 @@ su_gnome() fi } +su_lxqt() +{ + LXQTSU=`which lxqt-sudo 2>/dev/null` + if [ $? -eq 0 ] ; then + if [ -z "$user" ] ; then + # -s option runs as su rather then sudo + $LXQTSU -s "$cmd" + else + # lxqt-sudo does not support specifying a user + su_generic + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi + else + su_generic + fi +} + +su_enlightenment() +{ +# Enlightenment doesn't have any reasonably working su/sudo graphical interface +# but terminology works as a drop in replacement for xterm and has a matching theme + if which terminology >/dev/null ; then + if [ -z "$user" ] ; then + terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd'" + else + terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd' '$user'" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi + else + su_generic + fi +} + su_generic() { if [ -z "$user" ] ; then @@ -167,6 +210,14 @@ case "$DE" in su_xfce ;; + lxqt) + su_lxqt + ;; + + enlightenment) + su_enlightenment + ;; + *) [ x"$user" = x"" ] && user=root exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'" diff --git a/scripts/xdg-terminal.in b/scripts/xdg-terminal.in index f4adc8b..f67897d 100644 --- a/scripts/xdg-terminal.in +++ b/scripts/xdg-terminal.in @@ -176,6 +176,32 @@ terminal_lxde() fi } +terminal_lxqt() +{ + if which qterminal &>/dev/null; then + if [ x"$1" = x"" ]; then + qterminal + else + qterminal -e "$1" + fi + else + terminal_generic "$1" + fi +} + +terminal_enlightenment() +{ + if which terminology &>/dev/null; then + if [ x"$1" = x"" ]; then + terminology + else + terminology -e "$1" + fi + else + terminal_generic "$1" + fi +} + #[ x"$1" != x"" ] || exit_failure_syntax command= @@ -232,6 +258,14 @@ case "$DE" in terminal_lxde "$command" ;; + lxqt) + terminal_lxqt "$command" + ;; + + enlightenment) + terminal_enlightenment "$command" + ;; + generic) terminal_generic "$command" ;; diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in index 05fa06d..a618900 100644 --- a/scripts/xdg-utils-common.in +++ b/scripts/xdg-utils-common.in @@ -291,6 +291,9 @@ detectDE() LXDE) DE=lxde; ;; + LXQt) + DE=lxqt; + ;; MATE) DE=mate; ;; @@ -312,6 +315,7 @@ detectDE() elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; fi fi |