summaryrefslogtreecommitdiff
path: root/.config/otter-launcher/config.toml
diff options
context:
space:
mode:
Diffstat (limited to '.config/otter-launcher/config.toml')
-rw-r--r--.config/otter-launcher/config.toml127
1 files changed, 127 insertions, 0 deletions
diff --git a/.config/otter-launcher/config.toml b/.config/otter-launcher/config.toml
new file mode 100644
index 0000000..1f4e9e9
--- /dev/null
+++ b/.config/otter-launcher/config.toml
@@ -0,0 +1,127 @@
+[general]
+default_module = "app" # The module to run when no prefix is matched
+empty_module = "a" # run with an empty prompt
+exec_cmd = "sh -c" # The exec command of your shell, default to sh
+# for example: "bach -c" for bash; "zsh -c" for zsh. This can also runs wm exec commands, like hyprctl dispatch exec
+vi_mode = true # set true to use vi keybinds, false to use emacs keybinds; default to emacs
+esc_to_abort = true # allow to quit with esc keypress; a useful option for vi users
+cheatsheet_entry = "?" # when entered, otter-launcher will show a list of configured modules
+cheatsheet_viewer = "less -R; clear" # the program that otter-launcher will pipe cheatsheet into
+clear_screen_after_execution = false # useful when chafa image flash back after module execution
+loop_mode = false # in loop mode, otter-launcher won't quit after running a module, useful when using scratchpad
+external_editor = "" # if set, pressing ctrl+e (or pressing v in vi normal mode) will edit the input field in the specified program; default to no external editor
+#callback = "" # if set, otter-launcher will run the command after a module is executed; for example, it can call swaymsg to adjust window size
+
+# ASCII color codes are allowed with these options. However, \x1b should be replaced with \u001B (unicode escape) because the rust toml crate cannot read \x as an escaped character...
+[interface]
+# use three quotes to write longer commands
+header = """
+ \u001B[34;1m >\u001B[0m $USER@$(echo $HOSTNAME) \u001B[31m\u001B[0m $(cat /proc/loadavg | cut -d ' ' -f 1) \u001B[33m󰍛\u001B[0m $(free -h | awk 'FNR == 2 {print $3}' | sed 's/i//')
+ \u001B[34;1m>\u001B[0;1m """
+# Run a shell command and make the stdout printed above the header
+header_cmd = ""
+header_cmd_trimmed_lines = 0 # Remove a number of lines from header_cmd output, in case of some programs printing excessive empty lines at the end of its output
+header_concatenate = false # print header and header_cmd output at the same line, default to false
+list_prefix = " "
+selection_prefix = " \u001B[31;1m> "
+place_holder = "type and search"
+default_module_message = " \u001B[33msearch\u001B[0m the internet" # if set, the text will be shown when the default module is in use
+empty_module_message = "" # the text to show when empty module is in use
+suggestion_mode = "list" # available options: list, hint
+suggestion_lines = 12 # length of the suggestion list, set to 0 to disable suggestions and tab completion
+indicator_with_arg_module = "\u001B[31m^\u001B[0m " # a sign showing whether the module should run with an argument
+indicator_no_arg_module = "\u001B[31m$\u001B[0m "
+prefix_padding = 3 # format prefixes to have a uniformed width; prefixes will be padded with spaces to have a least specified number of chars
+# below color options affect all modules; per-module coloring is allowed by using ascii color codes at each module's configurations
+prefix_color = "\u001B[33m"
+description_color = "\u001B[39m"
+place_holder_color = "\u001B[30m"
+hint_color = "\u001B[30m" # the color of hint mode suggestions
+# move the whole interface rightward or upward, easier for styling with chafa image
+move_right = 0
+move_up = 0
+
+
+[[modules]]
+description = "search with brave"
+prefix = "br"
+cmd = "setsid -f xdg-open 'https://search.brave.com/search?q={}'"
+with_argument = true
+url_encode = true
+
+[[modules]]
+description = "kill a runing app"
+prefix = "k"
+cmd = 'ps -u "$USER" -o comm= | sort -u | fsel --dmenu | xargs -r pkill -9'
+with_argument = true
+url_encode = true
+
+[[modules]]
+description = "launch apps with fsel"
+prefix = "a"
+cmd = "fsel --filter-desktop=no -vv -r -d -ss \"{}\""
+with_argument = true
+
+[[modules]]
+description = "launch apps instantly"
+prefix = "app"
+cmd = "fsel -vv -r -d -p {}"
+with_argument = true
+
+[[modules]]
+description = "manage clipboard with fsel"
+prefix = "cl"
+cmd = """
+fsel --cclip
+"""
+
+[[modules]]
+description = "find pkgs"
+prefix = "pm"
+cmd = "pmux -SD {}"
+with_argument = true
+
+[[modules]]
+description = "install pkgs"
+prefix = "i"
+cmd = "pmux -S {}"
+with_argument = true
+
+[[modules]]
+description = "power menu with fzf"
+prefix = "p"
+cmd = """
+function power {
+if [[ -n $1 ]]; then
+case $1 in
+"logout") session=`loginctl session-status | head -n 1 | awk '{print $1}'`; loginctl terminate-session $session ;;
+"suspend") systemctl suspend ;;
+"hibernate") systemctl hibernate ;;
+"reboot") systemctl reboot ;;
+"shutdown") systemctl poweroff ;;
+esac fi }
+power $(echo -e 'reboot\nshutdown\nlogout\nsuspend\nhibernate' | fzf --reverse --no-scrollbar --padding 1,3 --prompt 'Power Menu: ' | tail -1)
+"""
+
+[[modules]]
+description = "run command in terminal"
+prefix = "s"
+cmd = """
+setsid -f "$(echo $TERM | sed 's/xterm-//g')" -e {}
+"""
+with_argument = true
+
+[[modules]]
+description = "search archwiki"
+prefix = "w"
+cmd = "setsid -f xdg-open https://wiki.archlinux.org/index.php?search='{}'"
+with_argument = true
+url_encode = true
+
+[[modules]]
+description = "cambridge dictionary"
+prefix = "dc"
+cmd = "setsid -f xdg-open 'https://dictionary.cambridge.org/dictionary/english/{}'"
+with_argument = true
+url_encode = true
+