PekWM

提供: ArchWiki
2020年12月31日 (木) 14:46時点におけるKusakata.bot2 (トーク | 投稿記録)による版 (Pkg/AUR テンプレートの更新)
ナビゲーションに移動 検索に移動

Pek Window Manager は Claes Nästen によって書かれました。コードは aewm++ ウィンドウマネージャをベースとしていますが、もはや aewm++ の面影は全くないくらいに進化しています。PekWM には様々な機能が揃っており、ウィンドウのグループ化 (ion3, pwm, fluxbox と大して変わりません)、自動プロパティ、xinerama、キーチェインをサポートするキーグラブなどがあります。

インストール

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

起動

ディスプレイマネージャ

ディスプレイマネージャインストールして有効化してください。PekWM がセッションタイプに追加されます。ログインする前にセッションメニューから PekWM を選択してください。

xinitrc

以下を xinitrc に追加してください:

exec pekwm

PekWM の設定

メインの設定は ~/.pekwm/config ファイルに保存されています。ワークスペースやビューポートの設定、メニューやハーバーの挙動、ウィンドウエッジの抵抗などを設定します。PekWM ドキュメント に完全なドキュメントが付属したサンプルファイルが存在します。

メニュー

PekWM にはデフォルトでメニューが付属しており ~/.pekwm/menu に保存されています。使用しているシステムから作られたメニューではないので、使えるかどうかは微妙です。あくまでサンプルとして考えて下さい。

MenuMaker

インストールしたアプリケーションのメニューを自動的に作成する方法として menumaker があります。インストールしたアプリケーション全てのメニューを設定する場合は次のコマンドを実行してください:

mmaker --no-desktop pekwm
ノート: 上記のコマンドは既存のメニューファイルを上書きしません。上書きしたい場合は、コマンドに -f フラグを付けてください。

オプションのリストを見るには、mmaker --help を実行してください。

メニューファイルを手動で修正しても良いし、新しいソフトウェアをインストールするたびにリストを再生成するのも良いでしょう。

pekwm-menu を使う

AURpekwm-menuAUR は freedesktop.org の xdg メニュースペックに基づいてアプリケーションが動的に更新されるメニューを作成します。使用方法は簡単です。~/.pekwm/menu ファイルに以下のようなセクションを追加してください:

 Submenu = "Applications" { Icon = "ICON"
   Entry { Actions = "Dynamic pekwm-menu MENUFILE" }
 }

"ICON" と "MENUFILE" は適当なアイコンとメニューファイルに置き換えてください。メニューファイルは gnome, xfce, lxde などが作成します。Xdg のメニューファイルは通常 /etc/xdg/menus に保存されます。

オプションのリストを確認したいときは pekwm-menu --help を実行してください。

手動

メニューファイルは ~/.pekwm/menu です。構文はとても簡単です。エントリは以下のようになっています:

Entry = "NAME" { Actions = "Exec COMMAND &" }

サブメニューは以下のようになります:

Submenu = "NAME" {
     Entry = "NAME" { Actions = "Exec COMMAND &" }
     Entry = "NAME" { Actions = "Exec COMMAND &" }
}
ノート: 括弧は必ず閉じるようにしてください。閉じてないとエラーが発生してメニューが表示されません。

メニューに分割線を追加するには、以下を使ってください:

Separator {}

PekWM はダイナミックメニューもサポートしています。エントリやサブメニューを開くたびにスクリプトの実行結果が表示されるメニューエントリやサブメニューです。メニューが必要とする正確な構文をチェックしてください。

You can find dynamic menus for Gmail and network connections, and one to display the time and date. There is also a project called pekwm_menu_tools which aim to be a set of useful applications for generating dynamic menus for PekWM.

ホットキー

The hotkey settings are stored in ~/.pekwm/keys. This file controls all the keyboard bindings and keychains used in PekWM. You can add keyboard bindings to launch programs or to perform actions in PekWM, such as show a menu, move a window, switch desktops, etc. For a full list of PekWM's actions, see the documentation.

You can have more than one action assigned to one key combination. To do so, just separate the actions by a semicolon. Here is an example:

KeyPress = "Ctrl Mod1 R" { Actions = "Exec osdctl -s 'Reconfiguring'; Reload" }

When you press Ctrl+Alt+R Pekwm will display on the screen the text 'Reconfiguring' (osdctl -s 'Reconfiguring') and reconfigure (Reload). (Note that this requires osdsh to be installed)

