From 4cca6545834e17324828c3a912db88048ebbfb50 Mon Sep 17 00:00:00 2001 From: corazon <99136079+corazon008@users.noreply.github.com> Date: Thu, 4 Jun 2026 18:11:53 +0200 Subject: [PATCH 1/2] Append username to alow multiple users to run waybar --- dotfiles/.config/waybar/launch.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dotfiles/.config/waybar/launch.sh b/dotfiles/.config/waybar/launch.sh index e6ce99dc3..c29d64d84 100755 --- a/dotfiles/.config/waybar/launch.sh +++ b/dotfiles/.config/waybar/launch.sh @@ -11,7 +11,8 @@ # invocation proceeds; all others exit immediately. # ----------------------------------------------------- -exec 200>/tmp/waybar-launch.lock +lock_file="tmp/waybar-launch-$USER.lock" +exec 200>$lock_file flock -n 200 || exit 0 # ----------------------------------------------------- @@ -97,12 +98,12 @@ _toggle_module() { search_string=" \"$module_name\"" if ! grep -qF "$search_string" "$file"; then sed -i "s| //\"$module_name\"| \"$module_name\"|g" "$file" - fi + fi else search_string=" //\"$module_name\"" if ! grep -qF "$search_string" "$file"; then sed -i "s| \"$module_name\"| //\"$module_name\"|g" "$file" - fi + fi fi } @@ -139,4 +140,4 @@ fi # Explicitly release the lock (optional) -> flock releases on exit flock -u 200 -exec 200>&- \ No newline at end of file +exec 200>&- From f8f71110eb8acf7789ad5d97a470cb4653606064 Mon Sep 17 00:00:00 2001 From: corazon <99136079+corazon008@users.noreply.github.com> Date: Thu, 4 Jun 2026 18:17:41 +0200 Subject: [PATCH 2/2] Forget slash --- dotfiles/.config/waybar/launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/.config/waybar/launch.sh b/dotfiles/.config/waybar/launch.sh index c29d64d84..eab5bc1e8 100755 --- a/dotfiles/.config/waybar/launch.sh +++ b/dotfiles/.config/waybar/launch.sh @@ -11,7 +11,7 @@ # invocation proceeds; all others exit immediately. # ----------------------------------------------------- -lock_file="tmp/waybar-launch-$USER.lock" +lock_file="/tmp/waybar-launch-$USER.lock" exec 200>$lock_file flock -n 200 || exit 0