~ubuntu-branches/ubuntu/precise/fluxbox/precise

« back to all changes in this revision

Viewing changes to util/startfluxbox.in

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2008-07-01 10:38:14 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080701103814-khx2b6il152x9p93
Tags: 1.0.0+deb1-8
* x-dev has been removed from build-depends (out-of-date package).
* Standards-Version bumped to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# $Id: startfluxbox.in 4081 2005-07-12 04:56:05Z mathias $
3
 
 
4
 
command="`basename \"$0\"`"
5
 
startup=~/.fluxbox/startup
6
 
 
7
 
while [ $# -gt 0 ]; do
8
 
    case "$1" in
9
 
        -c|--config)
10
 
            if [ $# -lt 2 ]; then
11
 
                echo "$command:error, missing argument"
12
 
                exit 1
13
 
            fi
14
 
            shift
15
 
            startup=$1
16
 
        ;;
17
 
        -h|--help) cat <<EOF
18
 
Usage: $command [-h] [-c startupfile]
19
 
EOF
20
 
        exit
21
 
        ;;
22
 
    esac
23
 
    shift
24
 
done
25
 
 
26
 
if [ -x "$startup" ]; then
27
 
    exec "$startup"
28
 
elif [ -r "$startup" ]; then
29
 
    exec sh "$startup"
30
 
else
31
 
    if [ ! -d ~/.fluxbox ]; then
32
 
        mkdir -p ~/.fluxbox/{backgrounds,styles,pixmaps}
33
 
    fi
34
 
    if [ ! -r "$startup" ]; then
35
 
        ( cat << EOF
36
 
# fluxbox startup-script:
37
 
#
38
 
# Lines starting with a '#' are ignored.
39
 
 
40
 
# You can set your favourite wallpaper here if you don't want
41
 
# to do it from your style.
42
 
#
43
 
# bsetbg -f ~/pictures/wallpaper.png
44
 
#
45
 
# This sets a black background
46
 
 
47
 
@pkgbindir@/fbsetroot -solid black
48
 
 
49
 
# This shows the fluxbox-splash-screen
50
 
# fbsetbg -C @pkgdatadir@/splash.jpg
51
 
 
52
 
# Other examples. Check man xset for details.
53
 
#
54
 
# Turn off beeps:
55
 
# xset -b
56
 
#
57
 
# Increase the keyboard repeat-rate:
58
 
# xset r rate 195 35
59
 
#
60
 
# Your own fonts-dir:
61
 
# xset +fp $HOME/.font
62
 
#
63
 
# Your favourite mouse cursor:
64
 
# xsetroot -cursor_name right_ptr
65
 
#
66
 
# Change your keymap:
67
 
# xmodmap ~/.Xmodmap
68
 
 
69
 
 
70
 
 
71
 
# Applications you want to run with fluxbox.
72
 
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
73
 
#
74
 
# unclutter -idle 2 &
75
 
# wmnd &
76
 
# wmsmixer -w &
77
 
# idesk &
78
 
 
79
 
# And last but not least we start fluxbox.
80
 
# Because it is the last app you have to run it with ''exec'' before it.
81
 
 
82
 
exec @pkgbindir@/fluxbox
83
 
# or if you want to keep a log:
84
 
# exec @pkgbindir@/fluxbox -log ~/.fluxbox/log
85
 
EOF
86
 
    ) > "$startup"
87
 
    fi
88
 
    chmod 755 "$startup"
89
 
    exec "$startup"
90
 
fi