pythonrc and other dotfiles
This commit is contained in:
parent
b30073b7b8
commit
66b4ce43d2
17
dotfiles/pythonrc
Normal file
17
dotfiles/pythonrc
Normal file
@ -0,0 +1,17 @@
|
||||
import os
|
||||
import atexit
|
||||
import readline
|
||||
|
||||
history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history')
|
||||
try:
|
||||
readline.read_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def write_history():
|
||||
try:
|
||||
readline.write_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
atexit.register(write_history)
|
||||
@ -827,6 +827,7 @@ xdg = {
|
||||
"npm/npmrc".source = ../dotfiles/npm/npmrc;
|
||||
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
|
||||
"htop/htoprc".source = ../dotfiles/htop/htoprc;
|
||||
"python/pythonrc".source = ../dotfiles/pythonrc;
|
||||
};
|
||||
};
|
||||
#+end_src
|
||||
@ -944,6 +945,8 @@ environment = {
|
||||
PSQL_HISTORY="${XDG_DATA_HOME}/psql_history";
|
||||
REDISCLI_HISTFILE="${XDG_DATA_HOME}/redis/rediscli_history";
|
||||
WINEPREFIX="${XDG_DATA_HOME}/wine";
|
||||
PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc";
|
||||
STACK_ROOT="${XDG_DATA_HOME}/stack";
|
||||
|
||||
# OPTIONS
|
||||
HISTFILE = "${XDG_STATE_HOME}/bash/history";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user