Comments (10)
I don’t see how it could be useful.
Can you give me some usage?
from mtm.
The latest code in master has a status line. Please test it out and close this issue if it works for you. Thanks!
from mtm.
Will the status line be customizable?
from mtm.
Will the status line be customizable?
It is now. Check out the latest code. You can give mtm a filename and it will read the contents of that file periodically and put them in the status line (in front of any window titles). You're free to put whatever you want in the file.
Please close this issue if you think this solves it. Thanks!
from mtm.
For example, I have this in my .Xsession:
while true ; do
DATE=$(date)
BATTERY=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage)
echo "${DATE} ${BATTERY}" > ~/.status
sleep 60
done
Then I invoke mtm like this:
mtm -s ~/.status
Now I have the current date, time, and laptop battery percentage in the status bar updated every minute, along with whatever window title is set by the focused virtual terminal.
from mtm.
I would like to add Git status line, using working directory of active pane.
from mtm.
You could modify your shell's prompt command to run git-status and put the output in the title bar using the title-setting escape sequence. How you'd do that would depend on what shell you're using.
from mtm.
I don’t want Git information in my shell prompt, but rather delegate to the WM or TM status bar I’m using.
In i3 I do something like that.
That enables some ubiquity and DRY, because you always have the information accurate to what you focus, no matter if you are in your shell, editor or what ever application.
For instance in Kakoune, I just have some hooks on focus changes to update the adapters.
from mtm.
Assuming you use bash (I know you can do it with other shells too), doing something like this:
PROMPT_COMMAND='echo -ne "\033]0;`pwd`\007"'
will put your current working directory in mtm's title bar, not your prompt. You could replace "pwd" with whatever command you want (an arbitrarily complex shell script), and thus put whatever you wanted in the title.
mtm is smart enough to display the title for the currently focused window, so different windows can have different titles.
from mtm.
Would be nice if we could just put bash-like escape colors like \x1b[1;33;41m ^-^ \x1b[0m
on the status bar. Or a custom escape sequence, easier to implement, like a escape character 0x1b
followed by a single byte where each nibble is one of the 16 possible colours for fg and bg, like 0x1b 0xab
. And if mtm could get the current terminal width with system("tput cols")
, we could have a right aligned status line instead of the actual left-aligned.
from mtm.
Related Issues (20)
- Compiling in Alpine and Arch linux HOT 4
- Add `make uninstall` HOT 2
- Arrow Keys not working under Termion HOT 2
- /usr/lib/libncursesw.so.6: no version information available
- no cursor in emacs HOT 3
- Homebrew formula HOT 1
- Doesn't transmite mouse event
- Any plans for resizing screens? HOT 3
- Cursor flickers between virtual terminals while typing
- Strange behavior with Vim over SSH when using mtm in TTY
- Add LICENSE file
- Doesn't work on st and urxvt HOT 2
- xterm -e does not work correctly
- UTF-8 characters in PS1 issue in st HOT 2
- Use .POSIX as first line in makefile HOT 1
- Question on 24bit color support
- Arcane bug when using with a session manager (ie. abduco/tmux) HOT 2
- Allow us to add a wiki here for patches HOT 1
- invalid character input after ctrl+g input HOT 1
- Garbled colors in Kakoune HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtm.