Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Fbpadのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Fbpad
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{Lowercase title}} [[Category:ターミナルエミュレータ]] [[en:Fbpad]] [http://repo.or.cz/w/fbpad.git fbpad] は一文字のタグを使って多数のターミナルを管理できる小型のフレームバッファターミナルです。C で書かれており固有のフォントフォーマット tinyfont を使って [[Xorg]] でフォントを使うために必要なパッケージが要らないために非常に軽量です。fbpad は任意で256色や太字フォント、フレームバッファのコンテンツのメモリ保存をサポートしており、様々な用途で [[X]] サーバーを置き換えることができます。 ==インストール== {{AUR|fbpad-git}} パッケージを[[インストール]]してください。デフォルトでは fbpad の "bold" と "scrsnap" ブランチがインポートされ、256色と太字フォント、そしてフレームバッファの中身の保存機能が追加されます。fbpad は {{ic|config.h}} ファイルでカスタマイズすることができ、{{ic|config.h}} ファイルを編集したら {{ic|makepkg --skipinteg -i}} を使って fbpad を再コンパイルしてください。 ==設定== {{ic|config.h}} でフォント (詳しくは下述), {{ic|SHELL}}, {{ic|MAIL}}, {{ic|EDITOR}} の定義を編集することができます。 [[dwm]] ユーザーは fbpad にすぐに慣れるでしょう。fbpad のキーバインドは修飾キーで始まり、dwm と同じように {{ic|Alt}} キーにハードコードされています。{{ic|Alt+j}} と {{ic|Alt+k}} で開いているタグのターミナルが切り替わり、{{ic|Alt+o}} で最後に開いたタグに切り替わり、{{ic|Alt+p}} で開いているタグのリストが表示されます。ソースコードの手動パッチに抵抗がなければ {{ic|fbpad.c}} ファイルを編集してキーバインドを編集・追加できます。 fbpad を頻繁に再コンパイルする場合、手動で再起動しなくても fbpad をリロードできるようにすると便利でしょう。以下のコードは tty1 でログインした後に fbpad を起動し、{{ic|Ctrl+Alt+q}} で fbpad を終了したときにリロードします。 {{bc|<nowiki> if [[ $(tty) = /dev/tty1 ]]; then while true; do fbpad >/dev/null 2>&1 done fi </nowiki>}} 上記を[[コマンドラインシェル]]の設定ファイルの末尾に追加してください。 ===タグの色=== タグリストのデフォルトの背景色は白にハードコードされていて、同じく空のタグの前景色は黒に、完全に埋まったタグの前景色は緑に (タグにはそれぞれ2つまでターミナルを格納できます)、完全には埋まっていないタグの前景色は青になっています。以下のパッチを使うことでカラースキームを変更することができます: {{bc|1= --- a/fbpad.c 2011-11-11 13:02:22.834825518 -0500 +++ b/fbpad.c 2011-11-11 13:04:07.016043271 -0500 @@ -110,7 +110,7 @@ static void showtags(void) { - int colors[] = {15, 4, 2}; + int colors[] = {8, 2, 9}; int c = 0; int r = pad_rows() - 1; int i; @@ -128,7 +128,7 @@ nt++; pad_put(i == ctag ? '(' : ' ', r, c++, FGCOLOR, BGCOLOR); if (TERMSNAP(i)) - pad_put(tags[i], r, c++, !nt ? BGCOLOR : colors[nt], 15); + pad_put(tags[i], r, c++, !nt ? 8 : colors[nt], BGCOLOR); else pad_put(tags[i], r, c++, colors[nt], BGCOLOR); pad_put(i == ctag ? ')' : ' ', r, c++, FGCOLOR, BGCOLOR); }} To use, replace "8" with the desired color for empty tags (in both instances), "2" with the desired color for not fully occupied tags, and "9" with the desired color for fully occupied tags, where the colors 0-15 are defined in the {{ic|config.h}} file. This patch also makes the default background color the background color of your terminal, which the writer finds to be a more natural choice. Note that the second "8" is the color for tags for which fbpad saves the framebuffer contents. If you choose to define {{ic|TAGS_SAVED}} as {{ic|TAGS}}, then you will want your default foreground color and the color for saved tags to be the same, i.e. "8" in both instances. Otherwise, you may define {{ic|TAGS_SAVED}} as a concatenated string of the tags to be saved, and change the second "8" to the color you wish to indicate saved tags by. The writer herself saves all tags for convenience. Save the patch as {{ic|fbpad-tagcolor.diff}}, add {{ic|'fbpad-tagcolor.diff'}} to your source array, and the following line to the {{ic|PKGBUILD}} after the line that copies the {{ic|config.h}} file: patch -p1 -i "${srcdir}/${_gitname}-tagcolor.diff" || return 1 ===フォント=== fbpad のフォントフォーマットは "tinyfont" であり、TTF ファイルを tinyfont フォーマットに変換するユーティリティとして {{AUR|ft2tf}} が存在します。ft2tf のビルドディレクトリの {{ic|config.h}} ファイルを編集して使用したいフォントの TTF ファイルを指定してください。例えばフォントファイル {{ic|MonteCarloFixed.ttf}} が {{ic|$HOME/.fonts}} ディレクトリに存在する場合、{{ic|config.h}} の10行目を以下のように編集 (ユーザー名の "archie" と作成するフォントサイズの 6 は適当に置き換えてください): {"/home/archie/.fonts/MonteCarloFixed12.ttf", 6}, 他のフォントの行は削除してください。他のフォントの文字でフォントを補間したい場合、上記と同じように他のフォントの TTF ファイルの行を追加してください。 それから {{ic|makepkg -skipinteg -i}} を実行してカスタマイズした設定でパッケージをビルド・インストールしてください。 ft2tf をインストールしたら、以下のコマンドで tinyfont ファイルが作成されます: $ ft2tf > MyFont.tf "MyFont" は適当な名前に置き換えることができます。 Remember to edit your {{ic|config.h}} to point to the directory where you save your {{ic|MyFont.tf}}. If your font also has a bold face, repeat the process of editing the ft2tf {{ic|config.h}} file, this time specifying the location of the boldface TTF file in the ft2tf {{ic|config.h}}, rebuilding with makepkg, and adding the final boldface tinyfont location to your fbpad {{ic|config.h}}. Also note that some fonts might require modification of the {{ic|WIDTHDIFF}} and {{ic|HEIGHTDIFF}} to have the proper width and height, respectively. ===カラーのサポート=== By default, the AUR package installs the custom terminfo for fbpad, but you will need to add {{bc|1=export TERM=fbpad-256}} to your shellrc to take advantage of the 256 color support. Clearly, commands not spawned in your default shell (for instance, those for {{ic|EDITOR}} and {{ic|MAIL}}) will not read your shellrc file, so you will need to edit their definitions in your {{ic|config.h}} file to have the commands for {{ic|EDITOR}} and {{ic|MAIL}} run in a parent shell. For instance, the author of this article, who uses [[zsh]], changed the default command for {{ic|MAIL}} from: #define MAIL "mailx" to #define MAIL "zsh -i -c mailx" Additionally, to have colors with the {{ic|ls}} command, "fbpad-256" needs to be added to the list of terms that {{ic|ls}} knows can handle color. Per the {{ic|README}}, run the following command in your shell: $ dircolors --print-database | sed '/^TERM linux$/aTERM fbpad-256' >$HOME/.dircolors and add {{ic|eval `dircolors ~/.dircolors`}} to your shellrc file so that the custom dircolors file, with the fbpad-256 term added, may be loaded. ==ヒントとテクニック== ===テキストのコピー=== As everything is done mouselessly in fbpad, to copy text, users can make a "screenshot" of all the text on the screen with the {{ic|Alt+s}} command. This will save all viewable text to the file {{ic|/tmp/scr}}. Then, if your shell supports editing the commandline with [[vim]] (for instance, the edit-command-line ZLE function in zsh), you can open the {{ic|/tmp/scr}} file as a new buffer in vim and use its copy keybindings to paste the needed text into your original buffer. [[Emacs]] users probably can adopt a similar scheme to copy text. ===YouTube の試聴=== If one is using [[MPlayer]] with the video output driver set to {{ic|fbdev2}}, {{Pkg|youtube-viewer}} can be used for searching YouTube and watching with MPlayer from the commandline in fbpad. Alternatively, one can add the following script as an external browser in the commandline web browser {{Pkg|w3m}}, and launch playback of videos from YouTube websites with one's media player of choice. The script below employs {{AUR|fbff-git}}, a lightweight media player also written by the author of fbpad, and {{AUR|yturl}}, a simple program, that, rather UNIX-like, functions solely to convert YouTube URLs into directly watchable URLs. {{bc|1= #!/bin/sh video=$(yturl $1) fbff -f $video > /dev/null 2>&1 }} Save the file in your {{ic|PATH}} as {{ic|youtube.sh}}, and add it as an external browser to w3m by opening w3m, hitting the {{ic|o}} key to edit options, and edit the "External Browser" field under "External Program Settings" by entering in the field "youtube.sh". Hit "OK", and you are done. Now, when wishing to watch a video, with YouTube open, hit the {{ic|M}} key, and the video will begin streaming instantly in fbff. ==推奨プログラム== 以下はフレームバッファベースのデスクトップの利便性を高めるプログラムです: * {{Pkg|dvtm}} - 動的な仮想ターミナルマネージャ (dwm のコンソール版) * {{AUR|fbcat}} - フレームバッファのスクリーンショット取得ツール * {{AUR|fbff-git}} - ffmpeg ベースのメディアプレイヤー * {{AUR|fbpdf-git}} - [[MuPDF]] ベースの PDF ビューア、DjVu のサポートや poppler によるレンダリングを任意でサポート * {{AUR|fbv}} - 画像ビューア * [[screen]] - ターミナルマルチプレクサ * {{Pkg|w3m}} - コマンドラインウェブブラウザ ==参照== * [https://bbs.archlinux.org/viewtopic.php?pid=1019748 fbpdf, fbpad, and fbff - A Minimal Framebuffer Software Suite] * [http://litcave.rudi.ir litcave], Ali Gholami Rudi のソフトウェアプロジェクトのホームページ
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Lowercase title
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
Fbpad
に戻る。
検索
検索
Fbpadのソースを表示
話題を追加