Compare commits

...

12 Commits

Author SHA1 Message Date
0912a6f6d8 Install xpath 2024-05-27 19:24:55 +02:00
c000eaf6fa Remove restic 2024-05-27 19:24:55 +02:00
e40daae48a Use XDG_DOWNLOAD_DIR 2024-05-27 19:24:55 +02:00
7ab9ea0046 Move ~/.aws 2024-05-27 19:24:55 +02:00
fefb2d92d3 spotify: Move to workspace 9 2024-05-27 19:24:55 +02:00
1e803be540 neptune: Smaller font 2024-05-27 19:24:54 +02:00
e38885cbe6 Remove unneeded scripts 2024-05-27 19:24:34 +02:00
d7ce1be631 Make shellcheck happy 2024-05-27 19:24:34 +02:00
e0e5440d98 Fix interactivity in pacman script 2024-05-27 19:24:34 +02:00
b3a6c1dfe4 Remove fuck-lxc, no longer needed 2024-05-27 19:24:34 +02:00
0f58284817 Remove dunstctl, upstream includes it 2024-05-27 19:24:34 +02:00
13fe52c9dc Make printf line endings consistent 2024-05-27 19:24:34 +02:00
21 changed files with 26 additions and 117 deletions

View File

@@ -62,6 +62,5 @@ environment:
MACHINE_HAS_KEEPASSX: "false"
MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_STEAM: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_RESOLUTION_X: "2560"
MACHINE_RESOLUTION_Y: "1440"

View File

@@ -1,4 +1,4 @@
font_size: 12
font_size: 11
gpu: nvidia
cpu: intel
@@ -25,7 +25,6 @@ users:
gpg_agent_for_ssh: false
environment:
MACHINE_HAS_NEXTCLOUD: "false"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_KEEPASSX: "false"
repositories: []
@@ -53,7 +52,6 @@ users:
enable_passwordstore: true
environment:
MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_KEEPASSX: "false"
repositories:
- personal_projects

View File

@@ -23,7 +23,6 @@ Wants=nextcloud.service
Wants=nm-applet.service
Wants=pasystray.service
Wants=redshift.service
Wants=restic.timer
Wants=spotify.service
Wants=steam.service
Wants=touchpad.service

View File

@@ -1,8 +0,0 @@
[Unit]
ConditionPathExists=%t/features/restic_backup
[Service]
Type=oneshot
ExecStart=%h/restic/restic-backup
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -1,6 +0,0 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Timer]
OnCalendar=Mon..Fri 12:00:00

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env bash
set -o errexit
cd ~/code/personal/time-tracking/
source venv/bin/activate
source ~/.attendance_env
./call.py "${@}"

View File

@@ -1,25 +0,0 @@
#!/usr/bin/env bash
set -o nounset
_logfile="$XDG_RUNTIME_DIR/dunstctl.log"
log() {
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
}
case "$1 $2" in
"set-paused false")
log "Enabling dunst"
systemctl --user --no-block kill --signal SIGUSR2 dunst
;;
"set-paused true")
log "Disabling dunst"
systemctl --user --no-block kill --signal SIGUSR1 dunst
;;
*)
>&2 printf 'Unknown command\n'
exit 1
esac

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -x
vagrant destroy -f
killall vagrant
killall -9 vagrant
pgrep -fa lxc | grep -v fuck-lxc | awk '{print $1}' | xargs sudo kill -9
sudo lxc-ls -1 | xargs -l1 sudo lxc-stop --kill --name ; sudo lxc-ls -1 | xargs -l1 sudo lxc-destroy --name
pgrep -fa lxc | grep -v fuck-lxc | awk '{print $1}' | xargs sudo kill -9
rm -rf .vagrant
sudo systemctl restart nfs-kernel-server
sudo systemctl restart lxc\*
sudo apt-get install --reinstall lxc
sudo systemctl restart nfs-kernel-server
sudo systemctl restart lxc\*

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -o nounset
submodule_count=$(git diff --staged --submodule=log | grep -c '^Submodule')
if (( $submodule_count == 1 )) ; then
msg="Update submodule $(git diff --staged --submodule=log | grep '^Submodule' | cut -d ' ' -f 2)"
else
msg="Update submodules"
fi
git commit --edit --no-status \
--message="$msg" \
--message "$(git diff --staged --color=never --submodule=log | sed 's/^S/\nS/' | sed 's/^Submodule /* /' | sed 's/ >/ */')"

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -o nounset
rm -r "${1}"
cd ./.gitdir
git worktree remove "${1}"
git branch -D "${1}"

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env sh
pacman -Qtdq | xargs --no-run-if-empty sudo pacman -Rns
pacman -Qtdq | xargs --open-tty --no-run-if-empty sudo pacman -Rns

View File

