commit e101e422148c8fbc4d9de7d575aaaf7fcaddc9d3
parent 2916345cd0436d6953d82b9b4ac5e198e1e87d57
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Wed, 24 Mar 2021 11:50:04 +0100
Cleanup
Diffstat:
6 files changed, 18 insertions(+), 47 deletions(-)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
@@ -69,7 +69,6 @@ set relativenumber " show numbers relative to current line
set wrap " wrap lines
set linebreak " don't cut words when wrapping
set breakindent " keeps indentation on wrapped lines
-set showbreak=↪↪ " adds characters in front of wrapped line
" new splits position
set splitbelow
@@ -107,7 +106,7 @@ nnoremap Ñ ;
autocmd BufRead,BufNewFile *.zone set filetype=bindzone
" filetype specific
-autocmd FileType markdown,vimwiki,mail set formatoptions+=t " break lines when longer than textwidth
+autocmd FileType markdown,vimwiki,mail,tex set formatoptions+=t " break lines when longer than textwidth
autocmd FileType markdown,vimwiki set tabstop=2 " number of spaces when tab is pressed
autocmd FileType markdown,vimwiki set shiftwidth=2 " number of spaces for indentation
autocmd FileType mail set textwidth=72
diff --git a/.config/zsh/aliases b/.config/zsh/aliases
@@ -29,7 +29,7 @@ alias vw="cd $HOME/Documents/wiki && vim index.md"
alias bvw="firefox $HOME/Documents/wiki/build/html/index.html"
alias c="git --git-dir=$HOME/.local/share/dotfiles --work-tree=$HOME"
alias cv="GIT_DIR=$HOME/.local/share/dotfiles GIT_WORK_TREE=$HOME nvim -c Git -c only"
-alias up="sudo apt-get update && sudo apt-get -y upgrade"
+alias up="sudo apt-get update && sudo apt-get -y upgrade; pkill -RTMIN+4 dwmblocks"
# alias up="sudo pacman -Syyu --noconfirm"
# frequent files and directories
diff --git a/.local/bin/backup-vc-10-11 b/.local/bin/backup-vc-10-11
@@ -1,42 +0,0 @@
-#!/usr/bin/env sh
-
-KDBX="$HOME/Documents/Contrasenyes/Passwords.kdbx"
-
-stty -echo
-printf "KeePassXC database password: "
-read PW
-stty echo
-printf "\n"
-
-# get keepassxc executable location
-alias keepassxc="$(grep '^Exec' $HOME/.local/share/applications/keepassxc.desktop \
- | tail -1 | sed 's/^Exec=//;s/%.//;s/^"//g;s/" *$//g') "$@""
-
-printf "\nObtaining encryption passwords..."
-PW1="$(echo "$PW" | keepassxc cli show "$KDBX" \
- "Encriptat local/USB-copia-gris" -q -a "Password")" || exit
-PW2="$(echo "$PW" | keepassxc cli show "$KDBX" \
- "Encriptat local/USB-copia-gris-git" -q -a "Password")" || exit
-unset PW
-
-printf "\nMounting VeraCrypt volumes..."
-veracrypt --mount "/media/$USER/Oscar/Varis/copia-gris.hc" --slot 10 \
- --password "$PW1"
-unset PW1
-
-veracrypt --mount "/media/$USER/Oscar/Varis/copia-gris-git.hc" --slot 11 \
- --password "$PW2"
-unset PW2
-
-printf "\n\nSynchronizing files...\n"
-rsync -gloptruzvP --delete --exclude "/Git" --exclude "/.*" --exclude "/Documents/Backups" --exclude "/Git/backup" "$HOME/" "/media/veracrypt10/BACKUP_GRAY/"
-echo "\nBacking up git repositories"
-cd "/media/veracrypt11/BACKUP_GRAY" # !!! TODO fix this
-python3 "git-backup.py"
-cd "$HOME"
-
-printf "\nDismounting VeraCrypt volumes..."
-veracrypt --dismount "/media/$USER/Oscar/Varis/copia-gris.hc"
-veracrypt --dismount "/media/$USER/Oscar/Varis/copia-gris-git.hc"
-
-printf "\nDone!\n"
diff --git a/.local/bin/configure-monitors b/.local/bin/configure-monitors
@@ -9,6 +9,20 @@ if [ -n "$(xrandr --query | grep "DP2 connected")" ]; then
else
echo "! Xft.dpi: 192" >> "$xr"
fi
+elif [ -n "$(xrandr --query | grep "HDMI2 connected")" ]; then
+ xrandr --output eDP1 --off --output HDMI2 --auto
+ if grep --quiet "Xft.dpi: 192" "$xr"; then
+ sed -i "s/^Xft.dpi: 192/! Xft.dpi: 192/g" "$xr"
+ else
+ echo "! Xft.dpi: 192" >> "$xr"
+ fi
+elif [ -n "$(xrandr --query | grep "HDMI2 connected")" ]; then
+ xrandr --output eDP1 --off --output HDMI2 --mode 3840x2160
+ if grep --quiet "Xft.dpi: 192" "$xr"; then
+ sed -i "s/^! Xft.dpi: 192/Xft.dpi: 192/g" "$xr"
+ else
+ echo "Xft.dpi: 192" >> "$xr"
+ fi
else
xrandr --output eDP1 --auto --output DP2 --off
if grep --quiet "Xft.dpi: 192" "$xr"; then
diff --git a/.local/bin/dotfiles-check b/.local/bin/dotfiles-check
@@ -4,7 +4,7 @@ ndf=""
for f in $(ls -A "$HOME" | grep "^\."); do
case $f in
- .cache|.config|.gnupg|.local|.mozilla|.pki|.ssh|.profile) continue ;;
+ .cache|.config|.gnupg|.local|.mozilla|.pki|.ssh|.profile|.thunderbird) continue ;;
*) [ -z "$ndf" ] && ndf="$f" || ndf="$ndf, $f" ;;
esac
done
diff --git a/.profile b/.profile
@@ -1,4 +1,4 @@
-#!/bin/sh
+# vim: filetype=zsh
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/Xresources" &