i3wm のフローティングウィンドウを全ワークスペースに配置

logo 30

i3wm で動画を見ながら作業したいので全ワークスペースに動画を表示したいなと思ってキーバインドを見ましたがそれらしいものが見当たりません.awesome wm では標準設定にあったと思うので恐らくi3wm でも出来るだろうと設定を探してみました.

i3: i3 User’s Guide6.7. Sticky floating windows の設定が求めていたもののようです.

6.7. Sticky floating windows
If you want a window to stick to the glass, i.e., have it stay on screen even if you switch to another workspace, you can use the sticky command. For example, this can be useful for notepads, a media player or a video chat window.

Note that while any window can be made sticky through this command, it will only take effect if the window is floating.

Syntax:

sticky enable|disable|toggle
Examples:

# make a terminal sticky that was started as a notepad
for_window [instance=notepad] sticky enable

~/.config/i3/config に以下のようにキーバインドを設定しました.フローティングウィンドウに対して $mod + Shift + w で全ワークスペースに配置のon/off のトルグを行うようにしました.

+# toggle sticky
+bindsym $mod+Shift+w sticky toggle
+

保存して, $mod + Shift + r で設定を反映して, $mod + Shift + Space で対象のウィンドウをフローティングウィンドウにして,更に $mod + Shift + w で全ワークスペースに貼り付けられます.再度 $mod + Shift + w で1ワークスペースのみに.

環境
$ dpkg-query -W i3
i3      4.23-1
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux trixie/sid
Release:        n/a
$ arch
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です