all repos — fluxbox @ e7ebe530bc576d8f3ab7e623b5f767d8e9c327b9

custom fork of the fluxbox windowmanager

fbsetbg updates from han
rathnor rathnor
commit

e7ebe530bc576d8f3ab7e623b5f767d8e9c327b9

parent

bfcc24bac7e002e9f4858e40d6051f5d3ebefdd0

2 files changed, 31 insertions(+), 12 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,7 @@

(Format: Year/Month/Day) Changes for 0.9.9: +*04/03/11: + * fbsetbg: special Esetroot check and message improvements (Han) *04/03/08: * Fix focus passing when grouping (Simon) Window.cc
M util/fbsetbgutil/fbsetbg

@@ -23,7 +23,7 @@ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -# $Id: fbsetbg,v 1.29 2004/01/22 05:48:41 fluxgen Exp $ +# $Id: fbsetbg,v 1.30 2004/03/11 00:08:34 rathnor Exp $ # Portability notes: # To guarantee this script works on all platforms that support fluxbox

@@ -33,7 +33,7 @@ # - don't use if ! command;, use command; if [ $? -ne 0 ];

# - don't use [ -e file ] use [ -r file ] # - don't use $(), use `` # - don't use ~, use ${HOME} -# - don't use id -u, use whoami +# - don't use id -u or $UID, use whoami # - don't use echo -e # - getopts won't work on all platforms, but the config-file can # compensate for that.

@@ -154,13 +154,20 @@ ;;

esac message() { - # echo if we have terminal output, otherwise - # pop up a window - if [ -t 1 ]; then - echo "$command: $@" - else - xmessage -center "$command: $@" - fi + + # This Terminal detection method is inaccurate. Looking for a + # replacement. + + # echo if we have terminal output, otherwise pop up a window + # if [ -t 1 ]; then + # echo "$command: $@" + # else + if find_it gxmessage; then + gxmessage -center "$command: $@" + else + xmessage -center "$command: $@" + fi + # fi } remembercommand() {

@@ -181,7 +188,7 @@

debugfbsetbg() { echo echo $debugstory - echo + echo $sad_esetroot_story exit 0 }

@@ -278,6 +285,9 @@ if [ -z "$wallpaper" ]; then

message "No previous wallpaper recorded for display ${DISPLAY}" exit 1 fi + else + message "No previous wallpaper recorded for display ${DISPLAY}" + exit 1 fi remember=false break ;;

@@ -317,8 +327,15 @@ wpsetters="`awk '/wpsetters/ {print $2}' $lastwallpaper` $wpsetters"

fi for wpsetter in $wpsetters; do if find_it $wpsetter; then - WPSETTER=$wpsetter - break + if [ ! "$wpsetter" = Esetroot ]; then + WPSETTER=$wpsetter + break + elif ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null; then + WPSETTER=$wpsetter + break + else + sad_esetroot_story="I also found Esetroot, but it doesn't have support for setting wallpapers. You need to install libimlib2 and rebuild Eterm to get it working." + fi fi done fi