Update all hyprland references to new lua ones
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# Copy over the keyboard layout that's been set in Arch during install to Hyprland
|
||||
conf="/etc/vconsole.conf"
|
||||
hyprconf="$HOME/.config/hypr/input.conf"
|
||||
hyprlua="$HOME/.config/hypr/input.lua"
|
||||
|
||||
if grep -q '^XKBLAYOUT=' "$conf"; then
|
||||
if [[ -f $conf && -f $hyprlua ]] && grep -q '^XKBLAYOUT=' "$conf"; then
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf"
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = \"$layout\"," "$hyprlua"
|
||||
fi
|
||||
|
||||
if grep -q '^XKBVARIANT=' "$conf"; then
|
||||
if [[ -f $conf && -f $hyprlua ]] && grep -q '^XKBVARIANT=' "$conf"; then
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf"
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = \"$variant\"," "$hyprlua"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user