mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
8 lines
218 B
Python
8 lines
218 B
Python
import os
|
|
|
|
def add_read_only_segment(powerline):
|
|
cwd = powerline.cwd or os.getenv('PWD')
|
|
|
|
if not os.access(cwd, os.W_OK):
|
|
powerline.append(' %s ' % powerline.lock, Color.READONLY_FG, Color.READONLY_BG)
|