OSDN Git Service

add 32 bit repo detection
[instantos/instantOS.git] / programs / instantstartmenu
1 #!/bin/bash
2
3 if [ -e /tmp/instantstartmenu ]; then
4     if ! pgrep instantstartmenu; then
5         rm /tmp/instantmenu
6     fi
7 fi
8
9 touch /tmp/instantmenu
10
11 CHOICE="$(echo 'applications
12 settings
13 terminal
14 info
15 shutdown
16 documentation
17 keybindings
18 close menu' | instantmenu -bw 4 -w 200 -n -l 10 -x 0 -y 34 -F)"
19
20 rm /tmp/instantstartmenu
21
22 [ -z "$CHOICE" ] && exit
23
24 echo "$CHOICE"
25 case "$CHOICE" in
26 applications)
27     appmenu &
28     ;;
29 settings)
30     instantsettings &
31     ;;
32 info)
33     st -e sh -c 'neofetch && sleep 60m' &
34     ;;
35 shutdown)
36     instantshutdown &
37     ;;
38 terminal)
39     st &
40     ;;
41 documentation)
42     firefox 'https://instantos.github.io/instantos.github.io/documentation' &
43     ;;
44 keybindings)
45     st -e instanthotkeys &
46     ;;
47 close)
48     echo "closed menu"
49     ;;
50 *)
51     echo "no choice"
52     ;;
53 esac
54
55 exit