diff options
author | xyz <gky44px1999@gmail.com> | 2022-09-16 17:52:44 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2022-09-16 17:52:44 -0700 |
commit | 79af707530a75ece80758f7351e29deae298b1ba (patch) | |
tree | 5254e779ce42319f816379ef4c553931ca7789ba | |
parent | a458c57e5407a10ad861ed21799f8dd445ad287a (diff) |
refactor
-rwxr-xr-x | home/xyz/.local/bin/matlab | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/home/xyz/.local/bin/matlab b/home/xyz/.local/bin/matlab index 44af8bdf..c3ee6690 100755 --- a/home/xyz/.local/bin/matlab +++ b/home/xyz/.local/bin/matlab @@ -4,14 +4,17 @@ # https://wiki.archlinux.org/title/Java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing # https://wiki.archlinux.org/title/MATLAB#Unable_to_launch_the_MATLABWindow_application # https://faq.i3wm.org/question/2564/cant-open-matlab-from-dmenu.1.html +# https://wiki.archlinux.org/title/MATLAB#Desktop_entry +# use /tmp as working (startup) directory and save simulink files there to avoid hard link error: +# https://bbs.archlinux.org/viewtopic.php?id=277970 cmd () { - _JAVA_AWT_WM_NONREPARENTING=1 LD_PRELOAD=/lib64/libfreetype.so "$bin_dir/matlab" -desktop "$@" + _JAVA_AWT_WM_NONREPARENTING=1 LD_PRELOAD=/lib64/libfreetype.so "$bin_dir/matlab" -sd "$startup_dir" -desktop -nosplash "$@" } startup_dir=/tmp/matlab bin_dir="$HOME/programs/MATLAB/R2022a/bin" -[ -d "$startup_dir" ] || mkdir -p "$startup_dir" +[ -d "$startup_dir" ] || mkdir "$startup_dir" if ! cmd "$@"; then "$bin_dir/activate_matlab.sh" |