-
-
Notifications
You must be signed in to change notification settings - Fork 149
/
rofi-exts.sh
executable file
·52 lines (44 loc) · 1.19 KB
/
rofi-exts.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env sh
# Desc: Run rofi-extensions menu with custom modi.
# Author: Harry Kurn <[email protected]>
# URL: https://github.com/owl4ce/dotfiles/tree/ng/.config/rofi/scripts/rofi-exts.sh
# SPDX-License-Identifier: ISC
SYSTEM_LANG="$LANG"
export LANG='POSIX'
exec >/dev/null 2>&1
SYSINFO=''
SCREENSHOT=''
SESSION=''
MEDIA=''
MUSIC=''
CUSTOM_MODI="\
${SYSINFO}:${0%/*}/custom-modi/modi-sysinfo.sh,\
${SCREENSHOT}:${0%/*}/custom-modi/modi-screenshot.sh,\
${SESSION}:${0%/*}/custom-modi/modi-session.sh,\
${MEDIA}:${0%/*}/custom-modi/modi-media.sh,\
${MUSIC}:${0%/*}/custom-modi/modi-music.sh"
case "${1}" in
sys*) MODI="$SYSINFO"
;;
scr*) MODI="$SCREENSHOT"
;;
ses*) MODI="$SESSION"
;;
med*) MODI="$MEDIA"
;;
mus*) MODI="$MUSIC"
;;
esac
SYSTEM_LANG="$SYSTEM_LANG" \
exec rofi -theme-str '@import "exts.rasi"' \
-modi "$CUSTOM_MODI" \
-no-show-icons \
-no-lazy-grab \
-no-plugins \
-kb-custom-19 '' \
-kb-move-char-back '' \
-kb-move-char-forward '' \
-kb-mode-previous 'Left' \
-kb-mode-next 'Right' \
-show "${MODI:-${SYSINFO}}"
exit ${?}