aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/WaybarScripts.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/WaybarScripts.sh')
-rwxr-xr-xconfig/hypr/scripts/WaybarScripts.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/hypr/scripts/WaybarScripts.sh b/config/hypr/scripts/WaybarScripts.sh
index d2205c42..54f7a4b4 100755
--- a/config/hypr/scripts/WaybarScripts.sh
+++ b/config/hypr/scripts/WaybarScripts.sh
@@ -24,6 +24,14 @@ if [[ -z "$term" ]]; then
fi
# Execute accordingly based on the passed argument
+launch_files() {
+ if [[ -z "$files" ]]; then
+ notify-send -u low -i "$HOME/.config/swaync/images/error.png" "Waybar: files" "Set \$files in 01-UserDefaults.conf or install a default file manager."
+ return 1
+ fi
+ eval "$files &"
+}
+
if [[ "$1" == "--btop" ]]; then
$term --title btop sh -c 'btop'
elif [[ "$1" == "--nvtop" ]]; then
@@ -33,7 +41,7 @@ elif [[ "$1" == "--nmtui" ]]; then
elif [[ "$1" == "--term" ]]; then
$term &
elif [[ "$1" == "--files" ]]; then
- $files &
+ launch_files
else
echo "Usage: $0 [--btop | --nvtop | --nmtui | --term]"
echo "--btop : Open btop in a new term"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage