A few improvements from a new laptop
parent
c2a131e9ec
commit
645b1d973a
4
.aliases
4
.aliases
|
@ -6,6 +6,6 @@ alias rm='rmtrash'
|
|||
alias rrm='/usr/bin/rm'
|
||||
# cp is rsync
|
||||
alias cp='cpv'
|
||||
# ls sorted by modification time
|
||||
alias lt='ls -lath'
|
||||
alias vim='nvim'
|
||||
alias ls='eza'
|
||||
alias cat='bat'
|
||||
|
|
|
@ -3,11 +3,14 @@ ansible
|
|||
ansible-lint
|
||||
arc-gtk-theme
|
||||
arc-icon-theme
|
||||
bat
|
||||
bat-extras
|
||||
bluez
|
||||
bluetooth-autoconnect
|
||||
bind
|
||||
catppuccin-cursors-macchiato
|
||||
catppuccin-gtk-theme-macchiato
|
||||
chafa
|
||||
chromium
|
||||
cups
|
||||
docker
|
||||
|
@ -21,6 +24,8 @@ ffmpegthumbnailer
|
|||
firefox
|
||||
flameshot
|
||||
fzf
|
||||
gcr
|
||||
git-delta
|
||||
gthumb
|
||||
hplip
|
||||
htop
|
||||
|
@ -29,6 +34,7 @@ i3lock-color
|
|||
imagemagick
|
||||
jq
|
||||
kwayland5
|
||||
lesspipe
|
||||
libreoffice-fresh
|
||||
libusb-compat
|
||||
less
|
||||
|
@ -64,6 +70,7 @@ python-pyperclip
|
|||
python-requests
|
||||
qbittorrent
|
||||
restic
|
||||
ripgrep
|
||||
rmtrash
|
||||
rofi
|
||||
rofimoji
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
|
||||
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }
|
||||
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
icons=( )
|
||||
parts=(/ /home)
|
||||
icons=()
|
||||
parts=(/)
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[Unit]
|
||||
Description=Back up chosto's documents
|
||||
OnFailure=notify-backup-failure.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c 'RESTIC_PASSWORD=$(cat /root/restic) restic -r /backup/restic --verbose backup --exclude "/home/.*" /home'
|
|
@ -1,9 +0,0 @@
|
|||
[Unit]
|
||||
Description=Run backup daily
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -11,5 +11,5 @@ XDG_TEMPLATES_DIR="$HOME/"
|
|||
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||
XDG_MUSIC_DIR="$HOME/"
|
||||
XDG_PICTURES_DIR="$HOME/"
|
||||
XDG_PICTURES_DIR="$HOME/images"
|
||||
XDG_VIDEOS_DIR="$HOME/videos"
|
||||
|
|
1
.env
1
.env
|
@ -8,3 +8,4 @@ export PATH="$PATH:/home/go/bin:/usr/local/.local/bin:~/node_modules/.bin"
|
|||
export ELECTRON_TRASH="trash-cli"
|
||||
export ZSH_COLORIZE_TOOL="pygmentize"
|
||||
export ZSH_COLORIZE_STYLE="catppuccin-macchiato"
|
||||
export LESSOPEN="|lesspipe.sh %s"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
[core]
|
||||
pager = delta
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
navigate = true # use n and N to move between diff sections
|
||||
|
||||
# delta detects terminal colors automatically; set one of these to disable auto-detection
|
||||
# dark = true
|
||||
# light = true
|
||||
|
||||
[merge]
|
||||
conflictstyle = diff3
|
||||
|
||||
[diff]
|
||||
colorMoved = default
|
||||
[user]
|
||||
email = quentinduchemin@tuta.io
|
||||
name = Quentin Duchemin
|
||||
[push]
|
||||
autoSetupRemote = true
|
|
@ -82,24 +82,11 @@ function usage() {
|
|||
exit 0
|
||||
}
|
||||
|
||||
# Use XDG_CONFIG_HOME if defined, default otherwise
|
||||
CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
|
||||
ENV=${1}
|
||||
|
||||
for m in ${MERGE_DIRS}; do
|
||||
if [ -f "${CONFIG}/${m}/${MERGE_CONFIG_FOLDER}/above" ]; then
|
||||
merge_config $m ${ENV} true
|
||||
else
|
||||
merge_config $m ${ENV}
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -z "$INIT" ]; then
|
||||
function init_system() {
|
||||
echo -e "* Installing base Arch packages..."
|
||||
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
|
||||
echo -e "* Changing shell to ZSH..."
|
||||
sudo chsh -s $(which zsh)
|
||||
chsh -s $(which zsh)
|
||||
if [ "$ENV" = "desk" ]; then
|
||||
echo -e "* Add user to realtime group..."
|
||||
sudo usermod -aG realtime $(whoami)
|
||||
|
@ -113,13 +100,14 @@ if [ ! -z "$INIT" ]; then
|
|||
sudo systemctl enable --now cups
|
||||
sudo systemctl enable --now bluetooth
|
||||
sudo systemctl enable --now bluetooth-autoconnect
|
||||
sudo systemctl enable --now updatedb.timer
|
||||
# iwd will be used as a backend for NetworkManager
|
||||
sudo systemctl disable wpa_supplicant
|
||||
echo -e "* Ensure hardware clock is up to date..."
|
||||
sudo hwclock --systohc
|
||||
# So that "Open in Terminal" works inc Nemo
|
||||
echo -e "* Make 'Open Terminal' work in Nemo..."
|
||||
gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
|
||||
sudo gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
|
||||
# For screenshots
|
||||
echo -e "* Install pychee for uploading screenshots on Lychee..."
|
||||
pip install --break-system-packages pychee
|
||||
|
@ -163,22 +151,20 @@ if [ ! -z "$INIT" ]; then
|
|||
# See https://github.com/EliverLara/terminator-themes
|
||||
mkdir -p $HOME/.config/terminator/plugins
|
||||
wget https://git.io/v5Zww -O $HOME"/.config/terminator/plugins/terminator-themes.py"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ ! -z ${ENV} ]; then
|
||||
echo -e "\n=== Create symlink to *.${ENV} regular files ==="
|
||||
# Take all specific files and create a symlink pointing to it without the extension
|
||||
# This file will be used by applications
|
||||
for f in `find ${CONFIG} -type f -name "*.${ENV}"`; do
|
||||
echo "${f%.*} → ${f}"
|
||||
ln -sf ${f} ${f%.*}
|
||||
done
|
||||
# Take care of config files at home level, outside ${CONFIG} (e.g. Xresources)
|
||||
for f in `find ${HOME} -maxdepth 1 -mindepth 1 -type f -name "*.${ENV}"`; do
|
||||
echo "${f%.*} → ${f}"
|
||||
ln -sf ${f} ${f%.*}
|
||||
done
|
||||
# Use XDG_CONFIG_HOME if defined, default otherwise
|
||||
CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
|
||||
ENV=${1}
|
||||
|
||||
for m in ${MERGE_DIRS}; do
|
||||
if [ -f "${CONFIG}/${m}/${MERGE_CONFIG_FOLDER}/above" ]; then
|
||||
merge_config $m ${ENV} true
|
||||
else
|
||||
merge_config $m ${ENV}
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "\n=== Copy changed configuration which resides in outer directory ==="
|
||||
# Destination files are regular files
|
||||
|
@ -198,12 +184,32 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
|
|||
filename=${config_file##*/}
|
||||
# Now copy to destination
|
||||
real_dest=${DEST}/${subfolder}
|
||||
echo $real_dest
|
||||
sudo mkdir -p ${real_dest}
|
||||
absolute_source=`realpath "${DIR}/${config_file}"`
|
||||
check_copy "${absolute_source}" "sudo cp ${absolute_source} ${real_dest}" "sudo rm ${real_dest}/${filename}"
|
||||
done
|
||||
done
|
||||
|
||||
if [ ! -z "$INIT" ]; then
|
||||
init_system
|
||||
fi
|
||||
|
||||
if [ ! -z ${ENV} ]; then
|
||||
echo -e "\n=== Create symlink to *.${ENV} regular files ==="
|
||||
# Take all specific files and create a symlink pointing to it without the extension
|
||||
# This file will be used by applications
|
||||
for f in `find ${CONFIG} -type f -name "*.${ENV}"`; do
|
||||
echo "${f%.*} → ${f}"
|
||||
ln -sf ${f} ${f%.*}
|
||||
done
|
||||
# Take care of config files at home level, outside ${CONFIG} (e.g. Xresources)
|
||||
for f in `find ${HOME} -maxdepth 1 -mindepth 1 -type f -name "*.${ENV}"`; do
|
||||
echo "${f%.*} → ${f}"
|
||||
ln -sf ${f} ${f%.*}
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -z "${WM_RESTART}" ]; then
|
||||
echo -e "\n=== Restart graphical environment ==="
|
||||
# Reload i3 configuration
|
||||
|
|
Loading…
Reference in New Issue