From f088369332591b5b4e204f3cc87c4946b4bee376 Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 14 Mar 2026 09:48:53 +0000 Subject: [PATCH] fixed some nonsense with otter launcher --- .config/otter-launcher/config.toml | 38 +++++++++++------------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.config/otter-launcher/config.toml b/.config/otter-launcher/config.toml index 8323b2cf..f18dcbbe 100644 --- a/.config/otter-launcher/config.toml +++ b/.config/otter-launcher/config.toml @@ -20,7 +20,7 @@ header = """ """ header_cmd = "" # run a command and print stdout above the header header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines -place_holder = "otterly awesome" # at the input field +place_holder = "execute" # at the input field suggestion_mode = "list" # available options: list, hint footer = "" # add a line after suggestion list suggestion_lines = 8 # 0 to disable suggestions and tab completion @@ -30,8 +30,8 @@ prefix_padding = 3 # format prefixes to have a uniformed width default_module_message = " \u001B[33mlaunch\u001B[0m app" # shown when the default module is in use empty_module_message = "" # shown when the empty module is in use customized_list_order = false # false to list modules alphabetically; true to list as per the configured order in the below [[modules]] section -indicator_with_arg_module = "* " # the sign showing whether a module should run with an argument -indicator_no_arg_module = "" +indicator_with_arg_module = " * " # the sign showing whether a module should run with an argument +indicator_no_arg_module = " " # below color options affect all modules; per-module coloring can be configured using ansi codes individually prefix_color = "\u001B[33m" description_color = "\u001B[39m" @@ -65,7 +65,7 @@ prefix = "app" cmd = """ hyprctl dispatch resizeactive 300 500 && hyprctl dispatch centerwindow && -fsel -d +hyprctl dispatch exec $(fsel --no-exec) """ [[modules]] @@ -73,26 +73,10 @@ description = "nerd icons" prefix = "nerd" cmd = """ hyprctl dispatch resizeactive 300 500 && -hyprctl dispatch centerwindow & +hyprctl dispatch centerwindow && hyprctl dispatch exec wl-copy $(cat ~/.config/otter-launcher/icons.json | jq -r '. | to_entries[] | "\\(.value.char) \\(.key)"' | fzf | awk '{print $1}' | tr -d '\n') """ -[[modules]] -description = "power menu (fzf)" -prefix = "po" -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 --padding 1,2 --info-command 'printf " power menu ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter " " --pointer " ▌" --color "bg+:-1,pointer:1,info:8,separator:8,scrollbar:0" --prompt ' ' | tail -1) -""" - [[modules]] description = "run command" prefix = "sh" @@ -112,7 +96,9 @@ hyprctl dispatch exec "kitty -e nvim --cmd 'cd ~/Notes/'" [[modules]] description = "nixos wiki" prefix = "nw" -cmd = "firefox --new-window 'https://wiki.nixos.org/w/index.php?search={}'" +cmd = """ +hyprctl dispatch exec "firefox --new-window 'https://wiki.nixos.org/w/index.php?search={}'" +""" with_argument = true url_encode = true unbind_proc = true @@ -120,7 +106,9 @@ unbind_proc = true [[modules]] description = "search nixpkgs" prefix = "nix" -cmd = "firefox --new-window 'https://search.nixos.org/packages?query={}'" +cmd = """ +hyprctl dispatch exec "firefox --new-window 'https://search.nixos.org/packages?query={}'" +""" with_argument = true url_encode = true unbind_proc = true @@ -128,7 +116,9 @@ unbind_proc = true [[modules]] description = "cambridge dict" prefix = "dc" -cmd = "firefox --new-window 'https://dictionary.cambridge.org/dictionary/english/{}'" +cmd = """ +hyprctl dispatch exec "firefox --new-window 'https://dictionary.cambridge.org/dictionary/english/{}'" +""" with_argument = true url_encode = true unbind_proc = true