~mehdix/dotfiles

dbb661005d7e6ccc0e33316323d02d60062be9a0 — Mehdi Sadeghi a day ago 86c3a22 master
Change prompt to two lines and add nix.
3 files changed, 15 insertions(+), 9 deletions(-)

M .inputrc
M .local/bin/prompt
M .profile
M .inputrc => .inputrc +8 -4
@@ 1,5 1,9 @@
$include /etc/inputrc
# Key bindings, up/down arrow searches through history
"\e[A": history-substring-search-backward
"\e[B": history-substring-search-forward
"\C-p": history-substring-search-backward
"\C-n": history-substring-search-forward
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOA": history-search-backward
"\eOB": history-search-forward
Control-k: kill-whole-line
Control-p: history-search-backward
Control-n: history-search-forward

M .local/bin/prompt => .local/bin/prompt +2 -2
@@ 3,6 3,6 @@ BRANCH=$(git branch --show-current 2>/dev/null)
BRANCH=$(test -n "$BRANCH" && echo "($BRANCH)")
PROMPT="$USER@$(cat /proc/sys/kernel/hostname):$( test "$PWD" = $HOME && echo '~' || echo "$PWD")$BRANCH"
case $(id -u) in
0) echo "$PROMPT# " ;;
*) echo "$PROMPT$ " ;;
0) echo -e "$PROMPT\\n# " ;;
*) echo -e "$PROMPT\\n$ " ;;
esac

M .profile => .profile +5 -3
@@ 2,9 2,9 @@ echo .profile begin
# .profile
export ENV=~/.env
export LANG=en_US.UTF-8
export LC_TIME=de_DE.UTF-8
export LANGUAGE=en_US:de_DE
export LC_ALL=en_US.UTF-8
export EDITOR=vim
#export TERM=foot-extra
export HISTSIZE=65535

export MAKEFLAGS=-j`lscpu | grep '^CPU(s):' | awk -F' ' '{ print $2 }'`


@@ 12,10 12,12 @@ export CFLAGS="-O2 -pipe -march=native"
export CXXFLAGS="${CFLAGS}"
# Sway compatiblity https://github.com/swaywm/sway/issues/595
export _JAVA_AWT_WM_NONREPARENTING=1
export GDK_BACKEND=wayland
#export GDK_BACKEND=wayland

HOSTNAME=$(cat /proc/sys/kernel/hostname)
[ -e .config/$HOSTNAME.profile ] && . .config/$HOSTNAME.profile
[ $0 != sh ] && [ -n "$BASH_VERSION" ] && shopt login_shell 2>&1 > /dev/null && [ -f ~/.bashrc ] && . ~/.bashrc

echo .profile end

if [ -e /home/mx/.nix-profile/etc/profile.d/nix.sh ]; then . /home/mx/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer