Browse Source

python xdg fixes

rework-profiles
parent
commit
85151435ee
4 changed files with 16 additions and 2 deletions
  1. +1
    -1
      README.md
  2. +1
    -0
      common/mail.nix
  3. +2
    -1
      common/xdg.nix
  4. +12
    -0
      dotfiles/xdg/python/startup.py

+ 1
- 1
README.md View File

@ -14,7 +14,7 @@ Features in need of development are:
* fix ibus daemon
* security hardening through sandboxing
* set up eirin to have regular and automated backups
* set up patchouli to have regular and automated backups
* make firefox sync to fujiwara and setup fujiwara
* add a burner device to tmpfs

+ 1
- 0
common/mail.nix View File

@ -6,6 +6,7 @@
];
# XDG_CONFIG_HOME does not get parsed correctly so we do it manually
# you need to create the caching folder otherwise this fails
home-manager.users.govanify = {
home.file.".config/msmtp/config".source = ./../dotfiles/mail/msmtp/config;
home.file.".config/mbsync/config".source = ./../dotfiles/mail/mbsync/config;


+ 2
- 1
common/xdg.nix View File

@ -2,7 +2,6 @@
# * mozilla (in progress upstream hopefully)
# * nix old folders, yuuuuup, i should make a PR
# * dbus: ~/.dbus in root
# python: ~/.python_history, apparmor?
# https://github.com/google/mozc/issues/474
# ^ mozc wise
@ -32,12 +31,14 @@
# java still store fonts in .java so i use a per-app wrapper
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java";
WGETRC = "~/.config/wgetrc";
PYTHONSTARTUP = "$HOME/.config/python/startup.py";
};
home-manager.users.govanify = {
home.file.".config/wgetrc".source = ./../dotfiles/xdg/wgetrc;
# not technically entirely xdg but it doesn't choose our pinentry otherwise
home.file.".config/gnupg/gpg-agent.conf".source = ./../dotfiles/xdg/gnupg/gpg-agent.conf;
home.file.".config/python/startup.py".source = ./../dotfiles/xdg/python/startup.py;
};


+ 12
- 0
dotfiles/xdg/python/startup.py View File

@ -0,0 +1,12 @@
import sys
def register_readline_completion():
# rlcompleter must be loaded for Python-specific completion
try: import readline, rlcompleter
except ImportError: return
# Enable tab-completion
readline_doc = getattr(readline, '__doc__', '')
if readline_doc is not None and 'libedit' in readline_doc:
readline.parse_and_bind('bind ^I rl_complete')
else:
readline.parse_and_bind('tab: complete')
sys.__interactivehook__ = register_readline_completion

Loading…
Cancel
Save