Skip to content

Instantly share code, notes, and snippets.

@pedrocr
Created August 27, 2019 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrocr/ea4f65550fb487b625641d512658d6c0 to your computer and use it in GitHub Desktop.
Save pedrocr/ea4f65550fb487b625641d512658d6c0 to your computer and use it in GitHub Desktop.
wldash startup script
#!/bin/bash
if pgrep --uid $(whoami) wldash
then
killall --user $(whoami) wldash
exit 0
else
selection="$(~/bin/dot-desktop | ~/bin/wldash -i -p 'exec:')"
if [ "$selection" != "" ]
then
command_str="$(DOT_DESKTOP_APP="swaymsg exec" ~/bin/dot-desktop "${selection}")"
if [ "$command_str" == "" ]
then
# No desktop file matched, raw command line
command_str="${selection}"
fi
$command_str
exit 0
fi
fi
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment