corrupts_absolutely@sh.itjust.works to Unixporn · 1 year ago[sway] trying wayland once againfiles.catbox.moeimagemessage-square12fedilinkarrow-up169arrow-down10file-text
arrow-up169arrow-down1image[sway] trying wayland once againfiles.catbox.moecorrupts_absolutely@sh.itjust.works to Unixporn · 1 year agomessage-square12fedilinkfile-text
minus-squarecorrupts_absolutely@sh.itjust.worksOPlinkfedilinkarrow-up3·edit-21 year agoim 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
minus-squareMigratingtoLemmy@lemmy.worldlinkfedilinkarrow-up1·edit-21 year agoCan you put this in a code-block?
minus-squarecorrupts_absolutely@sh.itjust.worksOPlinkfedilinkarrow-up1·edit-21 year agoi originally did but i couldnt put it on split lines and the markdown docs dont mention that at all tried it again same deal
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
Can you put this in a code-block?
i originally did but i couldnt put it on split lines and the markdown docs dont mention that at all
tried it again same deal