by shigemk2

当面は技術的なことしか書かない

timer-app

タイマーを表示するだけのシンプルなアプリ。以下特徴。

  • 電子レンジのつまみみたいにドラッグでぐるぐる捻って時間を設定する
    • 常識的な範囲では、時間制限は特にない 2000分くらいは大丈夫だった
  • stay to topで常に前面表示ができる
  • ポーズリスタートは可能
    • 再現できないけどポーズしてリスタートできない時があった

f:id:shigemk2:20220403200348p:plain

f:id:shigemk2:20220403200640p:plain

github.com

Keyboard MaestroでGoogle Meetのミュートオンオフを切り替える(Mac)

こちらを参考にしました。 electricdoc.net

こちらを参考に、Google Meetをインストールする

有効になった環境では、Google Meetのページにアクセスすると、Google Chromeのオムニボックス(アドレスバー)右側にインストールボタンが出現するようになる。

pc.watch.impress.co.jp

Keyboard Maestroを入れて、以下のように設定する。Groupsで「Google Meet」でグループを作って、マクロを作って、Enabledする。 f:id:shigemk2:20220209000057p:plain

やっていることとしては、以下な感じ。

  1. Triggered by any of the followingでF3キーを押した時のトリガーを作る
  2. Will execute the following actionsでcommand + Dを実行するようにGoogle Meetに送る(歯車→Send toでGoogle Meetを選ぶ)

mac date 昨日

GNU系じゃなくてBSD系なのでdateで昨日の表現はこんな感じ。

date -v-1d "+%Y-%m-%d"

nonoichi123.hatenablog.com

man dateすると以下説明があるけど、なんていうか日跨ぎ月跨ぎ年跨ぎサマータイムあたりで注意しないといけない

     -v      Adjust (i.e., take the current date and display the result of the adjustment; not actually set the date) the second, minute, hour, month day, week day, month or year
             according to val.  If val is preceded with a plus or minus sign, the date is adjusted forwards or backwards according to the remaining string, otherwise the relevant part
             of the date is set.  The date can be adjusted as many times as required using these flags.  Flags are processed in the order given.

             When setting values (rather than adjusting them), seconds are in the range 0-59, minutes are in the range 0-59, hours are in the range 0-23, month days are in the range
             1-31, week days are in the range 0-6 (Sun-Sat), months are in the range 1-12 (Jan-Dec) and years are in the range 80-38 or 1980-2038.

             If val is numeric, one of either y, m, w, d, H, M or S must be used to specify which part of the date is to be adjusted.

             The week day or month may be specified using a name rather than a number.  If a name is used with the plus (or minus) sign, the date will be put forwards (or backwards)
             to the next (previous) date that matches the given week day or month.  This will not adjust the date, if the given week day or month is the same as the current one.

             When a date is adjusted to a specific value or in units greater than hours, daylight savings time considerations are ignored.  Adjustments in units of hours or less honor
             daylight saving time.  So, assuming the current date is March 26, 0:30 and that the DST adjustment means that the clock goes forward at 01:00 to 02:00, using -v +1H will
             adjust the date to March 26, 2:30.  Likewise, if the date is October 29, 0:30 and the DST adjustment means that the clock goes back at 02:00 to 01:00, using -v +3H will
             be necessary to reach October 29, 2:30.

             When the date is adjusted to a specific value that does not actually exist (for example March 26, 1:30 BST 2000 in the Europe/London timezone), the date will be silently
             adjusted forwards in units of one hour until it reaches a valid time.  When the date is adjusted to a specific value that occurs twice (for example October 29, 1:30
             2000), the resulting timezone will be set so that the date matches the earlier of the two times.

             It is not possible to adjust a date to an invalid absolute day, so using the switches -v 31d -v 12m will simply fail five months of the year.  It is therefore usual to
             set the month before setting the day; using -v 12m -v 31d always works.

             Adjusting the date by months is inherently ambiguous because a month is a unit of variable length depending on the current date.  This kind of date adjustment is applied
             in the most intuitive way.  First of all, date tries to preserve the day of the month.  If it is impossible because the target month is shorter than the present one, the
             last day of the target month will be the result.  For example, using -v +1m on May 31 will adjust the date to June 30, while using the same option on January 30 will
             result in the date adjusted to the last day of February.  This approach is also believed to make the most sense for shell scripting.  Nevertheless, be aware that going
             forth and back by the same number of months may take you to a different date.

BigSur M1

今日からやっていき。

f:id:shigemk2:20201201231329p:plain

  • Chrome いけた
  • iTerm2 いけた
  • homebrew そのままじゃダメだけど/optのしたで頑張っていけばとりあえずいけた

  • brew cask install emacs とりあえず成功 下のメッセージが出たけど

    • Warning: Calling brew cask install is deprecated! Use brew install [--cask] instead.

所々見る

Warning: You are running macOS on a arm64 CPU architecture.
We do not provide support for this (yet).
Reinstall Homebrew under Rosetta 2 until we support it.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.

fish shell 失敗

brew install -s fish
==> ./configure --prefix=/opt/homebrew/Cellar/python@3.9/3.9.0_2 --enable-ipv6 --datarootdir=/opt/homebrew/Cellar/python@3.9/3.9.0_2/share --datadir=/opt/homebrew/Cellar/python@3.9/3.9.0_2/share --enable-
==> make
Last 15 lines from /Users/xxxxx/Library/Logs/Homebrew/python@3.9/02.make:
    self.run_command(cmd_name)
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/Lib/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/./setup.py", line 470, in build_extensions
    self.detect_modules()
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/./setup.py", line 1807, in detect_modules
    self.detect_readline_curses()
  File "/private/tmp/python@3.9-20201201-12995-xwv15b/Python-3.9.0/./setup.py", line 1038, in detect_readline_curses
    (tuple(int(n) for n in dep_target.split('.')[0:2])
AttributeError: 'int' object has no attribute 'split'
make: *** [sharedmods] Error 1

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
python@3.9: update pip https://github.com/Homebrew/homebrew-core/pull/65953
python@3.9: make test run on ARM https://github.com/Homebrew/homebrew-core/pull/64869

ghq 失敗

brew install ghq
Building Go cmd/dist using /private/tmp/go-20201201-7828-1jioho7/go/gobootstrap. ()
./make.bash: line 181:  9580 Segmentation fault: 11  GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
go-jira: added zsh completion https://github.com/Homebrew/homebrew-core/pull/63420
crystal: proper --HEAD build. Go back to llvm@9 https://github.com/Homebrew/homebrew-core/pull/65221
linkerd 2.9.0 is built with go 1.15 which leads to x509 error https://github.com/Homebrew/homebrew-core/issues/64498
[epic] Remove GOPATH for go modules formula https://github.com/Homebrew/homebrew-core/issues/47627

ユニバーサルクリップボード

ユニバーサルクリップボードを使って Apple デバイス間でコピーアンドペーストする - Apple サポート

手元の Apple デバイスでテキスト、画像、写真、ビデオをコピーして、別の Apple デバイスにペースト

  • 各デバイスでそれぞれ同じ Apple ID を使って iCloud にサインインしている。
  • 各デバイスで Bluetooth がオンになっている。
  • 各デバイスで Wi-Fi がオンになっている。
  • 各デバイスで Handoff がオンになっている。

以上がユニバーサルクリップボードを使える条件なのだけど、片方のWi-Fiが繋がってなくてもBluetoothがオンならユニバーサルクリップボードが使える。 Bluetooth経由だとクリップボードを参照するのに時間がかかるけど。

iTerm2 3.3.0

  • A Python scripting API has been added to enable extensive configuration and customization. See https://iterm2.com/python-api for details.
  • A scriptable status bar has been added with 13 built-in configurable components.
  • Two new themes:
    • Minimal: Reduces visual clutter. Modernist.
    • Compact: Moves tabs into the title bar to save space, while preserving the general appearance of a macOS app.

はいはい。

Release v3.3.0 · gnachman/iTerm2 · GitHub