- 1. 概要
- 2. デフォルトの定義
- 3. sxhkd インストール
1. 概要
「~/.cwmrc」には、「bind-key」というコマンドがあって、それで、キーを定義しているようなのですが・・・。
なにやら呪文めいた記述方法で、なかなか、難しく、Print キーは、定義方法がわからない。
2025年3月18日、バージョンが変わったためなのかどうかわかりませんが、「FreeBSD 13.5 RELEASE」「cwm-7.4_1」での操作です。
Print キーが、「Print」で定義できました。
本件、「home/openbsd/.cwmrc at master · kovalyshyn/home · GitHub」を参考にさせていただきました。
ってことで、「ArcoLinux」は、「sxhkd」を使用しています。
わたしもそれにならうことにします。
2. デフォルトの定義
「sxhkd」の話の前に、デフォルトの定義について、「FreeBSD 12.4 RELEASE cwm 7.1」の「cwm man」の一部を紹介しておきます。
DESCRIPTION
cwm is a window manager for X11 which contains many features that
concentrate on the efficiency and transparency of window management,
while maintaining the simplest and most pleasant aesthetic.
The options are as follows:
-c file
Specify an alternative configuration file. By default, cwm loads
~/.cwmrc, if present. Any error messages from lines in the
configuration file will be sent to stderr; however, cwm will
continue to process the rest of the configuration file.
-d display
Specify the display to use.
-n Configtest mode. Only check the configuration file for validity.
-v Verbose mode. Multiple -v options increase the verbosity.
cwm actions are initiated either via key or mouse bindings. The
following notations are used throughout this page:
C Control key.
M Meta key.
S Shift key.
4 Mod4 (windows) key.
M1 Left mouse button.
M2 Middle mouse button.
M3 Right mouse button.
The default key bindings are:
CM-Return Spawn a new terminal.
CM-Delete Lock the screen.
M-Return Hide current window.
M-Down Lower current window.
M-Up Raise current window.
M-slash Search for windows.
C-slash Search for applications.
CM-n Label current window.
M-Tab Cycle through currently visible windows.
MS-Tab Reverse cycle through currently visible windows.
CM-x Close current window.
CM-[n] Toggle visibility of group n, where n is 1-9.
CM-a Toggle visibility of all groups.
CM-g Toggle group membership of current window.
M-Right Cycle through active groups.
M-Left Reverse cycle through active groups.
CMS-f Toggle freezing geometry of current window.
CM-s Toggle stickiness of current window.
CM-f Toggle full-screen mode of current window.
CM-m Toggle maximization of current window.
CM-equal Toggle vertical maximization of current window.
CMS-equal Toggle horizontal maximization of current window.
M-[hjkl] Move window by a small amount.
MS-[hjkl] Move window by a large amount; see cwmrc(5).
CM-[hjkl] Resize window by a small amount.
CMS-[hjkl] Resize window by a large amount; see cwmrc(5).
M-question Spawn “exec program” dialog.
M-period Spawn “ssh to” dialog. This parses
$HOME/.ssh/known_hosts to provide host auto-
completion. ssh(1) will be executed via the
configured terminal emulator.
CM-w Spawn “exec WindowManager” menu, allowing a switch
to another window manager.
CMS-r Restart.
CMS-q Quit.
The default mouse bindings are:
M-M1 Move current window.
CM-M1 Toggle group membership of current window.
M-M2 Resize current window
M-M3 Lower current window.
CMS-M3 Hide current window.
The following key bindings may be used to navigate search and exec
dialogs:
[Return] Select item.
[Down], C-s or M-j Next item.
[Up], C-r or M-k Previous item.
[Backspace] or C-h Backspace.
C-u Clear input.
C-a List all available items.
[Esc] Cancel.
cwm rereads its configuration file when it receives a hangup signal,
SIGHUP, by executing itself with the name and arguments with which it was
started. This is equivalent to the restart function.
ちゅうことで、とりあえず、「FreeBSD」では、「CM-x」が「Close current window.」、「CMS-q」が「Quit.」ということで。
・Ctrl+Alt+x アクティブウィンドウクローズ
・Ctrl+Alt+Shift+q ログアウト
ということになります。
3. sxhkd インストール
以下、「sxhkd」のインストールについて記述していますが、「FreeBSD 12.4 RELEASE cwm 7.1」では、「sxhkd」を動作させると「cwm」自体の動きがおかしくなるので、やめました。
「root」ユーザ権限で。
「FreeBSD」
pkg install -y sxhkd
自動起動を設定します。
自動起動のスクリプトを作成しているものとして、ログインユーザで。
sh
cat << 'EOF' >> ~/.xprofile
sxhkd &
EOF
exit
「sxhkd」のキー定義方法等は、「デスクトップ環境 - 共通事項 - キーボードフック sxhkd」をご参照ください。
|