コンテンツにスキップ

「KRunner」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
所属カテゴリを Application Launchers から アプリケーションランチャー に変更
Kgx (トーク | 投稿記録)
See also: 項目を翻訳
 
(同じ利用者による、間の10版が非表示)
2行目: 2行目:
[[Category:KDE]]
[[Category:KDE]]
[[en:KRunner]]
[[en:KRunner]]
[[ru:KRunner]]
[[zh-hans:KRunner]]
{{Related articles start}}
{{Related articles start}}
{{Related|KDE}}
{{Related|KDE}}
{{Related articles end}}
{{Related articles end}}
[https://userbase.kde.org/Plasma/Krunner KRunner] is an application built into [[Plasma]] 5 to perform functions and run commands quickly, and features a "runner" system to customize functions available for use.
[https://userbase.kde.org/Plasma/Krunner KRunner] [[Plasma]] 5に組み込まれたアプリケーションで、機能を実行したりコマンドを実行したりすることができます。また、使用可能な機能をカスタマイズするための "runner" システムも備えています。


== Installation ==
== インストール ==


{{Pkg|krunner}} パッケージをインストールしてください。
{{Pkg|krunner}} パッケージを [[ヘルプ:読み方#パッケージのインストール|インストール]] してください。
[[Install]] the {{Pkg|krunner}} package.


== Usage ==
== 使い方 ==


Plasma で KRunner を開くには、デスクトップを右クリックして "run command" を押すか、デフォルトのキー割り当て {{ic|Alt+Space}} または {{ic|Alt+F2}} を使用します。空白のデスクトップなど一部のワークスペースでは、入力を開始すると自動的に KRunner が起動します。
To open KRunner in Plasma, you can either right-click the desktop and press "run command", or you can use the default keybindings, {{ic|Alt+Space}} or {{ic|Alt+F2}}. In some workspaces such as a blank desktop, starting to type will automatically bring up KRunner.


== Open KRunner with the Meta key ==
== Meta キーで KRunner を開く ==


KRunner を開くショートカットとして Metaキーを設定するには、次のコマンドを実行します。
To set the Meta key as a shortcut to open KRunner, run
{{bc|<nowiki>kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.krunner,/App,,display"
</nowiki>}}
To apply the change to the current session restart KWin with
{{bc|<nowiki>kwin_x11 --replace # For X11
kwin_wayland --replace # For wayland</nowiki>}}


$ kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.krunner,/App,,toggleDisplay"
== Switch active windows ==


現在のセッションに変更を適用するには、特定の D-Bus シグナルを KWin に送信します:
Plasma 5 doesn't contain default way to specify krunner search only by active window titles.
Following approaches are used to work around this issue.


$ qdbus org.kde.KWin /KWin reconfigure
==== Full list of windows with search by titles ====


D-Bus を使用していない場合は、KWin インスタンスを再起動する必要があります。X11 の場合は {{ic|kwin_x11 --replace}} を実行し、Wayland の場合は {{ic|kwin_wayland --replace}} を実行します。
This approach will require {{pkg|xdotool}}.


== アクティブなウィンドウを切り替える ==
# Go to ''System Settings > Workspace > Shortcuts > Custom Shortcuts''.

# Create new Global shortcut -> Command/URL (by right click)
Krunner 構成には、必要な検索ソースを選択できるプラグイン設定ボタンがあります。詳細は [https://userbase.kde.org/Plasma/Krunner ユーザーマニュアル] を参照してください。
# Tick the checkbox to the right of the name.

# In Trigger tab select the desired key combination.
アクティブなウィンドウタイトルのみで krunner 検索を指定する場合は、ウィンドウプラグインを有効にして、他のプラグインを無効にします。
# In Action tab type {{ic|/usr/local/bin/krunner-search-by-windows.sh}}

# Create file {{ic|/usr/local/bin/krunner-search-by-windows.sh}} with the following content: {{bc|<nowiki>#!/bin/bash
==== タイトルで検索したウィンドウのリスト化 ====

このアプローチには {{pkg|xdotool}} が必要です。

# ''システム設定 > ワークスペース > ショートカット > カスタムショートカット'' に移動します。
# 新しいグローバルショートカットの作成 -> コマンド/URL (右クリック)
# 名前の右側にあるチェックボックスをオンにします。
# タブで、目的のキーの組み合わせを選択します。
# Action タブに {{ic|/usr/local/bin/krunner-search-by-windows.sh}} と入力します。
# 次の内容のファイル {{ic|/usr/local/bin/krunner-search-by-windows.sh}} を作成します。 {{bc|<nowiki>#!/bin/bash
qdbus org.kde.krunner /App querySingleRunner windows ""
qdbus org.kde.krunner /App querySingleRunner windows ""
sleep 0.2
sleep 0.2
xdotool key "ctrl+A"
xdotool type 'window '
xdotool type 'window '
xdotool key "shift+BackSpace"</nowiki>}}
xdotool key "shift+BackSpace"</nowiki>}}
# ファイルを [[ヘルプ:読み方#実行可能属性の付与|実行可能]] にし、すべてに実行許可を与えます。
# Make file executable and give run permission to all {{bc|chmod a+x /usr/local/bin/krunner-search-by-windows.sh}}

{{ic|window}} の後のスペースに注意してください。
Note the space after {{ic|window}}.


これで、指定したショートカットで開いているウィンドウのリストを取得し、入力中にこのリストで検索することができます。
Now you're able to get list of opened windows by specified shortcut and search by this list as you type;


==== ウィンドウリストにないタイトルを検索 ====
==== Search by titles without full windows list ====


このアプローチはより制限されています
This approach is more limited but far less ugly.


# ''システム設定 > ワークスペース > ショートカット > カスタムショートカット'' に移動します。
# Go to ''System Settings > Workspace > Shortcuts > Custom Shortcuts''.
# 新しいグローバルショートカットの作成 -> D-bus コマンド (右クリック)
# Create new Global shortcut -> D-bus Command (by right click)
# 名前の右にあるチェックボックスをチェックします。
# Tick the checkbox to the right of the name
# タブで、目的のキーの組み合わせを選択します。
# In Trigger tab select desired key combination
# Action タブに次の情報を挿入します。
# In Action tab insert following information:
- Remote application : org.kde.krunner
- Remote application : org.kde.krunner
- Remote Object : /App
- Remote Object : /App
64行目: 70行目:
- Arguments : windows ""
- Arguments : windows ""


== See also ==
== 参照 ==
[https://userbase.kde.org/Plasma/Krunner KRunner on KDE UserBase Wiki]
[https://userbase.kde.org/Plasma/Krunner KRunner on KDE UserBase Wiki]

2023年2月23日 (木) 17:50時点における最新版

関連記事

KRunnerPlasma 5に組み込まれたアプリケーションで、機能を実行したりコマンドを実行したりすることができます。また、使用可能な機能をカスタマイズするための "runner" システムも備えています。

インストール

krunner パッケージを インストール してください。

使い方

Plasma で KRunner を開くには、デスクトップを右クリックして "run command" を押すか、デフォルトのキー割り当て Alt+Space または Alt+F2 を使用します。空白のデスクトップなど一部のワークスペースでは、入力を開始すると自動的に KRunner が起動します。

Meta キーで KRunner を開く

KRunner を開くショートカットとして Metaキーを設定するには、次のコマンドを実行します。

$ kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.krunner,/App,,toggleDisplay"

現在のセッションに変更を適用するには、特定の D-Bus シグナルを KWin に送信します:

$ qdbus org.kde.KWin /KWin reconfigure

D-Bus を使用していない場合は、KWin インスタンスを再起動する必要があります。X11 の場合は kwin_x11 --replace を実行し、Wayland の場合は kwin_wayland --replace を実行します。

アクティブなウィンドウを切り替える

Krunner 構成には、必要な検索ソースを選択できるプラグイン設定ボタンがあります。詳細は ユーザーマニュアル を参照してください。

アクティブなウィンドウタイトルのみで krunner 検索を指定する場合は、ウィンドウプラグインを有効にして、他のプラグインを無効にします。

タイトルで検索したウィンドウのリスト化

このアプローチには xdotool が必要です。

  1. システム設定 > ワークスペース > ショートカット > カスタムショートカット に移動します。
  2. 新しいグローバルショートカットの作成 -> コマンド/URL (右クリック)
  3. 名前の右側にあるチェックボックスをオンにします。
  4. タブで、目的のキーの組み合わせを選択します。
  5. Action タブに /usr/local/bin/krunner-search-by-windows.sh と入力します。
  6. 次の内容のファイル /usr/local/bin/krunner-search-by-windows.sh を作成します。
    #!/bin/bash
    qdbus org.kde.krunner /App querySingleRunner windows "" 
    sleep 0.2
    xdotool key "ctrl+A"
    xdotool type 'window '
    xdotool key "shift+BackSpace"
  7. ファイルを 実行可能 にし、すべてに実行許可を与えます。

window の後のスペースに注意してください。

これで、指定したショートカットで開いているウィンドウのリストを取得し、入力中にこのリストで検索することができます。

ウィンドウリストにないタイトルを検索

このアプローチはより制限されています

  1. システム設定 > ワークスペース > ショートカット > カスタムショートカット に移動します。
  2. 新しいグローバルショートカットの作成 -> D-bus コマンド (右クリック)
  3. 名前の右にあるチェックボックスをチェックします。
  4. タブで、目的のキーの組み合わせを選択します。
  5. Action タブに次の情報を挿入します。
  - Remote application : org.kde.krunner
  - Remote Object      : /App
  - Function           : querySingleRunner
  - Arguments          : windows ""

参照

KRunner on KDE UserBase Wiki