summaryrefslogtreecommitdiff
path: root/user/.config/i3/i3-menu
blob: 9659ea54cee71055d4b71ba81bb459f2e36b492b (plain)
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
34
#!/bin/sh

execute_action()
{
    case "$1" in
        quit)
            exec i3-msg exit
            ;;
        exec)
            shift
            eval exec "$@"
            ;;
        reload)
            exec i3-msg reload
            ;;
        restart)
            exec i3-msg restart
            ;;
        lock)
            exec lock
            ;;
    esac
}

cmd=$(cat << EOF | dmenu
exec
quit
reload
restart
lock
EOF
)

execute_action $cmd