mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 23:05:32 +02:00
Add themes and segments for terminal and tmux
This commit is contained in:
parent
c5555d5637
commit
e5c864ec1b
0
powerline/ext/terminal/segments/__init__.py
Normal file
0
powerline/ext/terminal/segments/__init__.py
Normal file
11
powerline/ext/terminal/segments/core.py
Normal file
11
powerline/ext/terminal/segments/core.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def user_name():
|
||||||
|
user_name = os.environ.get('USER')
|
||||||
|
return {
|
||||||
|
'contents': user_name,
|
||||||
|
'highlight': 'user_name' if user_name != 'root' else ['user_name_root', 'user_name'],
|
||||||
|
}
|
0
powerline/ext/tmux/segments/__init__.py
Normal file
0
powerline/ext/tmux/segments/__init__.py
Normal file
11
powerline/ext/tmux/segments/core.py
Normal file
11
powerline/ext/tmux/segments/core.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def user_name():
|
||||||
|
user_name = os.environ.get('USER')
|
||||||
|
return {
|
||||||
|
'contents': user_name,
|
||||||
|
'highlight': 'user_name' if user_name != 'root' else ['user_name_root', 'user_name'],
|
||||||
|
}
|
10
powerline/themes/terminal/default.json
Normal file
10
powerline/themes/terminal/default.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"segments": {
|
||||||
|
"left": [
|
||||||
|
{
|
||||||
|
"name": "user_name"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
10
powerline/themes/tmux/default.json
Normal file
10
powerline/themes/tmux/default.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"segments": {
|
||||||
|
"left": [
|
||||||
|
{
|
||||||
|
"name": "user_name"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user