diff --git a/README.md b/README.md index e6cd18dc..b54c17e4 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ Lite XL has support for high DPI display on Windows and Linux and, since 1.16.7 release, it supports **retina displays** on macOS. Please note that Lite XL is compatible with lite for most plugins and all color themes. -We provide a separate lite-plugins repository for Lite XL, because in some cases +We provide a separate lite-xl-plugins repository for Lite XL, because in some cases some adaptations may be needed to make them work better with Lite XL. -The repository with modified plugins is https://github.com/franko/lite-plugins. +The repository with modified plugins is https://github.com/lite-xl/lite-xl-plugins. The changes and differences between Lite XL and rxi/lite are listed in the [changelog]. @@ -131,10 +131,7 @@ rm -rf $HOME/.local/share/icons/hicolor/scalable/apps/lite-xl.svg \ ## Contributing Any additional functionality that can be added through a plugin should be done -as a plugin, after which a pull request to the [plugins repository] can be made. - -If the plugin uses any Lite XL-specific functionality, -please open a pull request to the [Lite XL plugins repository]. +as a plugin, after which a pull request to the [Lite XL plugins repository] can be made. Pull requests to improve or modify the editor itself are welcome. @@ -150,14 +147,13 @@ See the [licenses] file for details on licenses used by the required dependencie [Discord Badge Image]: https://img.shields.io/discord/847122429742809208?label=discord&logo=discord [screenshot-dark]: https://user-images.githubusercontent.com/433545/111063905-66943980-84b1-11eb-9040-3876f1133b20.png [lite]: https://github.com/rxi/lite -[website]: https://lite-xl.github.io -[build]: https://lite-xl.github.io/en/documentation/build/ -[Get Lite XL]: https://github.com/franko/lite-xl/releases/latest -[Get plugins]: https://github.com/franko/lite-plugins -[Get color themes]: https://github.com/rxi/lite-colors -[changelog]: https://github.com/franko/lite-xl/blob/master/changelog.md -[Lite XL plugins repository]: https://github.com/franko/lite-plugins -[plugins repository]: https://github.com/rxi/lite-plugins -[colors repository]: https://github.com/rxi/lite-colors +[website]: https://lite-xl.com +[build]: https://lite-xl.com/en/documentation/build/ +[Get Lite XL]: https://github.com/lite-xl/lite-xl/releases/latest +[Get plugins]: https://github.com/lite-xl/lite-xl-plugins +[Get color themes]: https://github.com/lite-xl/lite-xl-colors +[changelog]: https://github.com/lite-xl/lite-xl/blob/master/changelog.md +[Lite XL plugins repository]: https://github.com/lite-xl/lite-xl-plugins +[colors repository]: https://github.com/lite-xl/lite-xl-colors [LICENSE]: LICENSE [licenses]: licenses/licenses.md diff --git a/data/core/init.lua b/data/core/init.lua index aadccc66..ea340c7a 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -183,7 +183,7 @@ local function show_max_files_warning(dir) "Filesystem is too slow: project files will not be indexed." or "Too many files in project directory: stopped reading at ".. config.max_project_files.." files. For more information see ".. - "usage.md at github.com/franko/lite-xl." + "usage.md at github.com/lite-xl/lite-xl." core.status_view:show_message("!", style.accent, message) end @@ -737,7 +737,7 @@ function core.init() "Refused Plugins", string.format( "Some plugins are not loaded due to version mismatch.\n\n%s.\n\n" .. - "Please download a recent version from https://github.com/franko/lite-plugins.", + "Please download a recent version from https://github.com/lite-xl/lite-xl-plugins.", table.concat(msg, ".\n\n")), opt, function(item) if item.text == "Exit" then os.exit(1) end diff --git a/data/core/keymap-macos.lua b/data/core/keymap-macos.lua index b0bd41a5..edbd53ef 100644 --- a/data/core/keymap-macos.lua +++ b/data/core/keymap-macos.lua @@ -6,6 +6,7 @@ local function keymap_macos(keymap) ["cmd+n"] = "core:new-doc", ["cmd+shift+c"] = "core:change-project-folder", ["cmd+shift+o"] = "core:open-project-folder", + ["cmd+shift+r"] = "core:restart", ["cmd+ctrl+return"] = "core:toggle-fullscreen", ["cmd+ctrl+shift+j"] = "root:split-left", diff --git a/data/core/keymap.lua b/data/core/keymap.lua index b076629b..404cff39 100644 --- a/data/core/keymap.lua +++ b/data/core/keymap.lua @@ -146,6 +146,7 @@ keymap.add_direct { ["ctrl+n"] = "core:new-doc", ["ctrl+shift+c"] = "core:change-project-folder", ["ctrl+shift+o"] = "core:open-project-folder", + ["ctrl+shift+r"] = "core:restart", ["alt+return"] = "core:toggle-fullscreen", ["f11"] = "core:toggle-fullscreen", diff --git a/scripts/package.sh b/scripts/package.sh index 21a8cc91..c90e5b7c 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -20,7 +20,7 @@ show_help() { echo "-h --help Show this help and exit." echo "-p --prefix PREFIX Install directory prefix. Default: '/'." echo "-v --version VERSION Sets the version on the package name." - echo " --addons Install 3rd party addons (currently RXI colors)." + echo " --addons Install 3rd party addons (currently Lite XL colors)." echo " --debug Debug this script." echo "-A --appimage Create an AppImage (Linux only)." echo "-B --binary Create a normal / portable package or macOS bundle," @@ -45,13 +45,13 @@ install_addons() { # Copy third party color themes curl --insecure \ - -L "https://github.com/rxi/lite-colors/archive/master.zip" \ - -o "${build_dir}/rxi-lite-colors.zip" + -L "https://github.com/lite-xl/lite-xl-colors/archive/master.zip" \ + -o "${build_dir}/lite-xl-colors.zip" mkdir -p "${build_dir}/third/data/colors" - unzip "${build_dir}/rxi-lite-colors.zip" -d "${build_dir}" - mv "${build_dir}/lite-colors-master/colors" "${build_dir}/third/data" - rm -rf "${build_dir}/lite-colors-master" + unzip "${build_dir}/lite-xl-colors.zip" -d "${build_dir}" + mv "${build_dir}/lite-xl-colors-master/colors" "${build_dir}/third/data" + rm -rf "${build_dir}/lite-xl-colors-master" for module_name in colors; do cp -r "${build_dir}/third/data/$module_name" "${data_dir}" diff --git a/scripts/repackage.sh b/scripts/repackage.sh index f8da579f..80af45c8 100644 --- a/scripts/repackage.sh +++ b/scripts/repackage.sh @@ -15,12 +15,12 @@ copy_directory_from_repo () { lite_copy_third_party_modules () { local build="$1" - curl --retry 5 --retry-delay 3 --insecure -L "https://github.com/rxi/lite-colors/archive/master.zip" -o "$build/rxi-lite-colors.zip" || exit 1 + curl --retry 5 --retry-delay 3 --insecure -L "https://github.com/lite-xl/lite-xl-colors/archive/master.zip" -o "$build/lite-xl-colors.zip" || exit 1 mkdir -p "$build/third/data/colors" "$build/third/data/plugins" - unzip -qq "$build/rxi-lite-colors.zip" -d "$build" - mv "$build/lite-colors-master/colors" "$build/third/data" - rm -fr "$build/lite-colors-master" - rm "$build/rxi-lite-colors.zip" + unzip -qq "$build/lite-xl-colors.zip" -d "$build" + mv "$build/lite-xl-colors-master/colors" "$build/third/data" + rm -fr "$build/lite-xl-colors-master" + rm "$build/lite-xl-colors.zip" } lite_branch=master @@ -47,7 +47,7 @@ workdir=".repackage" rm -fr "$workdir" && mkdir "$workdir" && pushd "$workdir" fetch_packages_from_github () { - assets=($($wget -q -nv -O- https://api.github.com/repos/franko/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)) + assets=($($wget -q -nv -O- https://api.github.com/repos/lite-xl/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)) for url in "${assets[@]}"; do echo "getting: $url" diff --git a/src/api/renderer.c b/src/api/renderer.c index ad3e763f..bd001cdf 100644 --- a/src/api/renderer.c +++ b/src/api/renderer.c @@ -1,6 +1,6 @@ #include "api.h" -#include "renderer.h" -#include "rencache.h" +#include "../renderer.h" +#include "../rencache.h" static int f_font_load(lua_State *L) { const char *filename = luaL_checkstring(L, 1); diff --git a/src/api/system.c b/src/api/system.c index baa1a78b..8c7ebb98 100644 --- a/src/api/system.c +++ b/src/api/system.c @@ -6,8 +6,8 @@ #include #include #include "api.h" -#include "dirmonitor.h" -#include "rencache.h" +#include "../dirmonitor.h" +#include "../rencache.h" #ifdef _WIN32 #include #include @@ -108,7 +108,15 @@ static const char *get_key_name(const SDL_Event *e, char *buf) { !(e->key.keysym.mod & KMOD_NUM)) { return numpad[scancode - SDL_SCANCODE_KP_1]; } else { - strcpy(buf, SDL_GetScancodeName(e->key.keysym.scancode)); + /* We need to correctly handle non-standard layouts such as dvorak. + Therefore, if a Latin letter(code<128) is pressed in the current layout, + then we transmit it as it is. But we also need to support shortcuts in + other languages, so for non-Latin characters we pass the scancode that + matches the letter in the QWERTY layout. */ + if (e->key.keysym.sym < 128) + strcpy(buf, SDL_GetKeyName(e->key.keysym.sym)); + else + strcpy(buf, SDL_GetScancodeName(scancode)); str_tolower(buf); return buf; } diff --git a/src/bundle_open.m b/src/bundle_open.m index 2ba10da7..fe27818b 100644 --- a/src/bundle_open.m +++ b/src/bundle_open.m @@ -1,5 +1,5 @@ #import -#include "lua.h" +#include #ifdef MACOS_USE_BUNDLE void set_macos_bundle_resources(lua_State *L) diff --git a/src/rencache.c b/src/rencache.c index e9339ecb..5d464226 100644 --- a/src/rencache.c +++ b/src/rencache.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include