【macOS】横長ワイドなディスプレイで使いたいウィンドウマネージャーを探す

Split View で Mac の App を 2 つ並べて表示する
👉 Split View で Mac の App を 2 つ並べて表示する - Apple サポート (日本) hatena-bookmark

macOS 純正「Split View」は、なんとなくツラかったので、

いくつか入れてみました、無料のウィンドウマネージャー。

やりたかったのは、

「すばやくウィンドウを左右半分の大きさにして配置する」

ということです。

 

ShiftIt

インストールするといいかんじです。

Monterey でも問題なく動きます。

ShiftIt Managing window size and position in OSX
👉 fikovnik/ShiftIt: Managing windows size and position in OSX hatena-bookmark

しかし、リポジトリを見ると数年更新されていません。

This project is looking for a new maintainer. Until that transition is completed, there will likely not be further development on this project.

This project is looking for a new maintainer. Until that transition is completed, there will likely not be further development on this project.

今後、更新はされないかもしれない雰囲気です。

 

Spectacle

Move and resize windows with ease
👉 Spectacle hatena-bookmark
👉 eczarny/spectacle: Spectacle allows you to organize your windows without using a mouse. hatena-bookmark

しかし、このアプリもメンテナンス終了っぽいです。

This project is not being actively maintained.

代替として「Rectangle」なるものを推奨しています。

Spectacle users have recommended Rectangle as an open source alternative.

 

Rectangle

Rectangle: Move and resize windows on macOS with keyboard shortcuts and snap areas

当分これを使ってみることにします。

リポジトリも元気ですし、フォークやスターの数も多いです。

Rectangle: Move and resize windows on macOS with keyboard shortcuts and snap areas

👉 rxhanson/Rectangle: Move and resize windows on macOS with keyboard shortcuts and snap areas hatena-bookmark

このアプリも他のウィンドウマネージャーアプリと同様、以下のように

アクセシビリティアプリケーションにMacへのアクセスを許可する

アクセスの許可が必要になります。

👉 アクセシビリティアプリケーションにMacへのアクセスを許可する - Apple サポート (日本) hatena-bookmark

👉 多窓ブラウザは vivaldi が最強 hatena-bookmark


'-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead

'-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead
👉 Issues with Gradle Kotlin DSL and `-Xopt-in` deprecation : KT-51708 hatena-bookmark


tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
   kotlinOptions {
     allWarningsAsErrors = false
     freeCompilerArgs += [
         "-Xopt-in=kotlin.RequiresOptIn",
         "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
         "-Xopt-in=kotlinx.coroutines.FlowPreview",
         "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
         "-Xopt-in=kotlin.Experimental",
     ]
   }
 }


'-Xopt-in' → '-opt-in'


tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
   kotlinOptions {
     allWarningsAsErrors = false
     freeCompilerArgs += [
         "-opt-in=kotlin.RequiresOptIn",
         "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
         "-opt-in=kotlinx.coroutines.FlowPreview",
         "-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
         "-opt-in=kotlin.Experimental",
     ]
   }
 }

単純に gradle ファイル内、文字列の置換で完。

コード内アノテーションで利用の人はそのままでいいんかな。

👉 Opt-in requirement marker annotation on override requires the same marker on base declaration  hatena-bookmark
👉 AGP Upgrade Assistant で 7.2 移行時にCause: manifestData.`package` must not be null hatena-bookmark
👉 @Composable Scaffold で This material API is experimental and is likely to change or to be removed in the future. hatena-bookmark


ContentDescription を無視する - [Accessibility] Missing contentDescription attribute on image

これの件です。

ContentDescription を無視する

公式の説明には、次のように書いてます。

スクリーン リーダーなどのユーザー補助機能サービスを利用している場合は、コンテンツ ラベルを通してユーザー インターフェースの各要素の意味を把握することになります。

ImageView、ImageButton、CheckBox など、情報を画像で伝える View を使用している場合は、android:contentDescription 属性を使用して、その View のコンテンツ ラベルを設定します。

意味のある情報を伝えない装飾的な画像には、コンテンツ ラベルは必要ありません。この場合は、"@null" の android:contentDescription 属性または "no" の android:importantForAccessibility 属性を設定します。

👉 コンテンツ ラベル - Android のユーザー補助機能 ヘルプ hatena-bookmark

要するに、

「飾りの意味のみの音声化する必要のないものはテキスト不要」

ということのようです。

以下、GitHub から、著名な開発組織のリポジトリから引用してきました。

 

android:contentDescription="@null"


<ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="48dp"
    android:layout_height="48dp"
    android:contentDescription="@null"
    app:srcCompat="@drawable/io_logo_color" />


<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="top|right"
    android:contentDescription="@null"
    android:src="@drawable/avatar_photo" />

 

android:importantForAccessibility="no"


<ImageView
    android:id="@+id/trending_repository_avatar"
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:layout_alignParentStart="true"
    android:layout_marginEnd="16dp"
    android:importantForAccessibility="no"
    tools:src="@drawable/avatar"
    />


<ImageView
    android:id="@+id/speaker_item_headshot"
    android:layout_width="@dimen/speaker_headshot_size"
    android:layout_height="@dimen/speaker_headshot_size"
    android:layout_marginStart="@dimen/margin_normal"
    android:importantForAccessibility="no"
    android:transitionName="@string/speaker_headshot_transition"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:speakerImage="@{speaker}" />

 

tools:ignore="ContentDescription"

上位タグに


xmlns:tools="http://schemas.android.com/tools"

が必要になります。


<ImageView
     android:id="@+id/direction_indicator"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_gravity="center_vertical"
     android:src="@drawable/ic_action_maps_navigation"
     tools:ignore="ContentDescription" />


<ImageView
    android:id="@+id/inputModeIcon"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/stream_ui_ic_arrow_curve_left"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    tools:ignore="ContentDescription"
    />

 

まとめ

3つの記述スタイルがあるようですが、


android:importantForAccessibility="no"

が一番手軽で、意味分かりやすい記述ではないかなと。

👉 【IDEA】typo チェックを無視する設定 元に戻したい リセットしたい【AndroidStudio】 hatena-bookmark