Comments (6)
Hey @zeitchef, check out the readme and while you do that, let me take a look at your onestatus.json
and $MYVIMRC
.
from onestatus.
// onestatus.json
{
"status-right": [
{ "fg": "#34353e", "bg": "default", "labelFunc": "s:getCWD" }
],
"status-left": [
{ "fg": "#34353e", "bg": "#5af78e", "labelFunc": "s:getHead" },
{ "fg": "default", "bg": "default", "labelFunc": "s:getFileName" }
],
"status-style": "s:getDefaultColor",
"status-justify": "center", <-- this seems to be a problem
"window-status-style": [
{ "fg": "#6c757d", "bg": "default", "isStyleOnly": true }
],
"window-status-current-style": [
{ "fg": "#34353e", "bg": "#57c7ff", "isStyleOnly": true }
]
}
And the relevant vim configs:
au BufEnter * :OneStatus
au ExitPre * :!tmux source ~/.tmux.conf
set noshowmode noruler
set laststatus=0
from onestatus.
It's still WIP. To get desired changes you can change the line in plugin/onestatus.vim
like this
if g:onestatus_default_layout == 1
call onestatus#build([
\{'command' : 'set-option status-justify centre'},
\{'command': 'set-option status-right-length ' . g:onestatus_right_length},
\{'command': 'set-option status-left-length ' . g:onestatus_left_length},
\])
endif
And as for your question
For example, I assume setting "status-justify": "center" maps directly to set-option -g status-justify center that I have in my .tmux.conf... is this a correct assumption? It's not super clear in the README.
No, it doesn't. Internally, that json object is taken and fg
, bg
, lableFunc
are looked for and then the values are mapped in a structured way, which makes configuration like status-justify : 'center'
not work as expected.
Changes will come. Stay tuned.
from onestatus.
And for
Also, I don't seem to be able to access tmux "variables". For example, how would I implement the following, accessing the current tmux session name:
set-option -g status-left "#[fg=#e2e4e5,bg=#43454f] #S "
This should work like
"status-left": [
{ "fg": "#34353e", "bg": "#5af78e", "label": "#S" },
],
For setting a textual 'thing' you can use label.
It will work same as you expected.
from onestatus.
Thanks. I overlooked the differences between label
and labelFunc
. This definitely pushed me further. Looking forward to future iterations!
from onestatus.
Hello, thanks for the feedbacks.
You indeed have to use the label
attribute for plain strings or tmux variables like #S
.
As for "status-justify": "center"
, I suggest putting everything that won't change in your tmux.conf file.
Let onestatus handle the dynamic updates (git branches, current directory etc).
That being said, since status-justify
is directly linked to your status even though it should not change, I might add it in the future.
from onestatus.
Related Issues (7)
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 onestatus.