File: system.9wmrc-menu

package info (click to toggle)
menu 2.1.51
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,084 kB
  • sloc: cpp: 4,510; sh: 1,414; makefile: 225; perl: 104; ansic: 52
file content (33 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (13)
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
#!/bin/bash

#I need to be executable!!
#
#(all the other system.*wm*.rc files don't need to be executable,
#but the 9wm one does.
#(the system.9wmrc-menu file doesn't need to be executable, though)

config=/etc/X11/9wm/system.9wmrc

#
#the next line inludes the /etc/X11/9wm/menudefs.hook file (or
#the personalised version from the user.
#
include-menu-defs

while test "$#" != "1" ; do
  case "$1" in
    --menu)
      (echo /usr/bin/X11/9menu -teleport -label $2 -popdown \
            `$2` exit)|/bin/sh; 
      shift;;
    --start)
      (echo /usr/bin/X11/9menu -iconic -teleport -label $2 -popdown \
            `$2` exit)|/bin/sh; 
      shift;;

    *)
      echo Usage: $config --menu menu-name
      exit;;
  esac
done