From 24d7f554d00901841810b856b44d5763cbc5bd76 Mon Sep 17 00:00:00 2001 From: duckyriley Date: Mon, 23 Nov 2026 20:45:44 +0800 Subject: Build native GPUI shell with Lua customization and riced defaults --- assets/config.lua | 41 ++++++++++++++++++++++++++++++++++++++ assets/ducky.svg | 6 ++++++ assets/screenshots/customized.png | Bin 0 -> 17235 bytes assets/screenshots/ducky.png | Bin 0 -> 21853 bytes assets/shell.bash | 18 +++++++++++++++++ assets/themes/lagoon.lua | 18 +++++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 assets/config.lua create mode 100644 assets/ducky.svg create mode 100644 assets/screenshots/customized.png create mode 100644 assets/screenshots/ducky.png create mode 100644 assets/shell.bash create mode 100644 assets/themes/lagoon.lua (limited to 'assets') diff --git a/assets/config.lua b/assets/config.lua new file mode 100644 index 0000000..0a5694f --- /dev/null +++ b/assets/config.lua @@ -0,0 +1,41 @@ +-- Ducky runs this file on startup; Ctrl+Shift+R reloads it. +-- Full Lua 5.4 is available. Only run scripts you trust. +-- Try the bundled theme after installation: return require('themes.lagoon') +-- You can compute settings with Lua and require modules beside this file. +local home = os.getenv('HOME') +return { + font = 'JetBrainsMono Nerd Font Mono', + font_size = 15, + line_height = 21, + padding = 26, + background = '#141218', + foreground = '#ded7e8', + accent = '#c4a7e7', + surface = '#211d29', + muted = '#82758f', + border = '#393041', + show_status_bar = true, + status_bar_toggle = 'ctrl-shift-b', + width = 1100, + height = 720, + scrollback = 10000, + shell = '/bin/bash', + args = { '--rcfile', (os.getenv('XDG_CONFIG_HOME') or home .. '/.config') .. '/ducky/shell.bash', '-i' }, + cwd = home, + env = { COLORTERM = 'truecolor' }, + -- Send any command or escape sequence using a custom shortcut. + -- Keystrokes use GPUI syntax: ctrl-shift-g, alt-h, etc. + bindings = { + ['ctrl-shift-g'] = 'git status\r', + ['ctrl-shift-h'] = 'cd ~\r', + }, + -- Palette indices 0..15 (normal and bright ANSI colors). + palette = { + '#211d29', '#eb8b9c', '#a6d5b0', '#e8c997', + '#9bbae8', '#c4a7e7', '#97d5cf', '#d4cbdc', + '#71657e', '#f5a5b6', '#c1e7c8', '#f2dbb8', + '#b8d1f4', '#dec4f4', '#b5e7e1', '#f1eaf6', + }, + -- Optional startup customization (for example require your own modules). + -- startup = 'printf "Welcome to Ducky\\n"\r', +} diff --git a/assets/ducky.svg b/assets/ducky.svg new file mode 100644 index 0000000..ef5bd0b --- /dev/null +++ b/assets/ducky.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/screenshots/customized.png b/assets/screenshots/customized.png new file mode 100644 index 0000000..9fac024 Binary files /dev/null and b/assets/screenshots/customized.png differ diff --git a/assets/screenshots/ducky.png b/assets/screenshots/ducky.png new file mode 100644 index 0000000..523a943 Binary files /dev/null and b/assets/screenshots/ducky.png differ diff --git a/assets/shell.bash b/assets/shell.bash new file mode 100644 index 0000000..d36d1e5 --- /dev/null +++ b/assets/shell.bash @@ -0,0 +1,18 @@ +# User configuration first; this prompt is scoped to Ducky. +[[ -f ~/.bashrc ]] && source ~/.bashrc +_ducky_prompt() { + local status=$? branch + branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null) || branch='' + PS1=$'\n\[\e[38;2;196;167;231m\]╭─ ' + PS1+='\[\e[38;2;222;215;232m\]\w' + _ducky_branch=$branch + [[ -n $branch ]] && PS1+=' \[\e[38;2;151;213;207m\]⎇ ${_ducky_branch}' + [[ $status -ne 0 ]] && PS1+=" \[\e[38;2;235;139;156m\]${status}" + PS1+=$'\n\[\e[38;2;196;167;231m\]╰─❯ \[\e[0m\]' +} +# Keep other prompt hooks, then set Ducky's prompt last. +if declare -p PROMPT_COMMAND 2>/dev/null | grep -q 'declare -a'; then + PROMPT_COMMAND+=(_ducky_prompt) +else + PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }_ducky_prompt" +fi diff --git a/assets/themes/lagoon.lua b/assets/themes/lagoon.lua new file mode 100644 index 0000000..79b930f --- /dev/null +++ b/assets/themes/lagoon.lua @@ -0,0 +1,18 @@ +-- Use from config.lua: return require('themes.lagoon') +-- Missing settings inherit Ducky's defaults. +return { + background = '#0d1b20', + foreground = '#d6eeeb', + surface = '#152c32', + accent = '#80dfc0', + muted = '#719d9d', + font_size = 16, + line_height = 24, + padding = 28, + palette = { + '#152c32', '#f28e8e', '#80dfc0', '#edcc8c', + '#89bbed', '#c4a8e6', '#83d4df', '#c1d8d8', + '#597d82', '#ffaaaa', '#a2f3d7', '#ffe0a6', + '#aed6ff', '#dfc5ff', '#a4f1f6', '#ecf8f4', + }, +} -- cgit v1.2.3