python things
This commit is contained in:
parent
064e39883a
commit
467dfe5e34
4
Makefile
4
Makefile
|
@ -1,6 +1,6 @@
|
||||||
LOCATION="$(HOME)/.config"
|
LOCATION="$(HOME)/.config"
|
||||||
DATA="$(HOME)/.local/share"
|
DATA="$(HOME)/.local/share"
|
||||||
install_local: install_bspwm install_nvim install_sx install_sxhkd install_zathura install_simplestatus install_bash install_ssh install_git install_tridactyl install_htop
|
install_local: install_bspwm install_nvim install_sx install_sxhkd install_zathura install_simplestatus install_bash install_ssh install_git install_tridactyl install_htop install_python
|
||||||
install: .environment
|
install: .environment
|
||||||
install_bspwm:
|
install_bspwm:
|
||||||
ln -sf $(CURDIR)/bspwm $(LOCATION)/bspwm
|
ln -sf $(CURDIR)/bspwm $(LOCATION)/bspwm
|
||||||
|
@ -24,5 +24,7 @@ install_tridactyl:
|
||||||
ln -sf $(CURDIR)/tridactyl $(LOCATION)/tridactyl
|
ln -sf $(CURDIR)/tridactyl $(LOCATION)/tridactyl
|
||||||
install_htop:
|
install_htop:
|
||||||
ln -sf $(CURDIR)/htop $(LOCATION)/htop
|
ln -sf $(CURDIR)/htop $(LOCATION)/htop
|
||||||
|
install_python:
|
||||||
|
ln -sf $(CURDIR)/python $(LOCATION)/python
|
||||||
.environment:
|
.environment:
|
||||||
sh environ
|
sh environ
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
export HISTFILE="$HOME/.config/bash/hist"
|
export HISTFILE="$HOME/.config/bash/hist"
|
||||||
export HISTFILESIZE=3000
|
export HISTFILESIZE=3000
|
||||||
|
|
||||||
|
# python
|
||||||
|
export PYTHONSTARTUP="$HOME/.config/python/pythonrc.py"
|
||||||
|
|
||||||
# less
|
# less
|
||||||
export LESSHISTFILE="-"
|
export LESSHISTFILE="-"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
import os
|
||||||
|
import atexit
|
||||||
|
import readline
|
||||||
|
|
||||||
|
history = os.path.join(os.path.expanduser('~'), '.cache/python_history')
|
||||||
|
try:
|
||||||
|
readline.read_history_file(history)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def write_history():
|
||||||
|
try:
|
||||||
|
readline.write_history_file(history)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
print("laskdjflaskfjd")
|
||||||
|
|
||||||
|
atexit.register(write_history)
|
Loading…
Reference in New Issue