From 63788b493e6d4ee22ad66f60052c0025e2bba6bd Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Thu, 20 Nov 2025 08:35:32 -0800 Subject: emacs+fbterm --- bash_aliases | 7 ++--- emacs/init.el | 4 +-- emacs/site-lisp/fbterm.el | 13 +++++++++ emacs/site-lisp/single-header.el | 9 +----- fbterm/fbterm-emacs.sh | 4 +++ fbterm/fbtermrc | 60 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 15 deletions(-) create mode 100644 emacs/site-lisp/fbterm.el create mode 100755 fbterm/fbterm-emacs.sh create mode 100644 fbterm/fbtermrc diff --git a/bash_aliases b/bash_aliases index 82b103a..4908d57 100644 --- a/bash_aliases +++ b/bash_aliases @@ -1,13 +1,10 @@ #aliases for bash alias cb="xclip -selection clipboard" -alias br="xrandr --output eDP1 --brightness" -alias desert="blugon -o -S 2500" -alias recolor="blugon -o -S 6600" alias bctl="bluetoothctl" alias make="make -j4" alias less="less -i" alias e="emacs" -alias et="emacs -nw" +alias femacs="fbterm -- env TERM+fbterm emacs" alias demacs="emacs --daemon" alias ta="tmux attach" alias starte="startx -- -config egpu.conf"alias gs="git status" @@ -18,4 +15,4 @@ alias up="cd .." alias a="emacsclient -n" alias ll="ls -la" alias ls="ls --color=auto" -alias grep='grep --color=auto' \ No newline at end of file +alias grep='grep --color=auto' diff --git a/emacs/init.el b/emacs/init.el index 0c3cf01..76d431b 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -1042,14 +1042,14 @@ changes." (use-package time :demand t :config - (display-time-mode 1) + ;; (display-time-mode 1) :custom (display-time-day-and-date t) (display-time-24hr-format t)) (use-package battery :demand t :config - (display-battery-mode 1) + ;; (display-battery-mode 1) ) (use-package ednc :demand t diff --git a/emacs/site-lisp/fbterm.el b/emacs/site-lisp/fbterm.el new file mode 100644 index 0000000..b8b3ba4 --- /dev/null +++ b/emacs/site-lisp/fbterm.el @@ -0,0 +1,13 @@ +;; config specifically for running emacs as the base process of fbterm + + +(require 'ednc) +(require 'single-header) + +;;; Code: + +(unless ednc-mode (ednc-mode 1)) +(unless single-header-mode (single-header-mode 1)) + +(provide 'fbterm) +;;; fbterm.el ends here diff --git a/emacs/site-lisp/single-header.el b/emacs/site-lisp/single-header.el index 851d4d5..c5cab2b 100755 --- a/emacs/site-lisp/single-header.el +++ b/emacs/site-lisp/single-header.el @@ -1,6 +1,6 @@ ;; single-header --- Display a topline inside each frame with global info -*- lexical-binding: t; -*- -;; Author: Thomas Ulmer +;; Author: Thomas Ulmer ;; Package-Requires: ((ednc) (battery) (s) (dash)) ;; Package-Version 1.0 @@ -14,11 +14,6 @@ ;;; Code: -;; not toggled with the mode to prevent user from having to restart -;; applications producing notifs. -(when (equal window-system 'x) - (ednc-mode 1)) - ;; testing ;; (require 'notifications) ;; (notifications-notify :title "2st test" :body "hello, world" :app-name "EDNC" @@ -244,8 +239,6 @@ arg, dismiss all the notifications." (set-frame-parameter f 'single-header-win nil)) (frame-list))) - - (define-minor-mode single-header-mode "Global minor mode to enable a single info line at the top of each frame." :group 'single-header diff --git a/fbterm/fbterm-emacs.sh b/fbterm/fbterm-emacs.sh new file mode 100755 index 0000000..91616b3 --- /dev/null +++ b/fbterm/fbterm-emacs.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export TERM=fbterm +dbus-run-session -- emacs -l "~/.emacs.d/site-lisp/fbterm.el" diff --git a/fbterm/fbtermrc b/fbterm/fbtermrc new file mode 100644 index 0000000..777071f --- /dev/null +++ b/fbterm/fbtermrc @@ -0,0 +1,60 @@ +# Configuration for FbTerm + +# Lines starting with '#' are ignored. +# Note that end-of-line comments are NOT supported, comments must be on a line of their own. + +# font family names/pixelsize used by fbterm, multiple font family names must be seperated by ',' +# and using a fixed width font as the first is strongly recommended +font-names=Adwaita Mono,Terminus +font-size=14 + +# force font width (and/or height), usually for non-fixed width fonts +# legal value format: n (fw_new = n), +n (fw_new = fw_old + n), -n (fw_new = fw_old - n) +#font-width=8 +#font-height=18 + +# default color of foreground/background text +# available colors: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +color-foreground=7 +color-background=0 +color-0=000000 +color-1=AA0000 +color-2=00AA00 +color-3=AA5500 +color-4=0000AA +color-5=AA00AA +color-6=00AAAA +color-7=AAAAAA +color-8=555555 +color-9=FF5555 +color-10=55FF55 +color-11=FFFF55 +color-12=5555FF +color-13=FF55FF +color-14=55FFFF +color-15=FFFFFF + +# max scroll-back history lines of every window, value must be [0 - 65535], 0 means disable it +history-lines=1000 + +# up to 5 additional text encodings, multiple encodings must be seperated by ',' +# run 'iconv --list' to get available encodings. +text-encodings=UTF-8,LATIN1 + +# cursor shape: 0 = underline, 1 = block +# cursor flash interval in milliseconds, 0 means disable flashing +cursor-shape=1 +cursor-interval=500 + +# additional ascii chars considered as part of a word while auto-selecting text, except ' ', 0-9, a-z, A-Z +word-chars=._- + +# change the clockwise orientation angle of screen display +# available values: 0 = 0 degree, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees +screen-rotate=0 + +# specify the favorite input method program to run +input-method= + +# treat ambiguous width characters as wide +ambiguous-wide=no -- cgit v1.2.3