lamp
is a very simple daemon-less terminal focus manager. The main goal of this script is to reinvent the focus of your terminals. Few modes are available, each with it's own feature, which can be combined to offer a very unique look. I made this script because I was tired of borders, which don't honestly offer a lot of possibilities and compositors, which are either heavy or rough but especially because I wanted something that made ricing fun again. For now, lamp
is only functionnal with art
installed and configured. I'll probably support other theme managers in the future. Oh and if you have some ideas for a new mode, open an issue and let me know !
NOTE: The top image is using 3 modes at the same time !
art
: used to process everything including colorspin
: used to display errorsxdotool
: used to get the name of the focused window
Add this lines to your .bashrc
(or any other shell run commands file):
# Set title of the window (used in lamp)
PROMPT_COMMAND='echo -en "\033]0;$(tty)\007"'
DISABLE_AUTO_TITLE=true
Write in your terminal:
git clone "https://gitlab.com/gawlk/lamp.git"
cd lamp
bash install.sh
Now the hardest part, lamp
is deamon-less, which means it has to be ran each time a new window is being focused.
Some may disagree but it was a clear choice from the start, feel free to make a deamon if want to !
So the idea is to change the configuration file of your WM and make it run lamp
everytime you:
- kill a window
- focus a window
- change the workspace
- open a terminal
Basically, you just need to do something like that: ACTION && lamp
.
NOTE: it's very likely that lamp
doesn't launch properly after opening a terminal but don't worry there is a fix for that. Just instead of TERMINAL && lamp
, change it to lamp -t TERMINAL
.
One advantage is that you don't need to configure the colors of your terminal after that, they will automatically update themselves.
Here are examples, which illustrates how it can be done for:
Unfortunately, if your WM supports mouse events and you can't or don't want to disable them, you might have undesired results like not having lamp
launched when a window is being focused.
I had a situation like that with 2bwm
, which focuses every window that happens to be under the mouse pointer. Since this option can't be disable without changing the source code, I decided to change it and make instead 2bwm launch lamp
everytime the focus is set.
I understand that this may not be practical for everybody but there is no other way without a deamon.
If you are a tmux
user, you need to add those lines to your tmux.conf
:
set -g set-titles off
set -g allow-rename off
NOTE: This fix does not work when tmux
is launched directly in your .bashrc
. I'm still looking for a solution.
lamp - A daemon-less terminal focus manager
Example: lamp -m "4+2+1"
Arguments:
(none) Launch lamp
-f | -force Force the refresh of the cache
-h | -help Display this menu and exit
-m | -modes "number" Set a different mode or modes to load
-t | -terminal "name" Fix for terminal launch
- Add more modes
- Find a better way to determined which terminal is being focused