-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscratchpad
More file actions
executable file
·41 lines (32 loc) · 953 Bytes
/
scratchpad
File metadata and controls
executable file
·41 lines (32 loc) · 953 Bytes
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
#!/bin/sh
# This is a scratchpad script that works for both TUI and GUI applications.
case "$1" in
terminal)
entry="$TERMINAL --class terminal" ;;
fm)
entry="$TERMINAL --class fm -e ranger" ;;
music)
entry="$TERMINAL --class music -e cmus" ;;
bluetooth)
entry="$TERMINAL --class bluetooth -e bluetuith" ;;
email)
entry="$TERMINAL --class email -e neomutt" ;;
tageditor)
entry="easytag" ;;
whiteboard)
entry="xournalpp" ;;
esac
case "$entry" in
easytag)
xdotool search --onlyvisible --name "EasyTAG" windowunmap \
|| xdotool search --name "EasyTAG" windowmap || $entry &
;;
xournalpp)
xdotool search --onlyvisible --classname "com.github.xournalpp.xournalpp" windowunmap \
|| xdotool search --classname "com.github.xournalpp.xournalpp" windowmap || $entry &
;;
*)
xdotool search --onlyvisible --classname "$1" windowunmap \
|| xdotool search --classname "$1" windowmap || $entry &
;;
esac