OSDN Git Service

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