I changed my mind. $XDG_CONFIG_HOME/fbterm/fbtermrc
is now an allowed configuration location along with the old $XDG_CONFIG_HOME/fbtermrc
. Old location is used only when $XDG_CONFIG_HOME/fbterm/
does not exist.
Search Criteria
Package Details: fbterm 1.7_5-5
Package Actions
Git Clone URL: | https://aur.archlinux.org/fbterm.git (read-only, click to copy) |
---|---|
Package Base: | fbterm |
Description: | Framebuffer terminal emulator |
Upstream URL: | https://salsa.debian.org/debian/fbterm |
Keywords: | console emulator fbterm framebuffer terminal tty |
Licenses: | GPL2 |
Conflicts: | fbterm |
Provides: | fbterm |
Submitter: | ivanp7 |
Maintainer: | ivanp7 |
Last Packager: | ivanp7 |
Votes: | 6 |
Popularity: | 0.75 |
First Submitted: | 2021-05-19 12:15 (UTC) |
Last Updated: | 2023-09-23 04:45 (UTC) |
Dependencies (5)
- fontconfig (fontconfig-gitAUR, fontconfig-ubuntuAUR)
- freetype2 (freetype2-macosAUR, freetype2-gitAUR, freetype2-qdoledAUR)
- ncurses (ncurses-gitAUR)
- autoconf (autoconf-gitAUR) (make)
- patch (patch-gitAUR) (make)
Required by (2)
- fcitx-fbterm-git
- fcitx5-fbterm-git (optional)
Sources (8)
Latest Comments
« First ‹ Previous 1 2 3
ivanp7 commented on 2021-11-27 21:50 (UTC)
ivanp7 commented on 2021-09-25 21:58 (UTC) (edited on 2021-09-25 22:22 (UTC) by ivanp7)
@m040601
Wow, you've written a lot, dude. I'll answer point by point.
1.
Although if I might suggest, the best would even be setting the default to:
~/.config/fbterm/fbtermrc
instead of:
~/.config/fbtermrc
I cannot change the configuration location one more time. While it is viable to check several places, I am not sure whether complicating the path by adding a directory is really useful for a program which uses a single configuration file. Also, I believe .config
is not a good place for such things you said. Personally, I'd like to separate configuration and other stuff.
2.
Notice that I dont do "export TERM=fbterm-256color". I simply do "export TERM=fbterm" If I choose the 256color version it messes everything.
It is strange, because the termcap file for TERM=fbterm
is from ncurses
package, while the termcap for TERM=fbterm-256color
is built with fbterm.
I don't know why it messes everything in your case, I experience no problems with this.
3.
I personally use fbterm like this. I alias fbterm
to $MY_BIN_DIR/fbterm-pre.sh
. The "pre" script sets wallpaper and starts fbterm with a custom command:
exec fbterm -n "$DEFAULT_FONT_NAME" -s "$DEFAULT_FONT_SIZE" -- "$MY_BIN_DIR/fbterm-post.sh" "$1"
The "post" script does export TERM=fbterm-256color
and then tmux attach
.
With this configuration, I just type fbterm
and bam, I'm in a fancy tmux session with all colors and font characters. When I detach from the session, fbterm also quits.
4.
The only thing I cant manage to work is changing the color pallete.
The palette is hardcoded in fbterm, there is no way to change the colors without developing another patch. To implement palette customization correctly, it is easier to create a fork, because if I go an obvious way, there will be 256 additional environment variables.
m040601 commented on 2021-09-25 17:24 (UTC) (edited on 2021-09-25 17:48 (UTC) by m040601)
ivanp7 commented on 2021-05-20 11:35 (edited on 2021-09-25 01:37 by ivanp7)
To enable 256 color mode properly, do export TERM=fbterm-256color AFTER fbterm
starts and then attach to a tmux session. If TERM is not linux upon fbterm launch,
it will fail. Tmux is needed because fbterm provides escape codes that differ from
broadly used codes, so tmux serves as an abstraction layer.
This is what worked for me:
- Boot arch
- Login to the linux console
- Run start_fbterm.sh
- export TERM=fbterm
- tmux
Notice that I dont do "export TERM=fbterm-256color". I simply do "export TERM=fbterm" If I choose the 256color version it messes everything. Vim, with or without tmux etc.
Notice that I also dont do "tmux -2". Just tmux.
And I do get 256 colors this way.
After 10 years of using tmux and messing with terminals, I found that the best for me is to never touch any settings in tmux or vim etc that might mess with the terminal. So, I also dont do this in tmux.conf:
# set -g default-terminal "tmux-256color"
Let it do and pick whatever it wants to do. If this terminfo/ncurses/termcap database thingy is broken and missing, thats the job of the developers. Linux is 30 years old. These things should work out of the box, without any need for a PhD in ncurses/terminals/escape_sequences etc.
start_fbterm.sh
#!/usr/bin/env sh
#
# start_fbterm.sh
#
export XDG_CONFIG_HOME=~/.config
# hide cursor
echo -ne "\e[?25l"
# Finding wallpaper
bg_wallpaper=${FBTMUX_WALLPAPER:-$(find "$HOME/Pictures" -name 'wallpaper.*' | head -1)}
# Set wallpaper with fbv
if command -v fbv > /dev/null 2>&1 && [ -n "$bg_wallpaper" ]; then
bg_framebuffer=$bg_wallpaper
# regenerate darkened image for framebuffer with convert
if command -v convert > /dev/null 2>&1; then
bg_framebuffer=/tmp/$USER.framebuffer.${bg_wallpaper##*.}
# Compare modified time, only update when needed
# use stat instead of test -nt/-ot command which dereferences links
script_time=$(stat -Lc %Y "$0")
bg_wallpaper_time=$(stat -c %Y "$bg_wallpaper")
[ -e "$bg_framebuffer" ] && bg_framebuffer_time=$(stat -c %Y "$bg_framebuffer")
if [ ! -e "$bg_framebuffer" ] \
|| [ "$bg_framebuffer_time" -lt "$bg_wallpaper_time" ] \
|| [ "$bg_framebuffer_time" -lt "$script_time" ]; then
# convert -modulate brightness,saturation
convert "$bg_wallpaper" -modulate 15,40 -blur 0x4 "$bg_framebuffer"
fi
fi
# start fbterm/yaft with background using fbv
fbv -ciuker "$bg_framebuffer" << EOF
q
EOF
export FBTERM_BACKGROUND_IMAGE=1
fi
fbterm
I'm in in no way a "eye candy" guy or like to waste much time with "themes" and "ricing" or customizing desktops. I actually never used wallpapers before.
But that script just gives you a gorgeous background, rotating pictures, and darkening them, so it doesnt get in your way.It uses "convert" from the ImageMagick package which is standard stuff in Archlinux
I got it from this guy, https://github.com/OliverLew/dotfiles Very much worth checking out
- He is a power user of tmux and fbterm, with a very interesting 'fbtmux' script, completely mimicking a desktop manager (ex. dwm).
- Asian user, so has also configurations for CJK asian fonts and input methods fcitx
The only thing I cant manage to work is changing the color pallete. I do get 256 colors. But no matter how much I google and search git hub, I cant manage to change that horrible deep blue default of fbterm. Tried many "escape sequences" in .profile and .bashrc, but seems like fbterm is a different beast. Not sure of the color syntax to use also . RGB ??? SGR ??? Escape Sequences ? (man console_codes)
This has no effect:
# color-foreground=a6a19b
# color-background=212121
# color-0=303030
# color-1=826023
# color-2=618231
# color-3=7e7b28
# color-4=3e825c
# color-5=82685c
# color-6=749cb3
# color-7=a6a19b
# color-8=484848
# color-9=b48430
# color-10=86b443
# color-11=b0ab37
# color-12=55b47f
# color-13=b4907f
# color-14=9bb4c8
# color-15=d8d1c9
m040601 commented on 2021-09-25 17:09 (UTC)
author ivanp7 2021-09-25 04:34:48 +0300
Fix configuration directory default according to XDG specs; provide sha256 sums for
all files
Thanks again to ivanp7 for quickly responding and taking care good care of this PKGBUILD.
I had the same issue, but was convinced something was wrong on my setup. So I didnt bother reporting it.
I had tried a thousand times using a fbtermrc in:
- /etc/fbterm/fbtermrc
- ~/.fbtermrc
- ~/.config/fbtermrc
- ~/.config/.fbtermrc
- ~/.config/fbterm/fbtermrc
- ~/.config/fbterm/.fbtermrc
And it never picked it up. I'm not using X, I dont fancy much that XDG/freedesktop standard. Those xdg/utils/query/mime are a nightmare to understand and tame to do what you want.
In any case I dont mess or setup explicitly any of those XDG variables.
So the only way I had found to force fbterm to read that fbtermrc file was to put this on my shell script to start fbterm with a wallpaper and fbv:
export XDG_CONFIG_HOME=~/.config
and than have a ~/.config/fbtermrc
Although if I might suggest, the best would even be setting the default to:
~/.config/fbterm/fbtermrc
instead of :
~/.config/fbtermrc
This way, additional color files, fonts hacks, scripts, patches, instructions whatever, would all stay nicely in the same folder. Easy for dotfiles management also.
Anyway, nice to see other arch users actually using this. I've been testing fbterm and fbpad (another forgotten gem ) with and without tmux for the past months.
ivanp7 commented on 2021-09-25 01:38 (UTC)
@patlefort Fixed.
patlefort commented on 2021-09-22 13:12 (UTC)
From XDG specs:
$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
It should default to $HOME/.config if it's not set or empty.
ivanp7 commented on 2021-06-14 12:51 (UTC)
@m040601 You're welcome. I use framebuffer terminals myself so I made this package after yaft (yet another framebuffer terminal) died. It turned out fbterm is much more usable than yaft (does not have that annoying screen refreshing bug). People see the lack of updates to software and think it is abandoned and unmaintained, but it is just feature-complete and almost bug-free according to the maintainers. This is the case with fbterm. Its AUR package and wiki page got deleted, even though fbterm received a small patch v1.7_5 recently to fix compilation under gcc v6. Fbterm still does its job.
m040601 commented on 2021-06-03 18:22 (UTC) (edited on 2021-06-03 18:30 (UTC) by m040601)
@ivanp7
Just a big thank you, for providing and taking care of this PKGBUILD. Not the easiest job.
Really appreciate the additional tips and warnings you might provide here. How to work together with other apps, permissions etc.
Hope we can keep updating the Arch Wiki as well, https://wiki.archlinux.org/title/Fbterm
Big fan of this kind of framebuffer apps, but they just appear and disappear from AUR, or are left unmaintaned.
Due to niche or low community interest, lack of up to date additional guides, docs and man pages, they are always a hassle to configure and get started with.
ivanp7 commented on 2021-05-20 11:46 (UTC) (edited on 2021-05-20 13:13 (UTC) by ivanp7)
To set a wallpaper in fbterm, you'll need fbv
package (framebuffer image viewer). Execute the following instructions right before launching fbterm (works in POSIX-compliant shell like dash):
# hide cursor
echo -ne "\e[?25l"
# display fullscreen-stretched image and quit viewer without screen refreshing
fbv -ciuker "$WALLPAPER_FILE" << EOF
q
EOF
# use current screen state as a wallpaper
export FBTERM_BACKGROUND_IMAGE=1
ivanp7 commented on 2021-05-20 11:35 (UTC) (edited on 2021-09-25 01:37 (UTC) by ivanp7)
To enable 256 color mode properly, do export TERM=fbterm-256color
AFTER fbterm starts and then attach to a tmux session. If TERM
is not linux
upon fbterm launch, it will fail. Tmux is needed because fbterm provides escape codes that differ from broadly used codes, so tmux serves as an abstraction layer.
Unlike vanilla fbterm, in this version the configuration file is located at $XDG_CONFIG_HOME/fbtermrc
or $HOME/.config/fbtermrc
if XDG_CONFIG_HOME
is unset or empty (the original placement is $HOME/.fbtermrc
). Also, the configuration file is not forcibly recreated anymore. For default configuration, see /etc/fbterm/fbtermrc.example
.
Pinned Comments
ivanp7 commented on 2022-01-16 16:27 (UTC) (edited on 2022-01-16 18:24 (UTC) by ivanp7)
I have applied the proposed "configurable color palette" patch. Now the colors may be specified in the configuration file using numbered parameters
color-num=RRGGBB
.ivanp7 commented on 2021-11-27 21:50 (UTC)
I changed my mind.
$XDG_CONFIG_HOME/fbterm/fbtermrc
is now an allowed configuration location along with the old$XDG_CONFIG_HOME/fbtermrc
. Old location is used only when$XDG_CONFIG_HOME/fbterm/
does not exist.ivanp7 commented on 2021-05-20 11:46 (UTC) (edited on 2021-05-20 13:13 (UTC) by ivanp7)
To set a wallpaper in fbterm, you'll need
fbv
package (framebuffer image viewer). Execute the following instructions right before launching fbterm (works in POSIX-compliant shell like dash):ivanp7 commented on 2021-05-20 11:35 (UTC) (edited on 2021-09-25 01:37 (UTC) by ivanp7)
To enable 256 color mode properly, do
export TERM=fbterm-256color
AFTER fbterm starts and then attach to a tmux session. IfTERM
is notlinux
upon fbterm launch, it will fail. Tmux is needed because fbterm provides escape codes that differ from broadly used codes, so tmux serves as an abstraction layer.Unlike vanilla fbterm, in this version the configuration file is located at
$XDG_CONFIG_HOME/fbtermrc
or$HOME/.config/fbtermrc
ifXDG_CONFIG_HOME
is unset or empty (the original placement is$HOME/.fbtermrc
). Also, the configuration file is not forcibly recreated anymore. For default configuration, see/etc/fbterm/fbtermrc.example
.