From 384e96c6cbb9d006cf055f45f6460f0eb2050f8a Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 17 Oct 2022 11:44:00 -0400 Subject: [PATCH] Detect toolbox TODO: Update other scripts to skip actions (eg. launching sway) if in toolbox --- bash/bash_aliases | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash/bash_aliases b/bash/bash_aliases index 90c6cb147..a2ca4f547 100644 --- a/bash/bash_aliases +++ b/bash/bash_aliases @@ -44,3 +44,6 @@ alias blc="${HOME}/scripts/thinkpad/blc.pl --notify" # Flatpaks alias mpv="flatpak run io.mpv.Mpv" + +# Detect if I'm in a toolbox +alias istoolbox='[ -f "/run/.toolboxenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv'