diff --git a/Cargo.toml b/Cargo.toml index 76b70e64..860b6740 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,13 +105,13 @@ section = "rust" priority = "optional" assets = [ ["target/release/alacritty", "usr/bin/", "755"], - ["alacritty.desktop", "usr/share/applications/", "644"], - ["alacritty-completions.bash", "usr/share/bash-completion/completions/alacritty", "644"], - ["alacritty-completions.fish", "usr/share/fish/completions/alacritty.fish", "644"], - ["alacritty-completions.zsh", "usr/share/zsh/vendor-completions/_alacritty", "644"], - ["alacritty.info", "usr/share/terminfo/a/alacritty", "644"], + ["extra/linux/alacritty.desktop", "usr/share/applications/", "644"], + ["extra/completions/alacritty.bash", "usr/share/bash-completion/completions/alacritty", "644"], + ["extra/completions/alacritty.fish", "usr/share/fish/completions/alacritty.fish", "644"], + ["extra/completions/_alacritty", "usr/share/zsh/vendor-completions/_alacritty", "644"], + ["extra/alacritty.info", "usr/share/terminfo/a/alacritty", "644"], ] -maintainer-scripts = "debian" +maintainer-scripts = "extra/linux/debian" [patch.crates-io] servo-freetype-sys = { path = "servo-freetype-proxy" } diff --git a/INSTALL.md b/INSTALL.md index 28cb35ed..edfb980b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -194,7 +194,7 @@ system menus. To install the desktop entry for Alacritty, run ```sh sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATH -sudo desktop-file-install alacritty.desktop +sudo desktop-file-install extra/linux/alacritty.desktop sudo update-desktop-database ``` @@ -237,7 +237,7 @@ To install the manual page, run ```sh sudo mkdir -p /usr/local/share/man/man1 -gzip -c alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null +gzip -c extra/alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null ``` ## Shell completions @@ -246,7 +246,8 @@ To get automatic completions for alacritty's flags and arguments you can install ### Zsh -To install the completions for zsh, you can place the `alacritty-completions.zsh` as `_alacritty` in any directory referenced by `$fpath`. +To install the completions for zsh, you can place the `extra/completions/_alacritty` file in any +directory referenced by `$fpath`. If you do not already have such a directory registered through your `~/.zshrc`, you can add one like this: @@ -258,24 +259,25 @@ echo 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrc Then copy the completion file to this directory: ```sh -cp alacritty-completions.zsh ${ZDOTDIR:-~}/.zsh_functions/_alacritty +cp extra/completions/_alacritty ${ZDOTDIR:-~}/.zsh_functions/_alacritty ``` ### Bash -To install the completions for bash, you can `source` the `alacritty-completions.bash` in your `~/.bashrc` file. +To install the completions for bash, you can `source` the `extra/completions/alacritty.bash` file +in your `~/.bashrc` file. If you do not plan to delete the source folder of alacritty, you can run ```sh -echo "source $(pwd)/alacritty-completions.bash" >> ~/.bashrc +echo "source $(pwd)/extra/completions/alacritty.bash" >> ~/.bashrc ``` Otherwise you can copy it to the `~/.bash_completion` folder and source it from there: ```sh mkdir -p ~/.bash_completion -cp alacritty-completions.bash ~/.bash_completion/alacritty +cp extra/completions/alacritty.bash ~/.bash_completion/alacritty echo "source ~/.bash_completion/alacritty" >> ~/.bashrc ``` @@ -284,7 +286,7 @@ echo "source ~/.bash_completion/alacritty" >> ~/.bashrc To install the completions for fish, run ``` -sudo cp alacritty-completions.fish $__fish_data_dir/vendor_completions.d/alacritty.fish +sudo cp extra/completions/alacritty.fish $__fish_data_dir/vendor_completions.d/alacritty.fish ``` **Note:** For fish versions below 3.0 `$__fish_datadir` must be used instead. @@ -307,5 +309,5 @@ instead. To install alacritty's terminfo entry globally: ```sh -sudo tic -xe alacritty,alacritty-direct alacritty.info +sudo tic -xe alacritty,alacritty-direct extra/alacritty.info ``` diff --git a/Makefile b/Makefile index 9d61dbd6..4990e5e3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ TARGET = alacritty APP_NAME = Alacritty.app -ASSETS_DIR = assets +ASSETS_DIR = extra RELEASE_DIR = target/release APP_TEMPLATE = $(ASSETS_DIR)/osx/$(APP_NAME) APP_DIR = $(RELEASE_DIR)/osx diff --git a/README.md b/README.md index 1081bdfe..22cbbd14 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Alacritty -========= - -[![Travis build Status](https://travis-ci.org/jwilm/alacritty.svg?branch=master)](https://travis-ci.org/jwilm/alacritty) +

Alacritty

+

+ Alacritty Logo +

Alacritty is the fastest terminal emulator in existence. Using the GPU for rendering enables optimizations that simply aren't possible without it. diff --git a/assets/windows/alacritty.ico b/assets/windows/alacritty.ico deleted file mode 100644 index cea9106b..00000000 Binary files a/assets/windows/alacritty.ico and /dev/null differ diff --git a/build.rs b/build.rs index 1a12a670..9eb61afc 100644 --- a/build.rs +++ b/build.rs @@ -45,7 +45,7 @@ fn main() { #[cfg(windows)] { - embed_resource::compile("assets/windows/windows.rc"); + embed_resource::compile("extra/windows/windows.rc"); // Path is relative to target/{profile}/build/alacritty-HASH/out let file = Path::new(&env::var("OUT_DIR").unwrap()).join("../../../winpty-agent.exe"); diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 75ceb53b..2c99cbd2 100755 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -62,9 +62,8 @@ elif [ "$TRAVIS_OS_NAME" == "windows" ]; then "./target/release/winpty-agent.exe" # Create msi installer - ./WiX.*/tools/candle.exe -nologo -arch "x64" -ext WixUIExtension -ext WixUtilExtension -out "wix/alacritty.wixobj" "wix/alacritty.wxs" - ./WiX.*/tools/light.exe -nologo -ext WixUIExtension -ext WixUtilExtension -out "wix/alacritty.msi" -sice:ICE61 -sice:ICE91 "wix/alacritty.wixobj" - mv "./wix/alacritty.msi" "./target/deploy/${name}-windows-installer.msi" + ./WiX.*/tools/candle.exe -nologo -arch "x64" -ext WixUIExtension -ext WixUtilExtension -out "target/alacritty.wixobj" "extra/windows/wix/alacritty.wxs" + ./WiX.*/tools/light.exe -nologo -ext WixUIExtension -ext WixUtilExtension -out "target/deploy/${name}-windows-installer.msi" -sice:ICE61 -sice:ICE91 "target/alacritty.wixobj" fi # Convert and add manpage if it changed diff --git a/alacritty.info b/extra/alacritty.info similarity index 100% rename from alacritty.info rename to extra/alacritty.info diff --git a/alacritty.man b/extra/alacritty.man similarity index 100% rename from alacritty.man rename to extra/alacritty.man diff --git a/alacritty-completions.zsh b/extra/completions/_alacritty similarity index 100% rename from alacritty-completions.zsh rename to extra/completions/_alacritty diff --git a/alacritty-completions.bash b/extra/completions/alacritty.bash similarity index 100% rename from alacritty-completions.bash rename to extra/completions/alacritty.bash diff --git a/alacritty-completions.fish b/extra/completions/alacritty.fish similarity index 100% rename from alacritty-completions.fish rename to extra/completions/alacritty.fish diff --git a/alacritty.desktop b/extra/linux/alacritty.desktop similarity index 100% rename from alacritty.desktop rename to extra/linux/alacritty.desktop diff --git a/debian/postinst b/extra/linux/debian/postinst similarity index 100% rename from debian/postinst rename to extra/linux/debian/postinst diff --git a/debian/prerm b/extra/linux/debian/prerm similarity index 100% rename from debian/prerm rename to extra/linux/debian/prerm diff --git a/snap/snapcraft.yaml b/extra/linux/snap/snapcraft.yaml similarity index 100% rename from snap/snapcraft.yaml rename to extra/linux/snap/snapcraft.yaml diff --git a/extra/logo/alacritty-term+scanlines.svg b/extra/logo/alacritty-term+scanlines.svg new file mode 100644 index 00000000..151a38dd --- /dev/null +++ b/extra/logo/alacritty-term+scanlines.svg @@ -0,0 +1,707 @@ + +image/svg+xml \ No newline at end of file diff --git a/extra/logo/alacritty-term.svg b/extra/logo/alacritty-term.svg new file mode 100644 index 00000000..065df538 --- /dev/null +++ b/extra/logo/alacritty-term.svg @@ -0,0 +1,443 @@ + +image/svg+xml \ No newline at end of file diff --git a/extra/logo/alacritty.svg b/extra/logo/alacritty.svg new file mode 100644 index 00000000..1896902e --- /dev/null +++ b/extra/logo/alacritty.svg @@ -0,0 +1,309 @@ + +image/svg+xml \ No newline at end of file diff --git a/assets/osx/Alacritty.app/Contents/Info.plist b/extra/osx/Alacritty.app/Contents/Info.plist similarity index 100% rename from assets/osx/Alacritty.app/Contents/Info.plist rename to extra/osx/Alacritty.app/Contents/Info.plist diff --git a/assets/osx/Alacritty.app/Contents/Resources/alacritty.icns b/extra/osx/Alacritty.app/Contents/Resources/alacritty.icns similarity index 100% rename from assets/osx/Alacritty.app/Contents/Resources/alacritty.icns rename to extra/osx/Alacritty.app/Contents/Resources/alacritty.icns diff --git a/extra/windows/alacritty.ico b/extra/windows/alacritty.ico new file mode 100644 index 00000000..009e4acd Binary files /dev/null and b/extra/windows/alacritty.ico differ diff --git a/assets/windows/alacritty.manifest b/extra/windows/alacritty.manifest similarity index 100% rename from assets/windows/alacritty.manifest rename to extra/windows/alacritty.manifest diff --git a/assets/windows/windows.rc b/extra/windows/windows.rc similarity index 100% rename from assets/windows/windows.rc rename to extra/windows/windows.rc diff --git a/wix/alacritty.wxs b/extra/windows/wix/alacritty.wxs similarity index 96% rename from wix/alacritty.wxs rename to extra/windows/wix/alacritty.wxs index 22d4192f..6f88f16e 100644 --- a/wix/alacritty.wxs +++ b/extra/windows/wix/alacritty.wxs @@ -1,11 +1,11 @@ - - + diff --git a/wix/license.rtf b/extra/windows/wix/license.rtf similarity index 100% rename from wix/license.rtf rename to extra/windows/wix/license.rtf diff --git a/scripts/spawn-alacritty-cwd b/scripts/spawn-alacritty-cwd deleted file mode 100755 index b0008a50..00000000 --- a/scripts/spawn-alacritty-cwd +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Spawn a new instance of Alacritty using the CWD of the currently focused -# Alacritty process. -# -# This is useful in environment like i3 where terminals are opened using a -# key-combination while another terminal is already focused. -# -# If the script is run with a non-Alacritty window in focus or a non-compliant -# version of Alacritty, the script will exit with code 1. This makes it possible -# to use the script like -# -# spawn-alacritty-cwd || alacritty -# - -ACTIVE_WINDOW=$(xdotool getactivewindow) -ACTIVE_WM_CLASS=$(xprop -id $ACTIVE_WINDOW | grep WM_CLASS) - -if [[ $ACTIVE_WM_CLASS == *"Alacritty"* ]] -then - # Get PID. If _NET_WM_PID isn't set, bail. - PID=$(xprop -id $ACTIVE_WINDOW | grep _NET_WM_PID | grep -oP "\d+") - if [[ "$PID" == "" ]] - then - exit 1 - fi - - # Get first child of terminal - CHILD_PID=$(pgrep -P $PID) - if [[ "$PID" == "" ]] - then - exit 1 - fi - - # Get current directory of child. The first child should be the shell. - pushd "/proc/${CHILD_PID}/cwd" - SHELL_CWD=$(pwd -P) - popd - - # Start alacritty with the working directory - alacritty --working-directory $SHELL_CWD -else - exit 1 -fi diff --git a/src/window.rs b/src/window.rs index c0231970..85dee273 100644 --- a/src/window.rs +++ b/src/window.rs @@ -30,7 +30,7 @@ use crate::cli::Options; use crate::config::{Decorations, WindowConfig}; #[cfg(windows)] -static WINDOW_ICON: &'static [u8] = include_bytes!("../assets/windows/alacritty.ico"); +static WINDOW_ICON: &'static [u8] = include_bytes!("../extra/windows/alacritty.ico"); /// Default Alacritty name, used for window title and class. pub const DEFAULT_NAME: &str = "Alacritty"; diff --git a/winpty/build.rs b/winpty/build.rs index 0ab379b8..a0742a11 100644 --- a/winpty/build.rs +++ b/winpty/build.rs @@ -5,10 +5,10 @@ fn main() { // The working directory for `cargo test` is in the deps folder, not the debug/release root if cfg!(test) && Path::new("target").exists() { #[cfg(debug_assertions)] - copy("../assets/windows/x86_64/winpty-agent.exe", "target/debug/deps/winpty-agent.exe") + copy("../extra/windows/x86_64/winpty-agent.exe", "target/debug/deps/winpty-agent.exe") .unwrap(); #[cfg(not(debug_assertions))] - copy("../assets/windows/x86_64/winpty-agent.exe", "target/release/deps/winpty-agent.exe") + copy("../extra/windows/x86_64/winpty-agent.exe", "target/release/deps/winpty-agent.exe") .unwrap(); } } diff --git a/wix/build.sh b/wix/build.sh deleted file mode 100644 index 9584c024..00000000 --- a/wix/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -WiX.*/tools/candle.exe -nologo -arch "x64" -ext WixUIExtension -ext WixUtilExtension -out "wix/alacritty.wixobj" "wix/alacritty.wxs" - -WiX.*/tools/light.exe -nologo -ext WixUIExtension -ext WixUtilExtension -out "wix/alacritty.msi" -sice:ICE61 -sice:ICE91 "wix/alacritty.wixobj"