desktop-windows-layout

desktop-windows-layout Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "desktop-windows-layout" with this command: npx skills add yuiseki/ai-secretary/yuiseki-ai-secretary-desktop-windows-layout

desktop-windows-layout Skill

デスクトップ画面のレイアウト確認とウィンドウ配置操作を行うスキルです。

主に KDE Plasma + KWin の X11 セッションを前提に、wmctrl / xdotool / xprop / scrot / qdbus を使います。

前提

  • 対象セッションは通常 DISPLAY=:1

  • 利用コマンド(よく使う順):

  • wmctrl

  • xdotool

  • xprop

  • scrot

  • qdbus (KWin ショートカット呼び出し)

  • file , identify (画像サイズ確認)

重要ルール

  • DISPLAY を明示する(SSH 転送の DISPLAY=localhost:10.0 に引っ張られない)

  • 例: export DISPLAY=:1

  • 操作前に対象ウィンドウIDを取得して固定する(タイトル曖昧一致の事故を避ける)

  • 操作後は必ず座標/サイズ/状態を再確認する

  • Esc /キー連打でアプリの状態遷移が不安定になるケースがあるので、レイアウト操作は WM 側コマンド優先

典型ユースケース

  • 「いまのデスクトップ画面のスクリーンショットを撮ってレイアウト確認して」

  • 「VacuumTube のウィンドウを右下に移動して」

  • 「全画面にして 10 秒後に元に戻して」

  • 「どのアプリがどこにあるか一覧で見たい」

画面レイアウト確認(基本手順)

  • スクリーンショットを保存

  • ウィンドウ一覧(座標・サイズ付き)を取得

  • アクティブウィンドウの情報を取得

  • 画像サイズを確認

export DISPLAY=:1 TS=$(date +%Y%m%d-%H%M%S) OUT=/tmp/desktop-layout-$TS.png scrot "$OUT" wmctrl -lG xdotool getactivewindow getwindowname getwindowgeometry --shell file "$OUT"

ウィンドウ特定(安全なやり方)

タイトルから拾ってすぐ使わず、ID を変数に固定してから操作する。

export DISPLAY=:1 WIN_ID=$(wmctrl -l | awk '/VacuumTube$/ {print $1; exit}') wmctrl -lG | awk -v id="$WIN_ID" '$1==id {print}' xdotool getwindowgeometry --shell "$WIN_ID"

補足:

  • wmctrl -lG は ID desktop x y w h host title

  • xprop -id "$WIN_ID" _NET_WM_STATE で fullscreen 等の状態確認ができる

移動・リサイズ(通常)

まず wmctrl 、効かなければ xdotool を試す。

export DISPLAY=:1 WIN_ID=0x... wmctrl -i -r "$WIN_ID" -e 0,2048,1108,2048,1008 || true xdotool windowmove "$WIN_ID" 2048 1108 || true xdotool windowsize "$WIN_ID" 2048 1008 || true

注意(KWin タイル環境)

  • KWin のタイル状態だと wmctrl / xdotool の move/resize が無視されることがある

  • その場合は KWin の Quick Tile ショートカットを使う方が通りやすい

KWin クイックタイル(KDE)

ショートカット一覧確認

qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames
| rg -i 'tile|fullscreen|bottom|right'

よく使うもの:

  • Window Quick Tile Bottom Right

  • Window Quick Tile Bottom Left

  • Window Quick Tile Top Right

  • Window Quick Tile Top Left

  • Window Fullscreen

呼び出し(タイムアウト推奨)

qdbus が環境によって待ち続けることがあるため timeout を付ける。 また、実運用では wmctrl -a より xdotool windowactivate --sync の方が KWin ショートカット反映が安定する場合がある。

export DISPLAY=:1 WIN_ID=0x... xdotool windowactivate --sync "$WIN_ID" timeout 2s qdbus org.kde.kglobalaccel /component/kwin
org.kde.kglobalaccel.Component.invokeShortcut
'Window Quick Tile Bottom Right' default || true

注意

  • wmctrl -i -a "$WIN_ID" は前面化用(-a に引数が必要)

  • wmctrl -i -r "$WIN_ID" -a のような組み合わせは誤用になりやすい

  • invokeShortcut は 成功しても出力が空 のことがある。必ず wmctrl -lG / xdotool getwindowgeometry で結果確認する

  • Window Quick Tile Top/Bottom/Left/Right 系は環境やタイミングで反応ムラがあるため、1回で動かないときは再前面化して再試行する

全画面化 / 復元(推奨: EWMH 直接)

KWin ショートカットより wmctrl の EWMH fullscreen state 切替が安定する場合がある。 (実運用で Window Fullscreen ショートカット呼び出しが no-op だったケースあり)

10 秒だけ全画面化して戻す

export DISPLAY=:1 WIN_ID=0x... wmctrl -i -a "$WIN_ID" || true wmctrl -i -r "$WIN_ID" -b add,fullscreen sleep 10 wmctrl -i -r "$WIN_ID" -b remove,fullscreen

確認:

xprop -id "$WIN_ID" _NET_WM_STATE wmctrl -lG | awk -v id="$WIN_ID" '$1==id {print}'

注意

  • 全画面解除後、元のタイルサイズに完全復元されないことがある(KWin が別サイズで復元)

  • 必要に応じて Quick Tile を再適用する

  • ただし Quick Tile 再適用も効かない場合がある。最終結果は「実際の geometry を再取得して報告」を優先する

実務で使う確認コマンド集

一覧(位置・サイズ)

DISPLAY=:1 wmctrl -lG

アクティブウィンドウ詳細

DISPLAY=:1 xdotool getactivewindow getwindowname getwindowgeometry --shell

ウィンドウ状態(fullscreen など)

DISPLAY=:1 xprop -id <WIN_ID> _NET_WM_STATE

画像サイズ確認

file /tmp/desktop-layout-.png identify /tmp/desktop-layout-.png # ImageMagick があれば

よくある失敗と対処

  • wmctrl /xdotool で移動できない

  • KWin タイル状態の可能性。Quick Tile を使う

  • qdbus が反応しない/待ち続ける

  • timeout 2s ... || true を使う

  • qdbus は返り値なしでも成功することがある

  • 出力ではなく window geometry/state の変化で判定する

  • 位置は変わらないがサイズだけ変わる / その逆

  • WM が制約している。操作後に必ず再確認して結果ベースで報告

  • DISPLAY が localhost:10.0 になっている

  • export DISPLAY=:1 を明示

成功条件(報告時)

  • 実行した操作(例: 右下タイル / 全画面化)

  • 操作前後の座標・サイズ

  • _NET_WM_STATE_FULLSCREEN の有無(全画面操作時)

  • 必要ならスクリーンショット保存先

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

system-reboot-bringup

No summary provided by upstream source.

Repository SourceNeeds Review
General

vacuumtube-live-cam-tile

No summary provided by upstream source.

Repository SourceNeeds Review
General

Jimeng AI Image Generation

即梦 AI 图片生成技能(火山引擎图片生成 4.0)。当用户想要 AI 生成图片、文生图、图生图、 字体设计、海报制作时使用。支持场景: - "帮我生成一张图片:..." - "用即梦画一张 16:9 的科技感壁纸" - "字体设计:新年快乐,红色背景" - "把这张图的背景换成星空" - "生成一组表情包" -...

Registry SourceRecently Updated
General

Oven

Lightweight Oven tracker. Add entries, view stats, search history, and export in multiple formats.

Registry SourceRecently Updated