Looking for a good app launcher for Linux. Currently looking for something for Arch and I see there’s a lot of options liks rofi and wofi. What are your favourite app launchers and why?

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 hours ago

    I like these self made scripts. Some ideas to improve this: a) instead ls, use find command if you want use its output as input in another program (will yield fullpath too), b) fzf has a preview functionality, which I like a lot to use when it comes to directories or script files. As for the run command, I’m not sure why you use xargs and what i3-msg is needed for. Here is an alternative way.

    (Edit: I always forget that beehaw will convert my ampersand to &. Have this in mind if you read the below code.)

    bash -c 'cd "${HOME}/.local/bin"; path="$(find . -maxdepth 1 -type f -executable -printf "%f\n" | fzf --preview "cat {}")" && "${path}"'
    

    below same command in a bit more readable standalone script:

    #!/usr/bin/env bash
    cd "${HOME}/.local/bin" || exit 1
    path="$( \
        find . -maxdepth 1 -type f -executable -printf "%f\n" | \
        fzf --preview "cat {}" \
    )" && "${path}"
    

    The biggest problem with fzf is, that scripts that need an argument are not covered here. One could either use the input string from fzf as arguments or like that, or an optional input after fzf selection.