Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Sources/DevtailKit/ProcessRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ public final class ProcessRunner {

let proc = Process()
proc.executableURL = URL(fileURLWithPath: "/bin/zsh")
proc.arguments = ["-l", "-c", command]
proc.arguments = ["-li", "-c", command]

if let dir = workingDirectory, !dir.isEmpty {
let expanded = NSString(string: dir).expandingTildeInPath
proc.currentDirectoryURL = URL(fileURLWithPath: expanded)
}

var env = ProcessInfo.processInfo.environment
env["FORCE_COLOR"] = "1"
env["TERM"] = "xterm-256color"
proc.environment = env
proc.environment = [
"HOME": NSHomeDirectory(),
"USER": NSUserName(),
"FORCE_COLOR": "1",
"TERM": "xterm-256color",
]

let pipe = Pipe()
proc.standardOutput = pipe
Expand Down
4 changes: 4 additions & 0 deletions icon.icon/Assets/apple.terminal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions icon.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"fill" : {
"automatic-gradient" : "display-p3:0.96783,0.69374,0.34635,1.00000"
},
"groups" : [
{
"layers" : [
{
"glass" : false,
"image-name" : "apple.terminal.svg",
"name" : "apple.terminal",
"position" : {
"scale" : 35,
"translation-in-points" : [
-0.007916313259784147,
-0.0019790783148891933
]
}
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"translucency" : {
"enabled" : true,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
21 changes: 20 additions & 1 deletion scripts/package-dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

# ── Configuration ────────────────────────────────────────────────────
APP_NAME="Devtail"
APP_NAME="devtail"
BUNDLE_ID="com.leerosen.devtail"
EXECUTABLE="devtail"
VERSION="${VERSION:-1.0.0}"
Expand Down Expand Up @@ -37,6 +37,21 @@ mkdir -p "$APP_BUNDLE/Contents/Resources"

cp "$BUILD_DIR/$EXECUTABLE" "$APP_BUNDLE/Contents/MacOS/$EXECUTABLE"

# Compile Liquid Glass app icon
if [ -d "$PROJECT_DIR/icon.icon" ]; then
echo "▸ Compiling Liquid Glass icon…"
actool "$PROJECT_DIR/icon.icon" --compile "$APP_BUNDLE/Contents/Resources" \
--output-format human-readable-text --notices --warnings --errors \
--output-partial-info-plist /tmp/devtail-icon-info.plist \
--app-icon icon --include-all-app-icons \
--enable-on-demand-resources NO \
--development-region en \
--target-device mac \
--minimum-deployment-target 26.0 \
--platform macosx
rm -f /tmp/devtail-icon-info.plist
fi

cat > "$APP_BUNDLE/Contents/Info.plist" << PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
Expand All @@ -61,6 +76,10 @@ cat > "$APP_BUNDLE/Contents/Info.plist" << PLIST
<string>14.0</string>
<key>LSUIElement</key>
<true/>
<key>CFBundleIconFile</key>
<string>icon</string>
<key>CFBundleIconName</key>
<string>icon</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
Expand Down
24 changes: 24 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
73 changes: 73 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)

## React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
23 changes: 23 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
17 changes: 17 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="devtail — a macOS menu bar app for managing local development processes. Stop juggling terminal windows." />
<title>devtail — every process, one menu bar</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital@1&display=swap" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading
Loading