File: startfluxbox.in

package info (click to toggle)
fluxbox 1.3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 7,576 kB
  • ctags: 6,412
  • sloc: cpp: 39,480; sh: 10,208; makefile: 1,823; ansic: 232; perl: 225
file content (72 lines) | stat: -rwxr-xr-x 1,597 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh

command="`basename \"$0\"`"
fluxdir="$HOME/.@pkgprefix@fluxbox@pkgsuffix@"
startup="$fluxdir/startup"

while [ $# -gt 0 ]; do
    case "$1" in
        -c|--config)
            if [ $# -lt 2 ]; then
                echo "$command:error, missing argument"
                exit 1
            fi
            shift
            startup=$1
        ;;
        -h|--help) cat <<EOF
Usage: $command [-h] [-c startupfile]
EOF
        exit
        ;;
    esac
    shift
done

if [ -x "$startup" ]; then
    exec "$startup"
elif [ -r "$startup" ]; then
    exec sh "$startup"
else
    if [ ! -d $fluxdir ]; then
        mkdir -p "$fluxdir/backgrounds" "$fluxdir/styles" "$fluxdir/pixmaps"
    fi
    if [ ! -r "$startup" ]; then
        ( cat << EOF
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap "$HOME/.Xmodmap"

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
#
# Debian-local change:
#   - fbautostart has been added with a quick hack to check to see if it
#     exists. If it does, we'll start it up by default.
which fbautostart > /dev/null
if [ \$? -eq 0 ]; then
    fbautostart
fi

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec @pkgprefix@fluxbox@pkgsuffix@
# or if you want to keep a log:
# exec @pkgprefix@fluxbox@pkgsuffix@ -log "$fluxdir/log"
EOF
    ) > "$startup"
    fi
    chmod 644 "$startup"
    exec sh "$startup"
fi