improve process calling

pull/40/head
TomasM 2017-11-12 04:46:24 -05:00
parent c912258000
commit f4083d292b
2 changed files with 26 additions and 26 deletions

View File

@ -58,7 +58,7 @@ rm -f $SIGNALFILE
while [ ! -e $SIGNALFILE ]; do
sleep 0.05
done
compton --sw-opti -e 0.9 --fade-exclude 'role*="fluxbox-toolbar"' --opacity-rule '70:role*="fluxbox-toolbar"' --no-fading-destroyed-argb -D 5 -c -f -l -2 -t -2 -r 0 -o 1 -z --shadow-exclude 'bounding_shaped'
compton --sw-opti -e 0.9 --fade-exclude 'role*="fluxbox-toolbar"' --opacity-rule '70:role*="fluxbox-toolbar"' --no-fading-destroyed-argb -D 5 -c -f -l -2 -t -2 -r 0 -o 1 -z --shadow-exclude 'bounding_shaped' &
) &
# Use sleep to enforce icon order

View File

@ -1,32 +1,32 @@
#!/bin/bash
exec xlunch --input /etc/xlunch/entries.dsv \
--background /usr/share/wallpapers/slax_wallpaper.jpg --font DejaVuSans/11 \
--voidclickterminate --iconpadding 30 --textpadding 10 \
--paddingswap --leastmargin 10 --hidemissing --iconsize 128 \
--highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \
--outputonly | while read LINE; do
COMMAND=$(
xlunch --input /etc/xlunch/entries.dsv \
--background /usr/share/wallpapers/slax_wallpaper.jpg --font DejaVuSans/11 \
--voidclickterminate --iconpadding 30 --textpadding 10 \
--paddingswap --leastmargin 10 --hidemissing --iconsize 128 \
--highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \
--outputonly
)
if [ "$LINE" = "" ]; then
continue
fi
if [ "$COMMAND" = "" ]; then
continue
fi
fbstartupnotify
fbstartupnotify
cmd="$(echo $LINE | sed -r "s/\\s.*//")"
whi="$(which $cmd | head -n 1)"
Xdep=$(ldd $whi | grep libX11)
Ndep=$(ldd $whi | grep libncurses)
cmd="$(echo $COMMAND | sed -r "s/\\s.*//")"
whi="$(which $cmd | head -n 1)"
Xdep=$(ldd $whi | grep libX11)
Ndep=$(ldd $whi | grep libncurses)
WAIT='echo "--------------------------------------------------"; read -n 1 -s -r -p "Command finished. Press any key to close window..."'
if [ "$Ndep" != "" -o "$cmd" = "man" -o "$cmd" = "mc" ]; then
WAIT=""
fi
WAIT='echo "--------------------------------------------------"; read -n 1 -s -r -p "Command finished. Press any key to close window..."'
if [ "$Ndep" != "" -o "$cmd" = "man" -o "$cmd" = "mc" ]; then
WAIT=""
fi
if [ "$Xdep" = "" -a "$cmd" != "chromium" ]; then
xterm -ls -e bash --login -c -- "echo $USER@$HOSTNAME:$PWD# '$LINE'; $LINE; $WAIT"
else
$LINE
fi
done
if [ "$Xdep" = "" -a "$cmd" != "chromium" ]; then
exec xterm -ls -e bash --login -c -- "echo $USER@$HOSTNAME:$PWD# '$COMMAND'; $COMMAND; $WAIT"
else
exec $COMMAND
fi