コンテンツにスキップ

カスタム CSS

Switch to Zen Mode

Mutsumi は Textual フレームワーク上に構築されているため、Textual CSS(TCSS)を使って外観を細かくカスタマイズできます。テーマだけでは実現できない詳細なスタイル変更に最適です。

config.toml でカスタム CSS ファイルのパスを指定します:

custom_css_path = "~/.config/mutsumi/custom.tcss"

Textual CSS は Web CSS に似た構文を持ちますが、ターミナル UI 向けに最適化されています。

/* ウィジェットタイプでセレクト */
Header {
background: #1e1e2e;
color: #cdd6f4;
}
/* クラスでセレクト */
.task-row {
padding: 0 1;
}
/* ID でセレクト */
#footer-bar {
background: #181825;
}
/* 擬似クラス */
.task-row:hover {
background: #313244;
}
.task-row:focus {
background: #45475a;
}
プロパティ説明
background背景色background: #1e1e2e;
colorテキスト色color: #cdd6f4;
padding内側余白padding: 1 2;
margin外側余白margin: 0 1;
borderボーダーborder: solid #6c7086;
text-styleテキストスタイルtext-style: bold;
display表示モードdisplay: none;
height高さheight: auto;
widthwidth: 100%;
#footer-bar {
background: #181825;
color: #a6adc8;
}
.task-row {
padding: 0 2;
}
.task-row:hover {
background: #313244;
}
.task-row.-selected {
background: #45475a;
text-style: bold;
}
.tab-button {
padding: 0 2;
}
.tab-button.-active {
text-style: bold underline;
}
#detail-panel {
background: #1e1e2e;
border: solid #6c7086;
padding: 1 2;
}
*::-webkit-scrollbar {
display: none;
}
~/.config/mutsumi/custom.tcss
/* 全体の背景色を変更 */
Screen {
background: #0d1117;
}
/* ヘッダーのカスタマイズ */
Header {
background: #161b22;
color: #c9d1d9;
}
/* タスク行 */
.task-row {
padding: 0 1;
}
.task-row:hover {
background: #21262d;
}
.task-row.-done {
color: #484f58;
text-style: strike;
}
/* 優先度カラーのオーバーライド */
.priority-high {
color: #f85149;
}
.priority-normal {
color: #d29922;
}
.priority-low {
color: #484f58;
}