「PekWM」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(同期)
(文字列「http://ubuntuforums.org/」を「https://ubuntuforums.org/」に置換)
194行目: 194行目:
   
 
* [http://pekwm.org/ Pekwm ホームページ]
 
* [http://pekwm.org/ Pekwm ホームページ]
* [http://ubuntuforums.org/showthread.php?t=662204 Howto: Install and configure Pekwm]
+
* [https://ubuntuforums.org/showthread.php?t=662204 Howto: Install and configure Pekwm]

2018年2月6日 (火) 23:53時点における版

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

The Variables file contains the general variables used in PekWM, the default entry should explain it quite clearly:

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

Whenever the variable $TERM is used in any of PekWM's configuration files, the command xterm -fn fixed +sb -bg white -fg black will be run. For example changing it to:

$TERM="urxvt"

would mean that urxvt would be loaded for terminal commands.

自動プロパティ

If you'd like certain applications to open on certain workspaces, have a certain title, skip the (window) menus, or be automatically tabbed together, you can specify all that here. It is probably the most confusing configuration file in PekWM, but it is also the most powerful file. The amount of things that can be set in this file are far too great to fit here, but it is explained in detail in the autoproperties page of the documentation. The default ~/.pekwm/autoproperties file also contains a crash course to autopropping.

テーマ

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

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

壁紙の設定

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

トラブルシューティング

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

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

HonourRandr = "True"

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

HonourRandr = "False"

ソース

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

As of v0.1.11, PekWM does not appear to correctly support compositing. xcompmgr works, but transparent docks and panels do not, and shading windows creates graphical glitches. To fix that you can set the transparency of every window to .999 (or any other value) with devilspie and transset-df, then shading windows works normally.

An example of a devilspie script setting the transparency of every window to .999 with transset-df:

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

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

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

参照