﻿BAR・BAR
========

Windows のタスクバーに溶け込む、極小のシステムモニター。

CPU・メモリ・ディスク・ネットワークを色分けした細い線で表示します。数値も文字も出しません。
マウスを乗せたときだけ、数値と天気をパネルで見せます。

(English version follows the Japanese text below.)

特徴
----

- 軽い — アイドル時 CPU 0.01% 前後、メモリ 8MB 程度
- 配布は実行ファイル 1 つだけ — インストーラも、ランタイムも、DLL も不要
- 設定ファイルは初回起動時に自動生成 — 実行ファイルと同じ場所に作られる（ポータブル）
- タスクバーに溶け込む — 背景を持たないので、タスクバーのアクリルがそのまま透ける
- 天気アイコン（任意）— 単色の輪郭線アイコン。API キー不要
- 全画面のアプリより前に出ない — タスクバーのちょうど 1 つ上に並ぶので、動画やゲームが
  タスクバーより前に出れば一緒に隠れます
- サブディスプレイにも表示（任意）— タスクバーがあるすべての画面に同じバーを出せます
- OS のテーマに追従 — 設定画面と右クリックメニューがライト／ダークに自動で合わせます
- 日本語 / English

表示するもの
------------

  CPU
      プロセッサ使用率
  メモリ
      物理メモリ使用率
  ディスク
      ディスクがビジーだった時間の割合（タスクマネージャーの「アクティブな時間」と同じ指標）
  ネットワーク
      1 本の線で双方向。送信は左端から右へ、受信は右端から左へ伸び、重なった区間は別の色になる
  GPU
      GPU 使用率（既定では非表示。設定で有効化）
  アクセスランプ
      物理ディスクごとに 1 個。ディスクのバーに重ねて置かれ、I/O が発生している間だけ点灯する。読み込み・書き込み・同時で色が変わる（既定は緑・赤・琥珀、設定で変更可）

配色はタスクマネージャー「パフォーマンス」タブに寄せてあります。すべて設定で変更できます。

[対数目盛り]

ネットワークとディスクは既定で対数目盛りです。線形だと、実用的な値の範囲で線がほとんど動かないためです。

- ネットワーク：基準 100Mbps に対し、100KB/s が線形では 1% 未満。対数では約 49%
- ディスク：ビジー率 5% が 32%、10% が 45%。0% と 100% は動かしません

設定で線形に戻せます。

[ホバー表示]

マウスを乗せると、各項目の数値が出ます。パネルの大きさは値によって変わりません。

- ネットワークは実スループット（MB/s）
- ディスクは 使用: 83%  負荷: 5%（使用容量の割合と、ビジー率）
- 天気を有効にしていれば、概況と気温、降水確率

ディスクの空き容量はホバーを出したときだけ取得し、10 秒キャッシュします。常駐中のコストはゼロです。

使い方
------

1. bar-bar.exe を好きな場所に置いて実行する
2. 通知領域に BAR・BAR のアイコンが出る（横線 4 本。システムのテーマに合わせて明暗が変わります）
3. アイコンを右クリック → 設定...

トレイメニューからは「表示 / 非表示」「設定」「タスクバーに貼り直す」「終了」ができます。

[天気を表示する]

既定では無効です。外部へ通信するため、明示的に有効にする必要があります。

設定画面で「天気アイコンを表示する」にチェックを入れ、エリア設定で地点を決めます。

  自動
      Windows の位置情報サービスで現在地を求めます。選んだ時点で測位します。許可されていない場合は、どの設定を有効にすればよいかを座標欄に表示します
  手動
      地名で検索し、候補から選びます。日本語でも英語でも検索できます（札幌 / Sapporo）。同名の地名が各国にあるため（London は英国・カナダ・米国に存在）、候補には地域と国が添えられます

座標欄は読み取り専用です。手打ちで壊れた値が入ると取得が黙って失敗し続けるため、
検索か測位で確定した値だけが入ります。

