-
Notifications
You must be signed in to change notification settings - Fork 3
/
edmrc-sample
50 lines (43 loc) · 2.2 KB
/
edmrc-sample
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
#!/bin/bash
# rc file for explore-with-dmenu.sh
#
# This file is plain bash. It is sourced by explore-with-dmenu.sh after it loaded the defaults.
# This makes it possible to overwrite some or all of settings.
#
# There are 6 configurable variables that `explore-with-dmenu.sh` takes into account,
# but changing only 2 of them, the array $choices and the string $open_terminal_command,
# should be sufficient in most cases.
# the initial path explore-with-dmenu.sh uses; if not specified, defaults to $HOME
selected_path="$HOME"
# the path the selection history will be stored; defaults to ${HOME}/.config/.edm_history"
history_file="${HOME}/.config/.edm_history"
# the maximum number of recent entries that will be retained in the history file; defaults to 3
max_history_entries=3
# initial set of items shown at first
choices=(
'<open terminal here>' # add this special item to open a Shell at $selected_path
'.' # add this special item to open $selected_path in a Finder
'..' # add this special item to traverse to the parent folder
'path/to/some/often/used/folder' # add subdolders of $selected_path like this
'path/to/some/often/used/file.txt' # add files in folders under $selected_path like this
'my/music/library/'
'my/music/library/my favorite song.mp3'
"$(ls -t "$selected_path")" # output of `ls -t` on the $selected_path
"$(cat "$history_file")" # recent entries from prior runs
)
# if the array $choices is not specified, it defaults to:
# choices=(
# '<open terminal here>'
# '.'
# '..'
# "$(ls "$selected_path")"
# "$(cat "$history_file")"
# )
# the variable $open_command must store a command that will be executed with the chosen item is a
# file or the string '.';
# the command must be able to open files and folders and handle directory paths as arguments
open_command='xdg-open'
# the variable $open_terminal_command must store a command that will be executed with the chosen
# item is the string '<open terminal here>';
# the command must handle can open files and folders and directory paths as arguments
open_terminal_command='gnome-terminal --working-directory'