diff --git a/.config/hypr/configs/binds.conf b/.config/hypr/configs/binds.conf index 0883b420..4f6ff9d6 100644 --- a/.config/hypr/configs/binds.conf +++ b/.config/hypr/configs/binds.conf @@ -19,16 +19,16 @@ bind = $mainMod, F, fullscreen, 0 bind = $mainMod, Z, exec, pypr zoom # Applications -bind = $mainMod, W, exec, $browser -bind = $mainMod, O, exec, $notetaking-app -bind = $mainMod SHIFT, O, exec, $office-suite -bind = $mainMod SHIFT, E,exec, $alter-file-manager -bind = $mainMod, RETURN, exec, $terminal +bind = $mainMod, W, exec, $scripts/launch_app $browser +bind = $mainMod, O, exec, $scripts/launch_app $notetaking-app +bind = $mainMod SHIFT, O, exec, $scripts/launch_app $office-suite +bind = $mainMod SHIFT, E,exec, $scripts/launch_app $alter-file-manager +bind = $mainMod, RETURN, exec, $scripts/launch_app $terminal bind = $mainMod SHIFT, RETURN, exec, $terminal --class=center-float-large -bind = $mainMod ALT, RETURN, exec, $terminal --class=center-float -bind = $mainMod CTRL, RETURN, exec, $terminal --class=center-float-mini -bind = $mainMod, BACKSPACE, exec, $editor -bind = $mainMod SHIFT, BACKSPACE, exec, $alter-editor +bind = $mainMod CTRL, RETURN, exec, $terminal --class=center-float +bind = $mainMod ALT, RETURN, exec, $terminal --class=center-float-mini +bind = $mainMod, BACKSPACE, exec, $scripts/launch_app $editor +bind = $mainMod SHIFT, BACKSPACE, exec, $scripts/launch_app $alter-editor # Pickers/Launchers bind = $mainMod, 23, exec, $launcher # Tab diff --git a/.config/hypr/scripts/launch_app b/.config/hypr/scripts/launch_app new file mode 100755 index 00000000..2166797d --- /dev/null +++ b/.config/hypr/scripts/launch_app @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -z "$1" ]; then + exit 1 +fi + +program="$1" + +if ! command -v "$program" >/dev/null 2>&1; then + notify-send "Program not found" "Make sure you have installed $program" + exit 1 +else + exec $program +fi