Compare commits
10 commits
dbbc5a1a86
...
374809b1ab
Author | SHA1 | Date | |
---|---|---|---|
374809b1ab | |||
760061b9c7 | |||
7d0f17d608 | |||
2844db19a4 | |||
30d1c9ee11 | |||
1a05a9e469 | |||
62752b844f | |||
059128ead6 | |||
![]() |
1a8f883e21 | ||
![]() |
7a2424a84e |
5 changed files with 197 additions and 46 deletions
|
@ -1,30 +1,42 @@
|
||||||
@import url('https://fonts.cdnfonts.com/css/jetbrains-mono-2');
|
@import url('https://fonts.cdnfonts.com/css/jetbrains-mono-2');
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--font-family: "JetBrains Mono", monospace;
|
// --font-family: "Pixel Code", monospace;
|
||||||
--line-height: 1.20rem;
|
// --font-family: "Maple Mono", monospace;
|
||||||
|
// --font-family: "JetBrains Mono", monospace;
|
||||||
|
--font-family: "Iosevka", monospace;
|
||||||
|
// --font-family-alt: "Pixel Code", monospace;
|
||||||
|
// --font-family-alt: "AcPlus IBM VGA 9x16", monospace;
|
||||||
|
--font-family-titles: "AcPlus IBM VGA 9x16", monospace;
|
||||||
|
// --font-family-titles: "Maple Mono", monospace;
|
||||||
|
// --font-family-titles: "Pixel Code", monospace;
|
||||||
|
--line-height: 1.40rem;
|
||||||
--border-thickness: 2px;
|
--border-thickness: 2px;
|
||||||
--text-color: #000;
|
--text-color: #333;
|
||||||
--text-color-alt: #666;
|
--text-color-alt: #666;
|
||||||
|
--text-color-accent: #000;
|
||||||
--background-color: #fff;
|
--background-color: #fff;
|
||||||
--background-color-alt: #eee;
|
--background-color-alt: #eee;
|
||||||
|
// --transform: uppercase;
|
||||||
|
|
||||||
--font-weight-normal: 500;
|
--font-weight-normal: 500;
|
||||||
--font-weight-medium: 600;
|
--font-weight-medium: 600;
|
||||||
--font-weight-bold: 800;
|
--font-weight-bold: 800;
|
||||||
|
--font-weight-titles: 600;
|
||||||
|
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family);
|
||||||
font-optical-sizing: auto;
|
font-optical-sizing: auto;
|
||||||
font-weight: var(--font-weight-normal);
|
font-weight: var(--font-weight-normal);
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-variant-numeric: tabular-nums lining-nums;
|
font-variant-numeric: tabular-nums lining-nums;
|
||||||
font-size: 16px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--text-color: #fff;
|
--text-color: #aaa;
|
||||||
--text-color-alt: #aaa;
|
--text-color-alt: #898;
|
||||||
|
--text-color-accent: #ddd;
|
||||||
--background-color: #000;
|
--background-color: #000;
|
||||||
--background-color-alt: #111;
|
--background-color-alt: #111;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +67,7 @@ body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: var(--line-height) 2ch;
|
padding: var(--line-height) 2ch;
|
||||||
max-width: calc(min(80ch, round(down, 100%, 1ch)));
|
max-width: calc(min(100ch, round(down, 100%, 1ch)));
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
@ -73,19 +85,25 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
font-weight: var(--font-weight-bold);
|
font-weight: var(--font-weight-bold);
|
||||||
margin: calc(var(--line-height) * 2) 0 var(--line-height);
|
margin: calc(var(--line-height) * 2) 0 var(--line-height);
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
|
color: var(--text-color-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2rem;
|
font-size: 6rem;
|
||||||
line-height: calc(2 * var(--line-height));
|
line-height: calc(2 * var(--line-height));
|
||||||
margin-bottom: calc(var(--line-height) * 2);
|
margin-bottom: calc(var(--line-height) * 2);
|
||||||
text-transform: uppercase;
|
text-transform: var(--transform);
|
||||||
|
font-family: var(--font-family-titles);
|
||||||
|
font-weight: var(--font-weight-titles);
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1rem;
|
font-size: 2rem;
|
||||||
text-transform: uppercase;
|
font-family: var(--font-family-titles);
|
||||||
|
font-weight: var(--font-weight-titles);
|
||||||
|
text-transform: var(--transform);
|
||||||
|
// margin-left: calc(var(--line-height) * 1);
|
||||||
}
|
}
|
||||||
|
text-transform: var(--transform)
|
||||||
hr {
|
hr {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -225,15 +243,18 @@ details :last-child {
|
||||||
pre {
|
pre {
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin: var(--line-height) 0;
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
background: var(--background-color-alt);
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
color: var(--text-color-alt);
|
||||||
}
|
}
|
||||||
figure pre {
|
figure pre {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre, code {
|
pre, code {
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family-alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
@ -347,7 +368,7 @@ button::-moz-focus-inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
text-transform: uppercase;
|
text-transform: var(--transform);
|
||||||
font-weight: var(--font-weight-medium);
|
font-weight: var(--font-weight-medium);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,7 @@ pub fn build(b: *std.Build) !void {
|
||||||
|
|
||||||
const install_step = b.addInstallFile(b.path("install"), "install");
|
const install_step = b.addInstallFile(b.path("install"), "install");
|
||||||
b.getInstallStep().dependOn(&install_step.step);
|
b.getInstallStep().dependOn(&install_step.step);
|
||||||
|
|
||||||
|
const install_key = b.addInstallFile(b.path("public.gpg"), "public.gpg");
|
||||||
|
b.getInstallStep().dependOn(&install_key.step);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
---
|
---
|
||||||
.title = "Flow Control - a programmer's text editor",
|
.title = "Flow Control",
|
||||||
.date = @date("2020-07-06T00:00:00"),
|
.date = @date("2020-07-06T00:00:00"),
|
||||||
.author = "CJ van den Berg",
|
.author = "CJ van den Berg",
|
||||||
.layout = "home.shtml",
|
.layout = "home.shtml",
|
||||||
.draft = false,
|
.draft = false,
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a programmer's text editor. It is under active development, but usually stable.
|
## a programmer's text editor
|
||||||
|
|
||||||
|
Flow Control is under active development, but usually very stable.
|
||||||
|
|
||||||
[]($video.siteAsset('video/flow-control.mp4').controls(true))
|
[]($video.siteAsset('video/flow-control.mp4').controls(true))
|
||||||
|
|
||||||
|
@ -30,7 +32,25 @@ This is a programmer's text editor. It is under active development, but usually
|
||||||
## 📦 Installation
|
## 📦 Installation
|
||||||
|
|
||||||
### Installer
|
### Installer
|
||||||
``` curl -fsSL https://www.flow-control.dev/install | sh ```
|
|
||||||
|
Install the latest release to `/usr/local/bin`:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -fsSL https://flow-control.dev/install | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Install latest nightly build and specify the install prefix:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly --prefix ~/.local/bin
|
||||||
|
```
|
||||||
|
|
||||||
|
Install latest nightly build and verify against gpg signature:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly --verify
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Prebuilt Binaries
|
### Prebuilt Binaries
|
||||||
- Stable: [Releases](https://github.com/neurocyte/flow/releases)
|
- Stable: [Releases](https://github.com/neurocyte/flow/releases)
|
||||||
|
@ -82,7 +102,7 @@ kitty_mod ctrl+alt
|
||||||
flow file.zig:42 # Open at line 42
|
flow file.zig:42 # Open at line 42
|
||||||
flow --language zig CMakeLists.txt # Force file type
|
flow --language zig CMakeLists.txt # Force file type
|
||||||
flow --list-languages # Show all supported languages
|
flow --list-languages # Show all supported languages
|
||||||
flow --help # Full list of command line options
|
flow --help # List of command line options
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⌨️ Key Controls
|
## ⌨️ Key Controls
|
||||||
|
|
161
install
161
install
|
@ -1,42 +1,149 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
REPO="neurocyte/flow"
|
install_dir="/usr/local/bin"
|
||||||
INSTALL_DIR="/usr/local/bin"
|
add_alias=0
|
||||||
|
nightly=0
|
||||||
|
verify=0
|
||||||
|
local=0
|
||||||
|
|
||||||
# detect os and architecture
|
while true; do
|
||||||
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
case "${1}" in
|
||||||
if [ "$OS" = "darwin" ]; then
|
-a | --alias)
|
||||||
OS="macos"
|
add_alias=1
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
-n | --nightly)
|
||||||
|
nightly=1
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
-p | --prefix)
|
||||||
|
install_dir=/$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-V | --verify)
|
||||||
|
verify=1
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
-l | --local)
|
||||||
|
local=1
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift 1
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# prompt for nightly build option if interactive
|
||||||
|
if [ "$nightly" -eq 0 ] && [ -t 0 ]; then
|
||||||
|
printf "do you want to install a Nightly build? [y/N]: "
|
||||||
|
read -r answer_nightly
|
||||||
|
if [ "$answer_nightly" = "y" ] || [ "$answer_nightly" = "Y" ]; then
|
||||||
|
nightly=1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ARCH="$(uname -m)"
|
if [ "$nightly" -eq 1 ]; then
|
||||||
case "$ARCH" in
|
repo="neurocyte/flow-nightly"
|
||||||
x86_64) ARCH="x86_64" ;;
|
else
|
||||||
arm64) ARCH="aarch64" ;;
|
repo="neurocyte/flow"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# detect os and architecture
|
||||||
|
os="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||||
|
if [ "$os" = "darwin" ]; then
|
||||||
|
os="macos"
|
||||||
|
fi
|
||||||
|
|
||||||
|
arch="$(uname -m)"
|
||||||
|
case "$arch" in
|
||||||
|
x86_64) arch="x86_64" ;;
|
||||||
|
arm64) arch="aarch64" ;;
|
||||||
|
i686) arch="x86" ;;
|
||||||
|
i386) arch="x86" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# get latest version tag from github releases api
|
# get latest version tag from github releases api
|
||||||
VERSION=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
|
version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
|
||||||
[ -z "$VERSION" ] && { echo "failed to fetch latest version"; exit 1; }
|
[ -z "$version" ] && {
|
||||||
|
echo "failed to fetch latest version"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# construct download url
|
# construct download url
|
||||||
FILENAME="flow-$VERSION-$OS-$ARCH"
|
# note: nightly assets are named like "flow-<version>-<os>-<arch>.<ext>"
|
||||||
EXT="tar.gz"
|
filename="flow-$version-$os-$arch"
|
||||||
[ "$OS" = "windows" ] && EXT="zip"
|
ext="tar.gz"
|
||||||
URL="https://github.com/$REPO/releases/download/$VERSION/$FILENAME.$EXT"
|
if [ "$os" = "windows" ]; then
|
||||||
|
ext="zip"
|
||||||
|
fi
|
||||||
|
url="https://github.com/$repo/releases/download/$version/$filename.$ext"
|
||||||
|
|
||||||
echo "downloading flow $VERSION..."
|
if [ "$nightly" -eq 1 ]; then
|
||||||
curl -L "$URL" -o "/tmp/$FILENAME.$EXT"
|
echo "downloading NIGHTLY build $version..."
|
||||||
|
|
||||||
echo "installing flow..."
|
|
||||||
if [ "$EXT" = "tar.gz" ]; then
|
|
||||||
tar -xzf "/tmp/$FILENAME.$EXT" -C "$INSTALL_DIR"
|
|
||||||
else
|
else
|
||||||
unzip -o "/tmp/$FILENAME.$EXT" -d "$INSTALL_DIR"
|
echo "downloading flow $version..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod +x "$INSTALL_DIR/flow"
|
curl -fL "$url" -o "/tmp/$filename.$ext"
|
||||||
rm "/tmp/$FILENAME.$EXT"
|
|
||||||
echo "flow installed successfully!"
|
# simple file size check (adjust threshold if needed)
|
||||||
|
filesize=$(stat -c%s "/tmp/$filename.$ext" 2>/dev/null || stat -f%z "/tmp/$filename.$ext")
|
||||||
|
if [ "$filesize" -lt 100 ]; then
|
||||||
|
echo "downloaded file appears to be invalid (size: ${filesize} bytes)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$verify" -eq 0 ] && [ -t 0 ]; then
|
||||||
|
printf "do you want to download and verify the gpg signature? [y/N]: "
|
||||||
|
read -r answer_verify
|
||||||
|
if [ "$answer_verify" = "y" ] || [ "$answer_verify" = "Y" ]; then
|
||||||
|
verify=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$verify" -eq 1 ]; then
|
||||||
|
curl -fL "$url.sig" -o "/tmp/$filename.$ext.sig"
|
||||||
|
curl -fL 'https://flow-control.dev/public.gpg' -o /tmp/flow-control-public.gpg
|
||||||
|
gpg --no-default-keyring --keyring /tmp/flow-control-public.gpg --verify "/tmp/$filename.$ext.sig" "/tmp/$filename.$ext"
|
||||||
|
|
||||||
|
if [ "$local" -eq 1 ]; then
|
||||||
|
gpg --verify "/tmp/$filename.$ext.sig" "/tmp/$filename.$ext"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm /tmp/flow-control-public.gpg
|
||||||
|
rm "/tmp/$filename.$ext.sig"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "installing $([ "$nightly" -eq 1 ] && echo 'NIGHTLY build' || echo 'flow')..."
|
||||||
|
if [ "$ext" = "tar.gz" ]; then
|
||||||
|
tar -xzf "/tmp/$filename.$ext" -C "$install_dir"
|
||||||
|
else
|
||||||
|
unzip -o "/tmp/$filename.$ext" -d "$install_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod +x "$install_dir/flow"
|
||||||
|
rm "/tmp/$filename.$ext"
|
||||||
|
echo "$([ "$nightly" -eq 1 ] && echo 'NIGHTLY build' || echo 'flow') installed successfully!"
|
||||||
|
|
||||||
|
create_alias() {
|
||||||
|
if [ -e "$install_dir/f" ]; then
|
||||||
|
echo "warning: existing file or alias detected at $install_dir/f, overwriting..."
|
||||||
|
rm -f "$install_dir/f"
|
||||||
|
fi
|
||||||
|
ln -s "$install_dir/flow" "$install_dir/f"
|
||||||
|
echo "alias 'f' created successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$add_alias" -eq 1 ]; then
|
||||||
|
create_alias
|
||||||
|
elif [ -t 0 ]; then
|
||||||
|
printf "do you want to create an alias 'f' for 'flow'? [y/N]: "
|
||||||
|
read -r answer_alias
|
||||||
|
if [ "$answer_alias" = "y" ] || [ "$answer_alias" = "Y" ]; then
|
||||||
|
create_alias
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
BIN
public.gpg
Normal file
BIN
public.gpg
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue