2023-07-04 11:17:40 -07:00
|
|
|
#!/usr/bin/env bash
|
2023-07-06 09:51:19 -07:00
|
|
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
2023-07-04 11:17:40 -07:00
|
|
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
#⠀⠀⠀⠀⠀⠀⠀⠀⣼⡏⠸⣧⠀⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
#⠠⢤⣤⣤⣤⣤⣤⣴⡿⠀⠀⢻⣦⣤⣤⣤⣤⣤⡤⠄ Tyler Starr (starr-dusT)
|
|
|
|
#⠀⠀⠙⠻⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⠟⠋⠀⠀ https://github.com/starr-dusT/dotfiles
|
|
|
|
#⠀⠀⠀⠀⠀⠙⣿⡆⠀⠀⠀⠀⠰⣿⠋⠀⠀⠀⠀⠀ https://tstarr.us
|
|
|
|
#⠀⠀⠀⠀⠀⢰⡟⠀⣀⣴⣦⣀⠀⢻⡆⠀⠀⠀⠀⠀
|
|
|
|
#⠀⠀⠀⠀⢀⣾⣧⡾⠛⠁⠈⠙⠷⣼⣿⡀⠀⠀⠀⠀
|
2023-07-06 09:51:19 -07:00
|
|
|
#⠀⠀⠀⠀⡸⠟⠁⠀⠀⠀⠀⠀⠀⠈⠛⢧⠀⠀⠀⠀
|
2023-07-04 11:17:40 -07:00
|
|
|
#
|
|
|
|
# Launch applications with fzf.
|
|
|
|
|
|
|
|
desktop_file() {
|
2023-07-06 09:51:19 -07:00
|
|
|
find /usr/share/applications -name "*.desktop"
|
|
|
|
find /usr/local/share/applications -name "*.desktop"
|
|
|
|
find "$HOME/.local/share/applications" -name "*.desktop"
|
|
|
|
find /var/lib/flatpak/exports/share/applications -name "*.desktop"
|
|
|
|
find "$HOME/.local/share/flatpak/exports/share/applications" -name "*.desktop"
|
2023-07-11 21:17:48 -07:00
|
|
|
find /run/current-system/sw/share/applications -name "*.desktop"
|
2023-07-04 11:17:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
selected="$(desktop_file | sed 's/.desktop//g' | sort | fzf -e -i -m --reverse --delimiter / --with-nth -1)"
|
|
|
|
[ -z "$selected" ] && exit
|
|
|
|
cd || return
|
|
|
|
echo "$selected" | while read -r line ; do setsid gio launch "$line".desktop ; done
|