![Android Studioを開くコマンド](https://rvso.com/image/1127623/Android%20Studio%E3%82%92%E9%96%8B%E3%81%8F%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89.png)
最近、Ubuntu 14.04 LTSシステムにeasystrokeをインストールしました。ショートカットストロークを追加したいのですが、どのコマンドを使用すればよいか教えてください。Android Studioの場所は
/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh
私が使用しているFirefoxなどの他のアプリでは
wmctrl -a Firefox || firefox
しかし、これはAndroid Studioでは機能しません
また
xdg-open of /home/....
ターミナルではなくテキスト エディターで bash ファイルを開きます。
助けてください
答え1
このコマンドを使用すると:
wmctrl -a "Android Studio" || "/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh"
二重引用符付きの完全パスを使用します。
からman wmctrl
-a <WIN>
Switch to the desktop containing the window <WIN>, raise the window, and give it
focus.
<WIN> This argument specifies a window that is the target of an action. By default the
argument is treated as if were a string, and windows are examined until one is
found with a title the contains the specified string as a substring. The substring
matching is done in a case insensitive manner. The -F option may be used to force
exact, case sensitive title matching. The option -i may be used to interpret the
window target as a numeric window identity instead of a string.
答え2
これを試して:
xdotool type "sh '/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh'" ; xdotool key KP_Enter
うまくいかない場合は、これを試してください:
wmctrl -a "Android Studio" || "/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh"