diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index b1ca5589a..31194d693 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -198,19 +198,17 @@ bindl= ,XF86AudioPlay, exec, playerctl play-pause # [hidden] bindl= ,XF86AudioPause, exec, playerctl play-pause # [hidden] ##! Apps -bind = Super, T, exec, # [hidden] -bind = Super, Return, exec, kitty -1 # Kitty (terminal) -bind = Super, T, exec, kitty -1 # [hidden] Kitty (terminal) (alt) -bind = Ctrl+Alt, T, exec, kitty -1 # [hidden] Kitty (for Ubuntu people) -bind = Super, E, exec, dolphin --new-window # Dolphin (file manager) -bind = Ctrl+Super, W, exec, firefox # Firefox (browser) -bind = Super, C, exec, code # VSCode (code editor) -bind = Super, W, exec, zen-browser # [hidden] -bind = Super+Shift, W, exec, wps # WPS Office -bind = Super, X, exec, kate # Kate (text editor) -bind = Ctrl+Super, V, exec, pavucontrol-qt # Pavucontrol Qt (volume mixer) -bind = Super, I, exec, systemsettings # Plasma system settings -bind = Ctrl+Shift, Escape, exec, plasma-systemmonitor --page-name Processes # Plasma system monitor +bind = Super, Return, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # Terminal +bind = Super, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] Kitty (terminal) (alt) +bind = Ctrl+Alt, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] Kitty (for Ubuntu people) +bind = Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" # File manager +bind = Super, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "zen-browser" "firefox" "brave" "chromium" "google-chrome-stable" "microsoft-edge-stable" "opera" # Browser +bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "zed" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" # Code editor +bind = Super+Shift, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" # Launch office +bind = Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" # Text editor +bind = Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" # Volume mixer +bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "systemsettings" "gnome-control-center" "better-control" # Settings app +bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitzor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # System monitor # Cursed stuff ## Make window not amogus large diff --git a/.config/hypr/hyprland/scripts/launch_first_available.sh b/.config/hypr/hyprland/scripts/launch_first_available.sh new file mode 100755 index 000000000..499947a9d --- /dev/null +++ b/.config/hypr/hyprland/scripts/launch_first_available.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +for cmd in "$@"; do + eval "command -v ${cmd%% *}" >/dev/null 2>&1 || continue + eval "$cmd" & + exit +done +exit 1