Beepy is a product manufactured by SQFMI. This repository offers a custom tmux configuration tailored for Beepy.
This configuration allows tmux to start automatically upon system launch and displays the system status via neofetch before the prompt.
Ensure you've installed the necessary screen and keyboard drivers. Instructions can be found on the official documentation
-
Install Tmux and Neofetch
$ sudo apt install tmux neofetch
-
Clone Fbterm Repository
$ git clone https://github.com/onokatio/fbterm2.git
-
Install Essential Fonts
$ sudo apt install xfonts-wqy fonts-terminus-otb fonts-dotgothic16
Follow the steps to customize the neofetch output:
-
Download SQFMI duck ascii file to your directory
$ mkdir -p ~/.config/neofetch/ $ wget https://raw.githubusercontent.com/youngoris/beepy-tmux/main/neofetch/sqfmi-duck-w24.ascii -O ~/.config/neofetch/sqfmi-duck-w24.ascii
-
Edit
config.confunder the~/.config/neofetch/directory$ nano ~/.config/neofetch/config.conf -
Replace the function
print_info()with the following code:print_info() { prin "------------------- " prin "BEEPY made by SQFMI " info underline info "OS" distro info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages # info "Shell" shell info "Resolution" resolution info "DE" de info "WM" wm info "WM Theme" wm_theme info "Theme" theme info "Icons" icons info "Terminal" term info "Terminal Font" term_font info "CPU" cpu # info "GPU" gpu info "Memory" memory # info "GPU Driver" gpu_driver # Linux/macOS only # info "CPU Usage" cpu_usage info "Disk" disk # info "Battery" battery # info "Font" font # info "Song" song # [[ "$player" ]] && prin "Music Player" "$player" # info "Local IP" local_ip # info "Public IP" public_ip # info "Users" users # info "Locale" locale # This only works on glibc systems. info col }
*The uncomment
infoshould not exceed 12 lines, otherwise the beepy will not display a complete duck ascii image. -
Change
image_sourcevalue with our duck ASCII file's path, and replaceYOUR_NAMEwith your username.image_source="/home/YOUR_NAME/.config/neofetch/sqfmi-duck-w24.ascii" -
Give more screen space to system information text, toggle off color blocks, and change the
gapvalue to2or1.color_blocks="off" gap=2 -
Other useful changes
memory_percent="on" disk_percent="on" -
Finnaly, run neofetch you will see our duck appears on your screen.
$ neofetch
Follow these steps to configure tmux:
-
Edit the Configuration File
nano ~/.tmux.conf -
Add battery percent and CPU temperature information to the right of the Tmux status bar, and the session number to the left.
set -g status-left "[#S] " set-option -g status-right "#(cat /sys/firmware/beepy/battery_percent)% #(vcgencmd measure_temp | cut -c6-9|awk '{print int($1)}')C %H:%M %a %d/%b"
-
Set status bar refresh frequency to 30s
set -g status-interval 30 -
Set keybinds
bind-key b send-keys C-b bind-key C-b last-window bind-key \" choose-tree bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
-
If you already running tmux, press the blackberry button + r to reload the configuration. If not, run Tmux in the terminal, you'll see the battery and cpu info appear on the status bar.
$ tmux
-
Edit the Configuration File
$ cd fbterm2 $ nano ./src/fbdev.cppreplace
/dev/fb0with/dev/fb1. -
Execute the below to compile and install fbterm.
$ sudo apt-get install libfontconfig1-dev $ cd ~/fbterm2 $ ./configure && make && sudo make install
-
Make sure you execute the below so fbterm can be run by non-root user and can capture shortcut keys
$ sudo gpasswd -a YOUR_USERNAME video $ sudo setcap 'cap_sys_tty_config+ep' /usr/local/bin/fbterm -
Run fbterm once to create the default fbterm configuration file that we need to edit.
$ fbterm
stdin isn't a interactive tty!Ignore this output, it doesn't matter.change the following
font-names=Terminus,WenQuanYi Bitmap Song,DotGothic16 font-size=14 font-width=8 font-height=16 text-encodings=utf-8 term=xterm-mono
-
To autostart at system launch, add the following code to your shell configure file
$ nano ~/.bashrcif [ -z "$SSH_CONNECTION" ]; then # if in virtual terminal, start fbterm if [[ "$(tty)" =~ /dev/tty ]] && type fbterm > /dev/null 2>&1; then fbterm # otherwise, start/attach to tmux and start neofetch elif [ -z "$TMUX" ] && type tmux >/dev/null 2>&1; then tmux new -As "$(basename $(tty))" 'neofetch; bash' fi fi
-
Solving double prompts issue when quitting tmux with prefix key + d
$ nano ~/bashrcFind PS1 setting under the line
xterm*|rxvt*):PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"replace it with:
PS1="\[\e]0\a\]$PS1"
All done, now enjoy your beepy!
If you wish to use input methods, you can install and configure fcitx:
-
Install Fcitx
$ sudo apt install fcitx-frontend-fbterm -
Run
fcitx-config-gtk3under Xorg to enable IMEs or go to~/.config/fcitxand editprofile(example below enables google pinyin)EnabledIMList=fcitx-keyboard-us:True,googlepinyin:True,pinyin:False -
Uncomment and change the following in
~/.fbtermrc,input-method=fcitx-fbterm -
Make
fcitxstart at system launch.Create a script to check if
fcitxis running in each time we create a new terminal.$ nano ~/fcitx-start-check.shfill with the following
#!/bin/bash if ! pgrep -x "fcitx" > /dev/null; then echo "fcitx is not running. Starting fcitx..." nohup fcitx > /dev/null 2>&1 & sleep 1 # wait fcitx to start fi exit
make this file executable with the following code
sudo chmod +x ~/fcitx-start-check.shadd the below code to your
tmux.conf#Start fcitx new-session -d -s default "~/fcitx-start-check.sh" -
Reboot to your Tmux terminal, press ctrl(answer call) + space, you will activate the input method( For example: Google Pinyin).
If you have any issues with this repo please let me know, glad to help.
CJK support on Beepy @charlestsai1995
Beepy Package Repository @ardangelo
Getting Started @SQFMI