function addInputConfig -a vendorID productID name
    set -l file /etc/xdg/kcminputrc
    set -l statements $argv[4..]

    if [ -z "$statements" ]
        set statements (cat)
    end

    if not cat $file | grep "\\[$name\\]" &>/dev/null
        begin
            printf %s\n \
                (if [ -f $file ] && [ -n (cat $file) ]
                    echo ""
                end) \
                "[Libinput][$vendorID][$productID][$name]" \
                "$statements"
        end | sudo tee $file >/dev/null
    end
end