The next example will bind a media key to lower the volume:

KeyPress = "XF86AudioLowerVolume" { Actions = "exec amixer set Master 5%- unmute &" }

You can also do "chains" of keys, so for example the code

Chain = "Ctrl Mod1 C" {
     KeyPress = "Q" { Actions = "MoveToEdge TopLeft" }
     KeyPress = "W" { Actions = "MoveToEdge TopCenterEdge" }
}

Would make it so that if you first press Ctrl+Alt+c and then q you move the active window to the top left corner of the screen, and if you press Ctrl+Alt+c and then w you move the window to the top center edge.

マウス

マウス設定は ~/.pekwm/mouse に保存します。このファイルもわかりやすいレイアウトになっています。例:

FrameTitle {
     ButtonRelease = "1" { Actions = "Raise; Focus" }
}

means that if you release button 1 (usually left mouse button) over the frame title of a window the window will be "Raised" above the other windows and it will become the focused window.

One of the things PekWM is set up to do by default is to focus windows when the mouse moves over them (as opposed to the "click to focus" style). This is one thing that quite a few users would like to change to the more "traditional" way. To change this, look for the following lines in the file and do what they say (there are quite a few of the first, but only one occurrence of the second):

# Remove the following line if you want to use click to focus.
# Uncomment the following line if windows should raise when clicked.

スタートアッププログラム

The startup programs file is ~/.pekwm/start. If you'd like to display a wallpaper or launch a panel whenever Pekwm is started, you can add entries for these things in that file. Note, though, that these applications are run every time Pekwm is started -- including when you run 'Restart' in the root menu. The commands are executed only after Pekwm is started.

To add an application, use the following structure:

nameofapplication &

The & at the end is crucial, or anything after it won't be run. To give you an example of what this file could look like, here is mine:

xfce4-panel &
conky &
hsetroot -fill ~/images/darkwood.jpg &

Before you can use this file, you will have to make it executable with the following command:

$ chmod +x ~/.pekwm/start

Variables

Variables ファイルには PekWM で使用する一般的な変数を記述します。デフォルトエントリを見ればすぐに分かります:

$TERM="xterm -fn fixed +sb -bg white -fg black"

PekQM の設定ファイルで $TERM 変数を使用した場合、xterm -fn fixed +sb -bg white -fg black コマンドが実行されます。以下のように変更することでターミナルコマンドで urxvt がロードされるようになります:

$TERM="urxvt"

Autoproperties

特定のワークスペースで特定のアプリケーションを開かないようにしたい場合や、(ウィンドウ) メニューを省略したい場合、自動的にタブに収納したい場合、Autoproperties ファイルで全て指定することができます。おそらく PekWM で一番複雑な設定ファイルですが、最も強力なファイルでもあります。設定できることはここに書くには多すぎるため、詳しくは ドキュメントの autoproperties のページ を見てください。デフォルトの ~/.pekwm/autoproperties ファイルを見るのも手っ取り早いでしょう。

テーマ

テーマをインストールするには、圧縮ファイルを解凍してテーマのディレクトリに配置してください:

  • グローバル: /usr/share/pekwm/themes
  • ユーザー別: ~/.pekwm/themes

壁紙の設定

PekWM はただのウィンドウマネージャであり、デスクトップの壁紙を設定するには別のプログラムを使う必要があります。アプリケーション一覧#壁紙設定を見て下さい。

トラブルシューティング

Nvidia TwinView を使用しているときに、ウィンドウを最大化すると両方のスクリーンに表示されてしまう

~/.pekwm/config を編集して以下の行を:

HonourRandr = "True"

次のように変更してください:

HonourRandr = "False"

ソース

コンポジットや透過が上手く動作しない

v0.1.11 現在、PekWM はコンポジットを正しくサポートしていません。xcompmgr は動作しますが、透過ドッグやパネルは動作せず、ウィンドウに影をつけるとグラフィックに問題が生じます。修正するには devilspietransset-dfAUR を使って全てのウィンドウの透過度を .999 (あるいは他の値) に設定すれば影が問題なく付くようになります。

transset-df を使って全てのウィンドウの透過度を .999 に設定する devilspie スクリプトの例:

(spawn_async (str "transset-df -i " (window_xid) " .999" ))

GTK 3 アプリケーションでスクロールが出来ない

GDK_CORE_DEVICE_EVENTS 環境変数を設定してみてください。PekWM bug #350 を参照。

参照