Remove seconds in uptime of powerline tmux

In ~/.config/powerline/themes/tmux, create default.json with the following content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"segments": {
"right": [
{
"function": "powerline.segments.common.sys.uptime",
"priority": 50,
"args": {
"shorten_len": 2
}
},
{
"function": "powerline.segments.common.sys.system_load",
"priority": 50
},
{
"function": "powerline.segments.common.time.date"
},
{
"function": "powerline.segments.common.time.date",
"name": "time",
"args": {
"format": "%H:%M",
"istime": true
}
},
{
"function": "powerline.segments.common.net.hostname"
}
]
}
}

The "shorten_len": 2 did the job.

References

1. https://powerline.readthedocs.io/en/master/configuration/segments/common.html#powerline.segments.common.sys.uptime