diff options
Diffstat (limited to '.config/otter-launcher')
| -rw-r--r-- | .config/otter-launcher/config.toml | 127 | ||||
| -rw-r--r-- | .config/otter-launcher/pikachu.example | 8 |
2 files changed, 135 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 + diff --git a/.config/otter-launcher/pikachu.example b/.config/otter-launcher/pikachu.example new file mode 100644 index 0000000..404e020 --- /dev/null +++ b/.config/otter-launcher/pikachu.example @@ -0,0 +1,8 @@ +[?25l[0m[38;2;23;45;78;48;2;21;45;78m▃[38;2;21;45;78;48;2;23;45;78m▚▄[48;2;21;45;78m [38;2;21;45;79m▗[38;2;20;45;79m╴[38;2;154;156;133;48;2;21;45;75m▁[38;2;215;190;124;48;2;22;46;69m▁[38;2;155;203;120;48;2;19;44;77m▄[38;2;121;176;93;48;2;20;45;74m▄[38;2;94;137;98;48;2;24;50;74m▖[38;2;21;47;79;48;2;21;46;77m▖[38;2;22;47;79;48;2;21;45;78m▖ [0m +[38;2;20;46;78;48;2;23;45;78m▇[48;2;21;45;78m [38;2;21;46;76m▂[38;2;21;45;78;48;2;26;47;79m┈[38;2;213;160;139;48;2;26;47;75m▁[38;2;66;67;74;48;2;180;158;119m▌[38;2;242;187;102;48;2;168;166;118m▇[38;2;251;181;90;48;2;242;198;103m▆[38;2;223;171;93;48;2;167;132;79m▉[38;2;198;129;93;48;2;58;85;69m▄[38;2;185;138;113;48;2;45;56;74m▖[38;2;194;137;112;48;2;26;46;74m▁[38;2;21;45;78;48;2;27;48;77m┈[48;2;21;45;78m [0m +[7m[38;2;21;45;78m [0m[38;2;145;111;100;48;2;30;48;75m▁[38;2;181;131;102;48;2;32;45;67m▄[38;2;204;142;104;48;2;64;56;67m▇[38;2;211;141;96;48;2;226;154;115m▆[38;2;213;141;96;48;2;224;151;107m▇[38;2;157;95;53;48;2;215;144;93m▁[38;2;122;64;29;48;2;214;141;89m▁[38;2;212;141;95;48;2;211;139;92m┈[38;2;203;124;78;48;2;212;138;92m╶[38;2;200;111;70;48;2;212;140;93m▄[38;2;99;65;63;48;2;188;116;85m▗[38;2;106;80;84;48;2;31;45;73m▎[38;2;20;46;79;48;2;21;45;78m▎[38;2;21;45;77m▁[0m +[38;2;98;69;56;48;2;28;45;71m▗[38;2;189;115;85;48;2;106;61;44m▝[38;2;165;85;53;48;2;199;110;70m▖[38;2;197;109;66;48;2;213;138;91m▄[38;2;213;141;93;48;2;212;142;95m▌[38;2;211;142;96;48;2;211;142;95m▉[38;2;210;141;94;48;2;159;96;54m▇[38;2;209;140;96;48;2;127;66;31m▇[38;2;211;140;98;48;2;231;153;148m▄[38;2;211;141;103;48;2;211;140;96m▘[38;2;210;127;84;48;2;213;138;95m▝[38;2;191;108;70;48;2;210;127;83m▝[38;2;188;111;77;48;2;75;59;66m▄[38;2;55;49;67;48;2;37;51;74m╴[38;2;211;199;147;48;2;22;45;75m▂[0m +[38;2;22;44;75;48;2;59;55;71m▇[38;2;150;91;67;48;2;44;49;68m▝[38;2;50;47;60;48;2;180;99;68m▂[38;2;183;104;71;48;2;202;118;76m▏[38;2;200;130;92;48;2;212;140;90m▁[38;2;198;105;69;48;2;213;141;95m▂[38;2;203;117;74;48;2;210;139;93m▄[38;2;192;104;64;48;2;209;133;88m─[38;2;207;124;82;48;2;213;137;92m─[38;2;210;132;88;48;2;211;140;93m▘[38;2;211;142;94;48;2;212;142;95m▍[38;2;213;141;94;48;2;209;133;88m▇[38;2;211;128;83;48;2;195;110;74m▇[38;2;202;118;71;48;2;94;73;60m▇[38;2;214;123;66;48;2;252;190;101m▂[0m +[38;2;76;104;149;48;2;20;46;80m▂[38;2;100;132;182m▅[38;2;157;179;215;48;2;23;46;79m▅[38;2;224;221;193;48;2;129;136;165m▅[38;2;238;193;128;48;2;180;157;150m▅[38;2;223;151;103;48;2;199;111;75m▇[38;2;207;125;81;48;2;212;135;89m▗[38;2;232;158;111;48;2;217;143;96m▗[38;2;216;146;98;48;2;211;142;94m▏[38;2;210;143;93;48;2;211;142;95m▂[38;2;203;125;80;48;2;211;142;93m▂[38;2;205;116;73;48;2;211;137;91m▁[38;2;213;133;89;48;2;210;125;83m▎[38;2;211;119;72;48;2;209;125;82m▝[38;2;178;120;110;48;2;205;116;77m▝[0m +[38;2;76;106;149;48;2;115;149;206m▖[38;2;127;166;218;48;2;111;151;211m▝[38;2;123;157;213;48;2;201;215;231m▅[38;2;174;192;223;48;2;239;201;142m▄[38;2;144;167;210;48;2;236;179;110m▂[38;2;181;194;226;48;2;219;151;113m▂[38;2;173;190;220;48;2;205;133;97m▂[38;2;142;164;209;48;2;223;152;115m▂[38;2;108;132;184;48;2;205;144;104m▂[38;2;108;130;189;48;2;201;139;100m▂[38;2;110;131;184;48;2;196;119;85m▂[38;2;204;195;156;48;2;205;122;81m▂[38;2;248;198;113;48;2;208;127;84m▂[38;2;163;168;192;48;2;202;127;90m▅[38;2;119;150;203;48;2;179;129;114m▅[0m +[38;2;21;45;79;48;2;44;75;111m▇[38;2;22;46;80;48;2;98;130;177m▅[38;2;21;49;83;48;2;131;164;220m▅[38;2;20;46;79;48;2;114;146;202m▂[38;2;16;44;84;48;2;113;148;206m▂[38;2;56;89;138;48;2;125;159;213m▖[38;2;132;165;220;48;2;177;205;238m▅[38;2;139;172;221;48;2;203;220;247m▅[38;2;137;172;221;48;2;200;216;244m▅[38;2;136;173;221;48;2;201;216;245m▅[38;2;224;210;162;48;2;170;184;203m▝[38;2;206;180;144;48;2;245;194;112m▖[38;2;255;184;90;48;2;248;180;97m╴[38;2;45;50;69;48;2;211;168;124m▂[38;2;41;66;102;48;2;131;159;208m▃[0m [?25h |
