mirror of
https://github.com/Cametendo/MyI3Config-fork.git
synced 2026-03-18 03:40:20 +01:00
add vscode shortcut
This commit is contained in:
@@ -13,6 +13,7 @@ bindsym $mod+b exec ~/.config/MyI3Config/settings/browser.sh
|
|||||||
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
|
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
|
||||||
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
|
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
|
||||||
bindsym $mod+Ctrl+Return exec --no-startup-id rofi -show drun
|
bindsym $mod+Ctrl+Return exec --no-startup-id rofi -show drun
|
||||||
|
bindsym $mod+v exec code
|
||||||
|
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# Window management
|
# Window management
|
||||||
|
|||||||
31
install.sh
31
install.sh
@@ -25,34 +25,10 @@ ask_app() {
|
|||||||
local label="$1"
|
local label="$1"
|
||||||
local default="$2"
|
local default="$2"
|
||||||
local app
|
local app
|
||||||
local first_run=true
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if [ "$first_run" = true ]; then
|
|
||||||
# First run: show the prompt with default
|
|
||||||
read -rp "$label (default: $default): " app
|
read -rp "$label (default: $default): " app
|
||||||
first_run=false
|
app="${app:-$default}"
|
||||||
else
|
|
||||||
# Subsequent runs: show a simpler prompt
|
|
||||||
read -rp "Enter a different command or 'skip' to continue anyway: " app
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Handle empty input (use default on first run, empty on subsequent runs)
|
|
||||||
if [ -z "$app" ]; then
|
|
||||||
if [ "$first_run" = false ]; then
|
|
||||||
# User pressed Enter on retry - ask if they want to skip
|
|
||||||
echo " Press Enter again to skip, or type 'skip'"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
app="$default"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow user to skip validation
|
|
||||||
if [ "$app" = "skip" ]; then
|
|
||||||
echo " Using '$default' (not verified)"
|
|
||||||
echo "$default"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check if command exists
|
# check if command exists
|
||||||
if command -v "${app%% *}" >/dev/null 2>&1; then
|
if command -v "${app%% *}" >/dev/null 2>&1; then
|
||||||
@@ -60,10 +36,7 @@ ask_app() {
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
echo "✗ '$app' not found in PATH"
|
echo "✗ '$app' not found in PATH"
|
||||||
if [ "$first_run" = true ]; then
|
echo " install it first or choose another"
|
||||||
echo " Install it with: sudo pacman -S ${app%% *}"
|
|
||||||
echo " Or choose a different application"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user