Configuration of X11 i3wm tty

This commit is contained in:
2024-07-12 21:16:28 +02:00
parent 7e15fbad29
commit 616255d2c4
29 changed files with 907 additions and 7 deletions

3
tty/autologin.conf Normal file
View File

@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM

3
tty/bash.bashaliases Normal file
View File

@@ -0,0 +1,3 @@
ll=ls --color=auto -lha
grep=grep --color=auto
ip=ip -color=auto

15
tty/bash.bashexport Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
export BROWSER="/usr/bin/firefox"
export EDITOR="nvim"
export TERMINAL="rxvt-unicode"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
export WINEPREFIX="$XDG_DATA_HOME/wine"

64
tty/bash.bashrc Normal file
View File

@@ -0,0 +1,64 @@
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
Eterm*|alacritty*|aterm*|foot*|gnome*|konsole*|kterm*|putty*|rxvt*|tmux*|xterm*)
PROMPT_COMMAND+=('printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"')
;;
screen*)
PROMPT_COMMAND+=('printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"')
;;
esac
if [[ -r /usr/share/bash-completion/bash_completion ]]; then
. /usr/share/bash-completion/bash_completion
fi
#if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
# exec Hyprland --i-am-really-stupid
#fi
. /usr/share/git/git-prompt.sh
# afficher le status de la branche locale (<, >, =)
export GIT_PS1_SHOWUPSTREAM=1
# affiche (*) en cas de modifications en zone de travail ou de cache
export GIT_PS1_SHOWDIRTYSTATE=1
# affiche (%) en cas de nouveaux fichiers
export GIT_PS1_SHOWUNTRACKEDFILES=1
# affiche ($) lorsquau moins une zone de stash existe
export GIT_PS1_SHOWSTASHSTATE=1
export PS1="\[\e[1;34m\]\u\[\e[0;33m\]@\[\e[0;36m\]\h\[\e[0;33m\] \[\e[0;35m\]\w\[\e[0;00m\]\$(__git_ps1)"
if [ "$(id -u)" != 0 ]; then
PS1=$PS1" \$ "
else
PS1=$PS1" # "
fi
# You may comment the following lines if you won't `ls' to be colorized:
eval "$(dircolors)"
umask=002
while read -r line
do
alias "$line"
done < /etc/bash.bashaliases
source "/etc/bash.bashexport"
PATH=/games:/usr/local/sbin:/usr/local/bin:/usr/bin
# History config
HISTSIZE=1000
HISTTIMEFORMAT="%F %T "
neofetch

18
tty/deploy.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
HOSTNAME="ArchTest"
#Switch to the script directory
_BASENAME=$(basename "$0")
cd "$(dirname "$0")" || _exit 1
cp issue /etc/issue
cp inputrc /etc/inputrc
cp bash.bashrc /etc/bash.bashrc
cp bash.bashaliases /etc/bash.bashaliases
cp bash.bashexport /etc/bash.bashexport
mkdir -p /etc/systemd/system/getty@tty1.service.d/
cp autologin.conf /etc/systemd/system/getty@tty1.service.d/override.conf
printf "%s\n" "$HOSTNAME" > /etc/hostname
sed -i "s|^PRETTY_NAME.*|PRETTY_NAME=\"$HOSTNAME\"|" /etc/os-release

26
tty/inputrc Normal file
View File

@@ -0,0 +1,26 @@
set bell-style none
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
set colored-stats on
set completion-ignore-case on
set editing-mode emacs
"\e[A":history-search-backward
"\e[B":history-search-forward
$if term=linux
"\e[1~": beginning-of-line
"\e[4~": end-of-line
$endif
$if term=xterm
"\e[1~": beginning-of-line
"\e[4~": end-of-line
$endif
$if term=rxvt-unicode
"\e[7~": beginning-of-line
"\e[8~": end-of-line
$endif

2
tty/issue Normal file
View File

@@ -0,0 +1,2 @@
Arch Linux \r (\l)
\e{blue}IP address:\e{reset} \4