• corrupts_absolutely@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      11 months ago

      im not comfortable with shell yet, but here’s what i did
      in sway config i have

      for_window [title=“example_launcher”] floating enable
      set $menu foot -T “example_launcher” -w 240x240 -e sh -c ‘dmenu_path | example.sh | xargs swaymsg exec --’

      and somewhere in my $PATH i have example.sh which looks like this

      #!/usr/bin/sh
      #
      out=$(fzf -e --print-query “$@”)
      in=$(echo “$out” | head -1)
      res=$(echo “$out” | tail -1 )
      if test -n “$res”; then
      cmd=$res
      else
      cmd=$in
      fi
      exec echo “$cmd”

      there are a couple small issues with the set up though, and also u do need dmenu installed