- 天気の取得は Open-Meteo (https://open-meteo.com/)、地名検索は
  Photon (https://photon.komoot.io/)（OpenStreetMap）。どちらも API キー不要
- IP による位置推定は使いません。Windows の測位は内部で Wi-Fi や IP 推定も行うため、
  第三者のサービスへ利用者の IP を送らずに済みます
- 取得は既定で 10 分間隔、通信はバックグラウンドで行うため表示は止まりません
- 地点が決まっていないあいだは通信しません

Windows の起動時に開始する
--------------------------

設定画面（監視項目タブ）の「Windows の起動時に開始する」で切り替えます。
スタートアップフォルダー（shell:startup）へショートカットを置くだけなので、
管理者権限もインストーラも要りません。タスクマネージャーの「スタートアップ アプリ」に
BAR-BAR の名前で並び、そこから無効にすることもできます。

実行ファイルを移動したら、設定画面で入れ直してください（登録は当時の場所を指したままです）。

設定
----

設定は実行ファイルと同じ場所の config.toml に保存されます。
書き込めない場所（Program Files 配下など）に置いた場合のみ
%APPDATA%\bar-bar\config.toml に退避します。

設定画面（トレイメニューの「設定...」）で主要な項目を変更できます。
色や余白などの細かい項目は、このファイルを直接編集してください。

主な項目:

  [layout] band_height
      線の束と天気アイコンが共有する高さ。天気の ON/OFF で線の位置は動きません
  [layout] line_inset
      線の上下の余白
  [layout] line_length
      線の長さ（バーの幅）
  [layout] offset_y
      上下位置の微調整。正で下、負で上
  [general] displays
      primary（メインのみ・既定）か all（タスクバーがあるすべての画面）
  [layout] anchor
      配置基準。既定の tray_left は通知領域のすぐ左に置きます
  [weather] temperature_unit
      celsius か fahrenheit。取得は常に摂氏で、表示のときだけ換算します
  [weather] location_mode
      auto（Windows の位置情報）か manual（地名検索）
  [metrics] items
      表示する項目と順序
  [metrics] network_logarithmic / disk_logarithmic
      対数目盛りの ON/OFF
  [metrics] network_scale_mbps
      ネットワークの線が満杯になる速度
  [appearance] disk_lamp_read_color / disk_lamp_write_color / disk_lamp_both_color
      アクセスランプの色。読み込み・書き込み・同時で塗り分けます
  [appearance] color_scheme
      standard / family / custom
  [appearance] color_family
      系統。color_scheme = "family" のときだけ効きます
  [appearance] *_color
      各項目の色。color_scheme = "custom" のときに使われます
  [appearance] tray_icon_color
      トレイアイコンの色。未指定ならシステムのテーマに追従します

設定ファイルは版が上がっても引き継がれます。削除・改名された項目は捨てて
いまの形式へ書き戻し、構文が壊れて読めない場合は破棄して作り直します。
いずれの場合も起動は止まりません。何を無視・破棄したかは --debug を付けて
起動すると分かります。

[配色]

設定画面の「デザイン設定」タブで、バーの色をまとめて変えられます。

  標準
      タスクマネージャーに寄せた既定の配色
  配色指定
      系統を 1 つ選び、同系色の明るさ違いで 5 本を並べます
  カスタム
      1 本ずつ色を選びます

系統は モノ / 赤 / 黄 / 緑 / 青 / ピンク の 6 つです。有彩色は互いに
45 度以上離してあり、隣り合う系統でも見分けがつきます。

モノはタスクバーの明暗に追従します。暗いタスクバーでは白～グレー、
明るいタスクバーでは黒～グレーになります。Windows のテーマを切り替えると
その場で切り替わります。有彩色の系統は地の明暗によらず同じ色です。

送信側と重なり区間の色は、選んだ色から自動で導きます（送信は暗く、重なりは
明るく）。設定画面で選ぶのは 5 本の基本色だけです。
アクセスランプの色は配色の系統とは独立していて、別に選べます。

動作環境
--------

- Windows 11（64bit）
- 管理者権限は不要

Windows 10 は未検証です。動く見込みはありますが、タスクバーの描画方式・背景の
透け方・通知領域の位置が違うため、見た目が変わる可能性があります。
ホバーパネルの角丸は Windows 11 専用の指定なので、Windows 10 では直角になります。

制限と既知の注意点
------------------

- タスクバー内の表示は Microsoft が公式にサポートする方法ではありません。
  Windows のタスクバー実装が変わると壊れる可能性が構造的に残ります。
  その場合でもトレイ常駐は生き残るので、アプリが操作不能になることはありません。
- Windows 11 では、タスクバーの内容は Windows.UI.Composition.DesktopWindowContentBridge が
  描画しており、Shell_TrayWnd の子ウィンドウになる古典的な手法では描画されません。
  本アプリは最前面オーバーレイ方式を使っています（Windows 10 向けに子ウィンドウ方式も選べます）。
- サブディスプレイでは、時計があればその左に、時計を消していれば右端に置きます。
  この判定にだけ UI オートメーションを使うため、有効にしているあいだは常駐が
  1MB ほど大きくなります。無効なら読み込みません。
- サブディスプレイに出すには、Windows 側で「タスクバーをすべてのディスプレイに表示する」を
  有効にしておく必要があります。無効なら副タスクバーが存在しないため、設定を all にしても
  メインだけに出ます。
- Windows 標準の天気ウィジェットを表示したままだと、本アプリと横に並びます。
- CPU 温度は表示できません。Windows で正確な CPU 温度を読むにはカーネルドライバが必要で、
  「実行ファイル 1 つのポータブル配布」という方針と両立しません。
- アクセスランプは物理ディスクが対象です。Google ドライブのような仮想ドライブは
  ディスク性能カウンターを持たないため、そもそも I/O を取得できません。

配布元
------

https://developerz.jp/products/bar-bar/

最新の情報はこのページに載せています。英語版のページ: https://developerz.jp/en/products/bar-bar-en/

利用条件
--------

- BAR・BAR はフリーウェアです。個人の利用は無料です。著作権は DEVELOPERZ.JP に帰属し、ソースコードは公開していません。
- 商用での利用（業務用の PC での利用、法人での導入など）は、事前に info@developerz.jp へご連絡のうえ、承認を受けてください。
- 再配布は、無改変の配布ファイルを、無償で、出典（https://developerz.jp/products/bar-bar/）を明記する場合に限り可能です。できるだけ、このページからの配布をご案内ください。
- 改変、逆アセンブル・逆コンパイル、他のソフトウェアへの組み込み・同梱、有償での頒布は禁止します。
- 天気の表示には、Open-Meteo（天気データ、CC BY 4.0）と Photon（地名検索、© OpenStreetMap contributors）を使います。天気機能は既定で無効です。商用で利用する場合、天気機能は Open-Meteo の商用の条件に従うか、オフにしてください。
- BAR・BAR は、作者へ情報を送りません。通信するのは、天気機能を有効にしたときの天気の取得（座標を小数 4 桁に丸めて送信）と、地名検索（入力した地名を送信）だけです。
- 本ソフトは現状のまま提供し、動作や特定の目的への適合を保証しません。作者は、故意または重大な過失がある場合を除き、本ソフトの利用による損害について責任を負いません。
- サポートは保証しません。予告なく、配布の終了や条件の変更をすることがあります。本条件は日本法に従います。

本ソフトが使用しているライブラリの著作権表示とライセンスは、同梱の THIRD-PARTY-NOTICES.txt に記載しています。

作者
----

MASA AMIYA — info@developerz.jp


========================================================================


BAR・BAR
========

A tiny system monitor that blends into the Windows taskbar.

CPU, memory, disk and network are shown as thin colour-coded lines — no numbers, no text.
Hover over it and a small panel shows the readings, plus the weather if you enable it.

Highlights
----------

- Light — around 0.01% CPU when idle, roughly 8 MB of memory
- Ships as a single executable — no installer, no runtime, no DLLs
- Config file is created on first run, next to the executable (portable)
- Blends in — the window has no background, so the taskbar's acrylic shows through
- Weather icon (optional) — monochrome outline icons, no API key needed
- Never on top of a full-screen app — it sits exactly one step above the taskbar, so it
  goes behind whatever the taskbar goes behind
- Secondary displays (optional) — draw the same bars on every display that has a taskbar
- Follows the OS theme — the settings window and context menu switch between light and dark automatically
- Japanese / English

What it shows
-------------

  CPU
      Processor utilisation
  Memory
      Physical memory in use
  Disk
      Percentage of time the disk was busy (the same figure Task Manager calls "Active time")
  Network
      One line, both directions. Send grows from the left edge, receive grows from the right edge, and the overlap is drawn in its own colour
  GPU
      GPU utilisation (off by default; enable it in settings)
  Activity lamp
      One per physical disk, drawn on the disk bar itself and lit while that disk has I/O. Reads, writes and both at once each get their own colour. Defaults are green, red and amber; all three are configurable

The palette follows Task Manager's Performance tab. Every colour is configurable.

[Logarithmic scaling]

Network and disk use a logarithmic scale by default, because a linear one barely moves
across the range of values you actually see.

- Network: against a 100 Mbps full scale, 100 KB/s reads under 1% linearly — about 49% logarithmically
- Disk: 5% busy reads as 32%, 10% as 45%. Both 0% and 100% stay put

You can switch back to linear in the config.

[Hover panel]

Hovering shows each reading. The panel does not change size as values change.

- Network as actual throughput (MB/s)
- Disk as Used: 83%  Load: 5% — space used and busy time
- Conditions, chance of rain and temperature, when weather is enabled

Free space is queried only while the panel is shown and cached for 10 seconds, so it costs
nothing while the app sits idle.

Getting started
---------------

1. Put bar-bar.exe anywhere and run it
2. A BAR・BAR icon appears in the notification area (four lines; it follows the system light/dark theme)
3. Right-click the icon → Settings...

The tray menu offers Show/Hide, Settings, Reattach to taskbar, and Exit.

[Enabling weather]

Disabled by default, because it talks to the network.

Tick "Show weather icon" in settings, then pick a location under Area.

  Automatic
      Uses the Windows location service. Selecting the mode starts positioning immediately. If location is not permitted, the coordinates field explains which setting to enable
  Manual
      Search by place name and pick from the matches. Both Japanese and English work (札幌 / Sapporo). Because the same name exists in several countries (London is in the UK, Canada and the US), matches are listed with their region and country

The coordinates field is read-only. A mistyped value would make fetching fail silently, so only
a searched or measured result goes in.

- Weather comes from Open-Meteo (https://open-meteo.com/); place search from
  Photon (https://photon.komoot.io/) (OpenStreetMap). Neither needs an API key
- No IP-based geolocation. The Windows location service already uses Wi-Fi and IP
  internally, so your IP never goes to a third-party service
- It refreshes every 10 minutes by default, on a background thread, so the display never stalls
- Nothing is fetched until a location is set

Starting with Windows
---------------------

Toggle it from the Monitors tab. It only writes a shortcut into
the Startup folder (shell:startup), so no installer and no administrator rights
are involved. It appears as BAR-BAR under Startup apps, where it can also be
disabled.

If you move the executable, re-apply the setting — the entry still points at the
old path.

Configuration
-------------

Settings live in config.toml next to the executable. If that location is not writable
(under Program Files, for example) the file falls back to %APPDATA%\bar-bar\config.toml.

The settings dialog (tray menu → Settings...) covers the common options. For finer details —
colours, padding — edit the file directly.

Notable keys:

  [layout] band_height
      Height shared by the line stack and the weather icon. Toggling weather does not move the lines
  [layout] line_inset
      Vertical margin above and below the lines
  [layout] line_length
      Length of the lines (bar width)
  [layout] offset_y
      Vertical nudge. Positive moves down, negative moves up
  [general] displays
      primary (primary only, the default) or all (every display that has a taskbar)
  [layout] anchor
      Placement. The default tray_left sits just left of the notification area
  [weather] temperature_unit
      celsius or fahrenheit. Data is always fetched in Celsius and converted for display
  [weather] location_mode
      auto (Windows location) or manual (place search)
  [metrics] items
      Which items to show, and in what order
  [metrics] network_logarithmic / disk_logarithmic
      Toggle logarithmic scaling
  [metrics] network_scale_mbps
      Throughput at which the network line reads full
  [appearance] disk_lamp_read_color / disk_lamp_write_color / disk_lamp_both_color
      Access lamp colours for reads, writes and both at once
  [appearance] color_scheme
      standard, family or custom
  [appearance] color_family
      The family. Only has an effect when color_scheme = "family"
  [appearance] *_color
      Per-item colours, used when color_scheme = "custom". net_overlap_color covers where send and receive overlap
  [appearance] tray_icon_color
      Tray icon colour. Follows the system theme when unset

Settings survive upgrades. Keys that no longer exist are dropped and the file is
rewritten in the current format; a file too broken to parse is discarded and
rebuilt. Neither case stops the app from starting. Run with --debug to see what
was ignored or discarded.

[Colours]

The Appearance tab lets you change all bar colours at once.

  Standard
      The default palette, close to Task Manager
  Preset family
      Pick one family; the five bars are shades of it
  Custom
      Pick each bar's colour individually

The families are Mono / Red / Yellow / Green / Blue / Pink. The chromatic
ones are at least 45 degrees apart on the hue circle, so neighbouring families
stay clearly distinct.

Mono follows the taskbar theme. On a dark taskbar it runs white to grey; on
a light one, black to grey. It switches as soon as you change the Windows theme.
Chromatic families are the same regardless of the background.

The send-side and overlap colours are derived from the colours you pick (send is
darker, overlap is lighter), so the dialog only asks for the five base colours.
The access lamp colours are independent of the scheme and are chosen separately.

Requirements
------------

- Windows 11 (64-bit)
- No administrator rights needed

Windows 10 is untested. It will probably run, but the taskbar is drawn differently
there, so the placement and the way the background shows through may differ.
The rounded corners on the hover panel are a Windows 11 feature; on Windows 10 the
panel has square corners.

Limitations and things worth knowing
------------------------------------

- Drawing inside the taskbar is not a Microsoft-supported technique.
  A change to the taskbar implementation could break it. The tray icon keeps working
  either way, so the app never becomes unreachable.
- On Windows 11 the taskbar is drawn by Windows.UI.Composition.DesktopWindowContentBridge,
  and the classic approach of becoming a child of Shell_TrayWnd is never rendered.
  BAR・BAR uses a topmost overlay instead (the child-window mode remains available for Windows 10).
- On a secondary display the bars sit left of the clock, or at the right edge if the clock is
  hidden. Detecting that uses UI Automation, which adds about 1MB while the option is on.
  Nothing is loaded when it is off.
- Secondary displays require "Show my taskbar on all displays" to be enabled in Windows.
  Without it there is no secondary taskbar to draw on, so all behaves like primary.
- If you leave the built-in Windows weather widget enabled, it will sit alongside BAR・BAR.
- CPU temperature is not available. Reading it accurately on Windows requires a kernel
  driver, which is incompatible with shipping a single portable executable.
- Activity lamps cover physical disks. Virtual drives such as Google Drive have no disk
  performance counters at all, so their I/O cannot be measured.

Website
-------

https://developerz.jp/en/products/bar-bar-en/

The latest information is published on this page. Japanese page: https://developerz.jp/products/bar-bar/

Terms of use
------------

- BAR・BAR is freeware and free for personal use. Copyright belongs to DEVELOPERZ.JP; the source code is not published.
- Commercial use (on work computers, deployment in a company, etc.) requires prior approval. Please contact info@developerz.jp first.
- Redistribution is allowed only for the unmodified package, free of charge, with the source (https://developerz.jp/en/products/bar-bar-en/) credited. Linking to this page is preferred.
- Modifying, disassembling or decompiling, bundling it with other software, and selling it are not permitted.
- Weather uses Open-Meteo (weather data, CC BY 4.0) and Photon (place search, © OpenStreetMap contributors). Weather is off by default. For commercial use, follow Open-Meteo’s commercial terms or keep weather turned off.
- BAR・BAR sends nothing to the author. The only network traffic is fetching the weather when it is enabled (coordinates rounded to 4 decimal places) and place search (the name you type).
- The software is provided as is, without warranty of any kind. Except in cases of wilful misconduct or gross negligence, the author is not liable for any damage arising from its use.
- Support is not guaranteed. Distribution may end and these terms may change without notice. These terms are governed by the laws of Japan.

Copyright notices and licences for the libraries used by this software are listed in the bundled THIRD-PARTY-NOTICES.txt.

Author
------

MASA AMIYA — info@developerz.jp
