winemenu 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #! /bin/mksh
  2. . $(realpath "$0" | xargs dirname)/../menu/dmenuconf
  3. WINEAPPSDIR="$HOME/bin/apps/wine"
  4. OPT_VANILLA="WINEPREFIX=$HOME/.wine_vanilla"
  5. OPT_JAP="LANG=ja_JP.UTF-8"
  6. # WINE_CALL="wine start /unix"
  7. WINE_CALL="wine"
  8. DLIST="\
  9. anydesk
  10. irfan
  11. winecfg
  12. foobar-x64
  13. telegram
  14. winrar
  15. magnify
  16. "
  17. WLIST="\
  18. default
  19. default-jap
  20. vanilla
  21. vanilla-jap
  22. "
  23. WINE_CMD=""
  24. WineDmenu="$(echo -e "$WLIST" | dmenu -i -b -p WINELAUNCHOPTS -nb "$DMENUBG" -nf "$DMENUFG" -sb "$DMENUFG" -sf "$DMENUBG" -fn "$DMENUFONT")"
  25. case "$WineDmenu"
  26. {
  27. "default") WINE_CMD="$WINE_CALL" ;;
  28. "default-jap") WINE_CMD="env $OPT_JAP $WINE_CALL" ;;
  29. "vanilla") WINE_CMD="env $OPT_VANILLA $WINE_CALL" ;;
  30. "vanilla-jap") WINE_CMD="env $OPT_JAP $OPT_VANILLA $WINE_CALL" ;;
  31. }
  32. AAA="$(echo -e "$DLIST" | dmenu -i -b -p RunIn:$WineDmenu -nb "$DMENUBG" -nf "$DMENUFG" -sb "$DMENUFG" -sf "$DMENUBG" -fn "$DMENUFONT")"
  33. cd $WINEAPPSDIR
  34. case "$AAA"
  35. {
  36. "irfan") cd ./IrfanView && $WINE_CMD ./i_view32.exe & ;;
  37. "anydesk") cd ./anydesk && $WINE_CMD ./AnyDesk.exe & ;;
  38. "winecfg") $WINE_CMD winecfg & ;;
  39. "telegram") cd ./Telegram && $WINE_CMD ./Telegram.exe & ;;
  40. "winrar") cd ./WinRAR && $WINE_CMD ./WinRAR.exe & ;;
  41. "magnify") cd "./Magnifixer" && $WINE_CMD ./Magnifixer.exe & ;;
  42. "foobar-x64") cd ./foobar2000x64 && $WINE_CMD ./foobar2000.exe & ;;
  43. }
  44. exit 0