From 333ab636cc3aaa493357b9d63b61728c8606bd9e Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Thu, 5 Jun 2025 20:33:21 +0300 Subject: [PATCH] Avoid hard-coding the username --- .config/setup/02-setup-packages.sh | 2 +- .config/sway/config | 2 +- .local/bin/pull-emacs-tide | 2 +- .local/bin/run-sway | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/setup/02-setup-packages.sh b/.config/setup/02-setup-packages.sh index 3e49889..5414418 100755 --- a/.config/setup/02-setup-packages.sh +++ b/.config/setup/02-setup-packages.sh @@ -6,4 +6,4 @@ mkdir -p ~/Pictures/screenshots pre-commit install -sudo usermod --append --groups dialout ohad +sudo usermod --append --groups dialout "${USER}" diff --git a/.config/sway/config b/.config/sway/config index ace646f..4d4dcf0 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -301,4 +301,4 @@ include /etc/sway/config.d/* exec systemctl --user import-environment XDG_CURRENT_DESKTOP exec dbus-update-activation-environment --systemd XDG_CURRENT_DESKTOP=sway -output * bg /home/ohad/Documents/wallpapers/solar-system.jpg fill +output * bg ~/Documents/wallpapers/solar-system.jpg fill diff --git a/.local/bin/pull-emacs-tide b/.local/bin/pull-emacs-tide index 37582d3..2ceaac9 100755 --- a/.local/bin/pull-emacs-tide +++ b/.local/bin/pull-emacs-tide @@ -2,6 +2,6 @@ podman run \ --rm \ - --volume /home/ohad/Sync/docker:/shared \ + --volume "$(systemd-path user)"/Sync/docker:/shared \ emacs_compile:latest \ sh -c "cp /src/emacs-tide*_amd64.deb /shared" diff --git a/.local/bin/run-sway b/.local/bin/run-sway index 35a1c90..c7f043d 100755 --- a/.local/bin/run-sway +++ b/.local/bin/run-sway @@ -3,5 +3,5 @@ set -euo pipefail IFS=$'\n\t' -source /home/ohad/.profile +source "$(systemd-path user)"/.profile exec /usr/bin/sway