OSDN Git Service

better internet check
[instantos/instantOS.git] / programs / instantstartmenu
1 #!/bin/bash
2
3 # basic menu activated from the top left
4
5 CHOICE="$(echo ':b Applications
6 :b Settings
7 :b Terminal
8 :b Info
9 :g Documentation
10 :b Keybindings
11 :r Shutdown
12 :r Close menu' | instantmenu -i -bw 4 -w -1 -h -1 -n -l 10 -x 0 -F -a 0)"
13
14 [ -z "$CHOICE" ] && exit
15
16 echo "$CHOICE"
17 case "$CHOICE" in
18 *Applications)
19     sleep 0.05
20     appmenu &
21     ;;
22 *Settings)
23     instantsettings &
24     ;;
25 *Info)
26     st -e sh -c 'neofetch && echo -ne "$(cat /usr/share/instantutils/thanks.txt | sed "s/^/   /g")" && sleep 60m' &
27     ;;
28 *Shutdown)
29     instantshutdown &
30     ;;
31 *Terminal)
32     st &
33     ;;
34 *Documentation)
35     firefox 'https://instantos.github.io/instantos.github.io/documentation' &
36     ;;
37 *Keybindings)
38     st -e instanthotkeys &
39     ;;
40 *menu)
41     echo "closed menu"
42     ;;
43 *)
44     echo "other choice"
45     instantmenu_smartrun "startmenu" "$CHOICE"
46     ;;
47 esac
48
49 exit