✨ feat(hypr): new script to launch apps and notify if they arent installed
This commit is contained in:
parent
5ac645ab37
commit
a6e55a8e38
2 changed files with 23 additions and 9 deletions
|
@ -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
|
||||
|
|
14
.config/hypr/scripts/launch_app
Executable file
14
.config/hypr/scripts/launch_app
Executable file
|
@ -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
|
Loading…
Add table
Reference in a new issue