@@ -1,24 +1,24 @@
#!/usr/bin/env bash
# Stolen from https://devops.stackexchange.com/a/8984 and adapted to my use case
if [[ -z "$@" ]]; then
if (( $# == 0 )) ; then
echo "Missing file input arguments"
exit 1
fi
for FILE in "$@"
do
RESOURCE=$(sed -n 's/^resource "\([^"]*\)" "\([^"]*\)".*/-target=\1.\2 /gp' $FILE)
MODULE=$(sed -n 's/^module "\([^"]*\)".*/-target=module.\1 /gp' $FILE)
RESOURCE=$(sed -n 's/^resource "\([^"]*\)" "\([^"]*\)".*/-target=\1.\2 /gp' "$FILE")
MODULE=$(sed -n 's/^module "\([^"]*\)".*/-target=module.\1 /gp' "$FILE")
if [[ -z "$RESOURCE" ]] && [[ -z "$MODULE" ]]; then
echo "Cannot detect terraform resource and module in $FILE"
exit 1
fi
if [[ ! -z "$RESOURCE" ]]; then
if [[ -n "$RESOURCE" ]]; then
echo -e $"$RESOURCE"
fi
if [[ ! -z "$MODULE" ]]; then
if [[ -n "$MODULE" ]]; then
echo -e $"$MODULE"
fi
done

View File

@@ -115,8 +115,8 @@ workspace $workspace10 output {{ machine.screen.0 }}
assign [class="^Keepassx$"] $workspace8
# See https://github.com/i3/i3/issues/2060
for_window [class="^Spotify$"] move to workspace $workspace10
assign [class="^Spotify$"] $workspace10
for_window [class="^Spotify$"] move to workspace $workspace9
assign [class="^Spotify$"] $workspace9
assign [class="^Google-chrome$"] $workspace7
assign [class="^Chromium$"] $workspace7

View File

@@ -12,7 +12,7 @@ DOTDIR="/var/lib/dotfiles"
os_release_file=/etc/os-release
if [[ ! -e "${os_release_file}" ]] ; then
2>&1 printf 'Could not find %, exiting' "${os_release_file}"
2>&1 printf 'Could not find %, exiting\n' "${os_release_file}"
exit 1
fi
@@ -38,7 +38,7 @@ install() {
fi
sudowrap pacman -S --needed --noconfirm "${package}"
else
2>&1 printf 'Unsupported distro %s, exiting' "$NAME"
2>&1 printf 'Unsupported distro %s, exiting\n' "$NAME"
exit 1
fi
}

View File

@@ -7,12 +7,12 @@ set -o errexit
DEVICE="/dev/sda"
if [[ ! -b "${DEVICE}" ]] ; then
printf '%s does not look like a device' "${DEVICE}"
printf '%s does not look like a device\n' "${DEVICE}"
exit 1
fi
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
printf 'efivars does not exist, looks like the system is not booted in EFI mode'
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
exit 1
fi

View File

@@ -7,12 +7,12 @@ set -o errexit
DEVICE="/dev/nvme0n1"
if [[ ! -b "${DEVICE}" ]] ; then
printf '%s does not look like a device' "${DEVICE}"
printf '%s does not look like a device\n' "${DEVICE}"
exit 1
fi
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
printf 'efivars does not exist, looks like the system is not booted in EFI mode'
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
exit 1
fi

View File

@@ -511,3 +511,6 @@ sqlx:
geeqie:
archlinux:
- geeqie
xpath:
archlinux:
- perl-xml-xpath

View File

@@ -389,7 +389,7 @@
done
if [[ ! "${arch}" ]] ; then
printf 'unsupported arch' >&2
printf 'unsupported arch\n' >&2
exit 1
fi

View File

@@ -13,7 +13,7 @@ set -o nounset
set -o xtrace
set -o errexit
downloaddir=~/download/gothic
downloaddir="${XDG_DOWNLOAD_DIR}"/gothic
mkdir -p "${downloaddir}"
cd "${downloaddir}"

View File

@@ -21,7 +21,7 @@ export WINEARCH=win64
export WINEVERSION=6.3
DOWNLOADDIR=~/download/gothic2
DOWNLOADDIR="${XDG_DOWNLOAD_DIR}"/gothic2
mkdir -p "${WINEPREFIX}"

View File

@@ -22,6 +22,8 @@ export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
XDG_DOWNLOAD_DIR="$HOME/download"
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
@@ -58,6 +60,9 @@ export GNUPGHOME="$XDG_STATE_HOME"/gnupg
export PYTHON_HISTORY=$XDG_STATE_HOME/python/history
export PYTHONPYCACHEPREFIX=$XDG_CACHE_HOME/python
export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials
export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config
export XINITRC="$XDG_CONFIG_HOME"/xinitrc
umask 0022
@@ -74,7 +79,6 @@ mkdir -p "${feature_dir}"
[[ $MACHINE_HAS_NEXTCLOUD == "true" ]] && touch "${feature_dir}"/nextcloud
[[ $MACHINE_HAS_KEEPASSX == "true" ]] && touch "${feature_dir}"/keepassx
[[ $MACHINE_HAS_STEAM == "true" ]] && touch "${feature_dir}"/steam
[[ $MACHINE_HAS_RESTIC_BACKUP == "true" ]] && touch "${feature_dir}"/restic_backup
[[ $MACHINE_TYPE == "laptop" ]] && touch "${feature_dir}"/machine_is_laptop