Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

mKaloer/powerline_mem_segment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Segment forPowerline showing the current memory usage in percent or absolute values.

Installation

pip install powerline-mem-segment

Usage

To apply the segment, add the following to the Powerline configuration file:

{    "function": "powerlinemem.mem_usage.mem_usage"}

For a percentage status, use themem_usage_percent callable:

{    "function": "powerlinemem.mem_usage.mem_usage_percent"}

The format can be configured using theformat argument:

{    "function": "powerlinemem.mem_usage.mem_usage_percent",    "priority": 50,"args": {    "format": "Mem: %d%%"}}

The type of memory to use can be configured by passing the desiredpsutil attribute name as themem_type argument (the default is "used"):

{    "function": "powerlinemem.mem_usage.mem_usage",    "priority": 50,"args": {    "mem_type": "active"}}

The short form of size units (i.e. "K", "M", "G"...) can be used by passing theshort argument (the default isFalse):

{    "function": "powerlinemem.mem_usage.mem_usage","args": {    "short": true}}

For swap memory usage, use themem_swap callable which accepts the same arguments asmem_usage:

{    "function": "powerlinemem.mem_usage.mem_swap"}

One or two highlight groups namedmem_usage andmem_usage_gradient have to be defined in the colorscheme json file. For example:

"mem_usage":                 { "fg": "gray8", "bg": "gray0", "attrs": [] },"mem_usage_gradient":        { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }

Dependencies

The only dependency ispsutil.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors7

Languages


[8]ページ先頭

©2009-2025 Movatter.jp