UbuntuでWindowsのSuperキーを押して時のアプリ一覧に自分の作った.shファイルなどが表示されるようにして、ツールバーのショートカットなどに割り当てたい場合があると思う。
以下に設定ファイルを記載すれば表示されるようになり、ショートカットにも割当可能。
~/.local/share/applications
例えば、AndroidStudioなら以下のように記載されている
androidstudio.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=android-studio36
Comment=This is android studio3.6
Icon=/opt/android-studio36/bin/studio.png
Exec=/opt/android-studio36/bin/studio.sh
Path=
Terminal=false
StartupNotify=false
Categories=
これにならって自分で作った.shファイルなどを実行させたい場合は以下
[Desktop Entry]
Version=1.0
Type=Application
Name=xkb
Comment=xkb keybinding
Icon=
Exec=/home/hige/bin/load_xkbmap.sh
Path=
Terminal=false
StartupNotify=false
Categories=
というshを実行させるようにしている。
/home/hige/bin/load_xkbmap.sh
これで Super + Aでショートカットが通常あたっているアプリ一覧を開いた時に登録した.desktopのアプリが表示されるはず。
Comments