Updates
This commit is contained in:
parent
c375c92d6f
commit
498fd92a12
@ -51,10 +51,10 @@ if gum confirm "Do you want to install the prepared dotfiles now?" ;then
|
||||
echo "Skipped: DEV MODE!"
|
||||
fi
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation cancelled"
|
||||
echo ":: Installation canceled"
|
||||
exit 130
|
||||
else
|
||||
echo ":: Installation cancelled"
|
||||
echo ":: Installation canceled"
|
||||
exit
|
||||
fi
|
||||
echo
|
||||
|
@ -6,37 +6,61 @@ echo -e "${GREEN}"
|
||||
figlet "Keyboard"
|
||||
echo -e "${NONE}"
|
||||
|
||||
# Default layout and variants
|
||||
keyboard_layout="us"
|
||||
|
||||
_setupKeyboardLayout() {
|
||||
echo ""
|
||||
echo "Start typing = Search, RETURN = Confirm, CTRL-C = Cancel"
|
||||
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||
echo ""
|
||||
echo ":: Keyboard layout changed to $keyboard_layout"
|
||||
echo ""
|
||||
_confirmKeyboard
|
||||
}
|
||||
|
||||
_confirmKeyboard() {
|
||||
echo "Current selected keyboard setup:"
|
||||
echo "Keyboard layout: $keyboard_layout"
|
||||
if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then
|
||||
return 0
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
else
|
||||
_setupKeyboardLayout
|
||||
fi
|
||||
}
|
||||
|
||||
setkeyboard=0
|
||||
if [ "$restored" == "1" ]; then
|
||||
echo ":: You have already restored your settings into the new installation."
|
||||
else
|
||||
echo "You can repeat the keyboard setup again to choose between a desktop and laptop optimized configuration."
|
||||
echo
|
||||
if gum confirm "Do you want to setup your keyboard again?" ;then
|
||||
setkeyboard=0
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
echo ":: Keyboard setup skipped."
|
||||
setkeyboard=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$setkeyboard" == "0" ] ;then
|
||||
|
||||
# Default layout and variants
|
||||
keyboard_layout="us"
|
||||
|
||||
_setupKeyboardLayout() {
|
||||
echo
|
||||
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||
echo
|
||||
echo ":: Keyboard layout changed to $keyboard_layout"
|
||||
echo
|
||||
_confirmKeyboard
|
||||
}
|
||||
|
||||
_confirmKeyboard() {
|
||||
|
||||
echo "Current selected keyboard setup:"
|
||||
echo "Keyboard layout: $keyboard_layout"
|
||||
echo
|
||||
if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then
|
||||
return 0
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
else
|
||||
_setupKeyboardLayout
|
||||
fi
|
||||
}
|
||||
|
||||
_confirmKeyboard
|
||||
|
||||
cp .install/templates/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
|
||||
if gum confirm "Are you using a laptop and would you like to enable the laptop presets?"; then
|
||||
cp .install/templates/keyboard-laptop.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
echo "source = ~/dotfiles/hypr/conf/layouts/laptop.conf" > ~/dotfiles-versions/$version/hypr/conf/layout.conf
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
cp .install/templates/keyboard-default.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
fi
|
||||
cp .install/templates/autostart.sh ~/dotfiles-versions/$version/qtile/autostart.sh
|
||||
|
||||
SEARCH="KEYBOARD_LAYOUT"
|
||||
@ -47,7 +71,9 @@ else
|
||||
REPLACE="$keyboard_layout"
|
||||
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh
|
||||
|
||||
echo ""
|
||||
echo ":: Keyboard setup updated successfully."
|
||||
echo
|
||||
echo ":: Keyboard setup complete."
|
||||
echo
|
||||
echo "PLEASE NOTE: You can update your keyboard layout later in ~/dotfiles/hypr/conf/keyboard.conf"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -1,12 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Remove blueman
|
||||
if [[ $(_isInstalledPacman "blueman") == 0 ]]; then
|
||||
sudo pacman --noconfirm -Rns blueman
|
||||
echo ":: blueman removed"
|
||||
echo
|
||||
fi
|
||||
|
||||
# Remove Rofi Calc
|
||||
if [[ $(_isInstalledPacman "rofi-calc") == 0 ]]; then
|
||||
sudo pacman --noconfirm -Rns rofi-calc
|
||||
|
@ -42,6 +42,10 @@ _showRestoreOptions() {
|
||||
restorelist+="~/dotfiles/hypr/conf/environment.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/environment.conf,"
|
||||
fi
|
||||
if [ -f ~/dotfiles/hypr/conf/layout.conf ] && [ -d ~/dotfiles/hypr/conf/layouts/ ]; then
|
||||
restorelist+="~/dotfiles/hypr/conf/layout.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/layout.conf,"
|
||||
fi
|
||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ] && [ -d ~/dotfiles/hypr/conf/windowrules/ ]; then
|
||||
restorelist+="~/dotfiles/hypr/conf/windowrule.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/windowrule.conf,"
|
||||
@ -150,6 +154,12 @@ _startRestore() {
|
||||
echo ":: Hyprland environment.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/layout.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/layout.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/layout.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo ":: Hyprland layout.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/windowrule.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/windowrule.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
|
@ -18,7 +18,13 @@ input {
|
||||
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
# for desktop
|
||||
natural_scroll = false
|
||||
|
||||
# for laptop
|
||||
# natural_scroll = yes
|
||||
# middle_button_emulation = true
|
||||
# clickfinger_behavior = 1
|
||||
}
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
30
.install/templates/keyboard-laptop.conf
Normal file
30
.install/templates/keyboard-laptop.conf
Normal file
@ -0,0 +1,30 @@
|
||||
# -----------------------------------------------------
|
||||
# Keyboard Layout
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
# -----------------------------------------------------
|
||||
input {
|
||||
kb_layout = KEYBOARD_LAYOUT
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
numlock_by_default = true
|
||||
mouse_refocus=false
|
||||
|
||||
# For United States
|
||||
# kb_layout = us
|
||||
# kb_variant = intl
|
||||
# kb_model = pc105
|
||||
# kb_options =
|
||||
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
# for desktop
|
||||
# natural_scroll = false
|
||||
|
||||
# for laptop
|
||||
natural_scroll = yes
|
||||
middle_button_emulation = true
|
||||
clickfinger_behavior = 1
|
||||
}
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
@ -1,16 +1 @@
|
||||
# -----------------------------------------------------
|
||||
# Layouts
|
||||
# -----------------------------------------------------
|
||||
|
||||
dwindle {
|
||||
pseudotile = true
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
master {
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
source = ~/dotfiles/hypr/conf/layouts/default.conf
|
16
hypr/conf/layouts/default.conf
Normal file
16
hypr/conf/layouts/default.conf
Normal file
@ -0,0 +1,16 @@
|
||||
# -----------------------------------------------------
|
||||
# Layouts
|
||||
# -----------------------------------------------------
|
||||
|
||||
dwindle {
|
||||
pseudotile = true
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
master {
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
16
hypr/conf/layouts/laptop.conf
Normal file
16
hypr/conf/layouts/laptop.conf
Normal file
@ -0,0 +1,16 @@
|
||||
# -----------------------------------------------------
|
||||
# Layouts
|
||||
# -----------------------------------------------------
|
||||
|
||||
dwindle {
|
||||
pseudotile = true
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
master {
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = true
|
||||
}
|
@ -64,8 +64,8 @@ source .install/wallpaper.sh
|
||||
source .install/displaymanager.sh
|
||||
source .install/issue.sh
|
||||
source .install/restore.sh
|
||||
source .install/neovim.sh
|
||||
source .install/keyboard.sh
|
||||
source .install/neovim.sh
|
||||
source .install/hook.sh
|
||||
source .install/vm.sh
|
||||
source .install/copy.sh
|
||||
|
12
scripts/lid-improvements.sh
Executable file
12
scripts/lid-improvements.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
while IFS= read -r line; do
|
||||
# If the line starts with # and the next line is not the lines to be added
|
||||
if [[ $line == \#HandleLidSwitchDocked=ignore ]]; then
|
||||
# Add the new lines
|
||||
echo "HandleLidSwitchDocked=ignore" | sudo tee -a /etc/systemd/logind.conf > /dev/null
|
||||
fi
|
||||
if [[ $line == \#HoldoffTimeoutSec=5s ]]; then
|
||||
# Add the new lines
|
||||
echo "HoldoffTimeoutSec=5s" | sudo tee -a /etc/systemd/logind.conf > /dev/null
|
||||
fi
|
||||
done < /etc/systemd/logind.conf
|
Loading…
Reference in New Issue
Block a user