pynixconfig package
Submodules
pynixconfig.linuxconfig module
- pynixconfig.linuxconfig.add_ls_colors(curr_text, text_add)[source]
Add LS_COLORS configuration to .bashrc file.
- Parameters:
curr_text (str) – current content of .bashrc file
text_add (str) – config to add for LS_COLORS
- Returns:
output – final version of .bashrc file
- Return type:
str
- pynixconfig.linuxconfig.bash_shell(color_code)[source]
Replace current PS1 configuration in .bashrc file
- Parameters:
color_code (str) – code of color wanted for command line prompt
- Returns:
ps1 – PS1 configuration with color specified
- Return type:
str
- pynixconfig.linuxconfig.config(color_c, font_c)[source]
Gets the font code from font string.
- Parameters:
color_code (str) – color code
font_code (str) – font code
- Returns:
config – config string to be inputted in .bashrc
- Return type:
str
- pynixconfig.linuxconfig.get_color_code(color_string)[source]
Gets the color code from color string.
- Parameters:
color_string (str) – color name
- Returns:
color_code – color code
- Return type:
int
- pynixconfig.linuxconfig.get_font_code(font_string)[source]
Gets the font code from font string.
- Parameters:
font_string (str) – font name
- Returns:
font_code – font code
- Return type:
int
- pynixconfig.linuxconfig.get_full_path(curr_path)[source]
Gets the path of the current user
- Parameters:
curr_path (str) – directory path of current directory
- Returns:
user_path – user path
- Return type:
str
- pynixconfig.linuxconfig.main(color, font, prompt)[source]
Main function to modify content of .bashrc file
- Parameters:
color (str) – name of color wanted for files
font (str) – name of font wanted for files
prompt (str) – name of color wanted for command line prompt
- Returns:
config_string – configuration that was added to .bashrc file
- Return type:
str