Add foot terminal as an option

This commit is contained in:
David Heinemeier Hansson
2026-05-05 22:18:02 +02:00
parent cd30fd094e
commit 7debca9f47
17 changed files with 188 additions and 13 deletions
+4
View File
@@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=Foot Server
NoDisplay=true
+21
View File
@@ -0,0 +1,21 @@
[Desktop Entry]
Type=Application
TryExec=foot
Exec=foot
Icon=foot
Terminal=false
Categories=System;TerminalEmulator;
Name=Foot
GenericName=Terminal
Comment=A fast, lightweight and minimalistic Wayland terminal emulator
StartupNotify=true
StartupWMClass=foot
Actions=New;
X-TerminalArgExec=-e
X-TerminalArgAppId=--app-id=
X-TerminalArgTitle=--title=
X-TerminalArgDir=--working-directory=
[Desktop Action New]
Name=New Terminal
Exec=foot
+4
View File
@@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=Foot Client
NoDisplay=true
+8
View File
@@ -22,6 +22,10 @@ if [[ -n $font_name ]]; then
pkill -SIGUSR2 ghostty
fi
if [[ -f ~/.config/foot/foot.ini ]]; then
sed -i "s/^font=.*/font=$font_name:size=9/g" ~/.config/foot/foot.ini
fi
sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css
@@ -37,6 +41,10 @@ if [[ -n $font_name ]]; then
notify-send -u low " You must restart Ghostty to see font change"
fi
if pgrep -x foot; then
notify-send -u low " You must restart Foot to see font change"
fi
omarchy-hook font-set "$font_name"
else
echo "Font '$font_name' not found."
+11 -5
View File
@@ -1,11 +1,11 @@
#!/bin/bash
# omarchy:summary=Install one of the approved terminals and set it as the default for Omarchy (Super + Return etc).
# omarchy:args=<alacritty|ghostty|kitty>
# omarchy:args=<alacritty|foot|ghostty|kitty>
# omarchy:requires-sudo=true
if (($# == 0)); then
echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]"
echo "Usage: omarchy-install-terminal [alacritty|foot|ghostty|kitty]"
exit 1
fi
@@ -14,6 +14,7 @@ package="$1"
# Map package name to desktop entry ID
case "$package" in
alacritty) desktop_id="Alacritty.desktop" ;;
foot) desktop_id="foot.desktop" ;;
ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;;
kitty) desktop_id="kitty.desktop" ;;
*)
@@ -26,10 +27,15 @@ echo "Installing $package..."
# Install package
if omarchy-pkg-add $package; then
# Copy custom desktop entry for alacritty with X-TerminalArg* keys
if [[ $package == "alacritty" ]]; then
# Copy custom desktop entries with X-TerminalArg* keys
if [[ $package == "alacritty" || $package == "foot" ]]; then
mkdir -p ~/.local/share/applications
cp $OMARCHY_PATH/applications/Alacritty.desktop ~/.local/share/applications/
cp "$OMARCHY_PATH/applications/$desktop_id" ~/.local/share/applications/
fi
# Copy default config for optional terminals when missing
if [[ ! -e ~/.config/$package ]]; then
cp -Rpf "$OMARCHY_PATH/config/$package" ~/.config/
fi
# Update xdg-terminals.list to prioritize the proper terminal
+7 -1
View File
@@ -37,6 +37,12 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
--font-size=18 \
-e omarchy-screensaver
;;
*foot*)
hyprctl dispatch exec -- \
foot --app-id=org.omarchy.screensaver \
--config="$OMARCHY_PATH/default/foot/screensaver.ini" \
-e omarchy-screensaver
;;
*kitty*)
hyprctl dispatch exec -- \
kitty --class=org.omarchy.screensaver \
@@ -45,7 +51,7 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
-e omarchy-screensaver
;;
*)
notify-send -u low "✋ Screensaver only runs in Alacritty, Ghostty, or Kitty"
notify-send -u low "✋ Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty"
;;
esac
done
+2 -1
View File
@@ -394,8 +394,9 @@ show_install_editor_menu() {
}
show_install_terminal_menu() {
case $(menu "Install" " Alacritty\n Ghostty\n Kitty") in
case $(menu "Install" " Alacritty\n Foot\n Ghostty\n Kitty") in
*Alacritty*) install_terminal "alacritty" ;;
*Foot*) install_terminal "foot" ;;
*Ghostty*) install_terminal "ghostty" ;;
*Kitty*) install_terminal "kitty" ;;
*) show_install_menu ;;
+1
View File
@@ -62,6 +62,7 @@ omarchy-restart-mako
omarchy-restart-helix
# Change app-specific themes
omarchy-theme-set-foot
omarchy-theme-set-gnome
omarchy-theme-set-browser
omarchy-theme-set-vscode
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# omarchy:summary=Apply current Omarchy theme colors to running Foot terminals
foot_theme=~/.config/omarchy/current/theme/foot.ini
if [[ ! -f $foot_theme ]] || ! pgrep -x foot >/dev/null; then
exit 0
fi
foot_osc=$(awk -F= '
function color(value) { return "#" value }
/^foreground=/ { printf "\033]10;%s\007", color($2) }
/^background=/ { printf "\033]11;%s\007", color($2) }
/^cursor=/ { split($2, parts, " "); printf "\033]12;%s\007", color(parts[2]) }
/^selection-background=/ { printf "\033]17;%s\007", color($2) }
/^selection-foreground=/ { printf "\033]19;%s\007", color($2) }
/^regular[0-7]=/ { split($1, parts, "regular"); printf "\033]4;%d;%s\007", parts[2], color($2) }
/^bright[0-7]=/ { split($1, parts, "bright"); printf "\033]4;%d;%s\007", parts[2] + 8, color($2) }
' "$foot_theme")
for foot_pid in $(pgrep -x foot); do
for child_pid in $(pgrep -P "$foot_pid"); do
tty=$(readlink "/proc/$child_pid/fd/1" 2>/dev/null)
[[ $tty == /dev/pts/* ]] && printf '%b' "$foot_osc" >"$tty"
done
done
+19
View File
@@ -0,0 +1,19 @@
[main]
include=~/.config/omarchy/current/theme/foot.ini
term=xterm-256color
font=JetBrainsMono Nerd Font:size=9
pad=14x14
initial-window-mode=windowed
workers=0
[scrollback]
lines=10000
[cursor]
style=block
blink=no
[key-bindings]
clipboard-copy=Control+Insert
primary-paste=none
clipboard-paste=Shift+Insert
+1 -1
View File
@@ -41,7 +41,7 @@ input {
}
# Scroll nicely in the terminal
windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5
windowrule = match:class (Alacritty|kitty|foot), scroll_touchpad 1.5
windowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2
# Enable touchpad gestures for changing workspaces
+7
View File
@@ -0,0 +1,7 @@
[main]
font=JetBrainsMono Nerd Font:size=18
pad=0x0
[colors-dark]
background=000000
foreground=ffffff
+1 -1
View File
@@ -3,7 +3,7 @@ windowrule = float on, match:tag floating-window
windowrule = center on, match:tag floating-window
windowrule = size 875 600, match:tag floating-window
windowrule = tag +floating-window, match:class (org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)
windowrule = tag +floating-window, match:class (org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.codeberg.dnkl.foot|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)
windowrule = tag +floating-window, match:class (xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), match:title ^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)
windowrule = float on, match:class org.gnome.Calculator
+1 -1
View File
@@ -1,4 +1,4 @@
# Define terminal tag to style them uniformly
windowrule = tag +terminal, match:class (Alacritty|kitty|com.mitchellh.ghostty)
windowrule = tag +terminal, match:class (Alacritty|kitty|com.mitchellh.ghostty|foot)
windowrule = tag -default-opacity, match:tag terminal
windowrule = opacity 0.97 0.9, match:tag terminal
+4 -3
View File
@@ -3,7 +3,7 @@ name: omarchy
description: >
REQUIRED for end-user customization of Linux desktop, window manager, or system config.
Use when editing ~/.config/hypr/, ~/.config/waybar/, ~/.config/walker/,
~/.config/alacritty/, ~/.config/kitty/, ~/.config/ghostty/, ~/.config/mako/,
~/.config/alacritty/, ~/.config/foot/, ~/.config/kitty/, ~/.config/ghostty/, ~/.config/mako/,
or ~/.config/omarchy/. Triggers: Hyprland, window rules, animations, keybindings,
monitors, gaps, borders, blur, opacity, waybar, walker, terminal config, themes,
wallpaper, night light, idle, lock screen, screenshots, layer rules, workspace
@@ -24,7 +24,7 @@ It is not for contributing to Omarchy source code.
- Editing ANY file in `~/.config/hypr/` (window rules, animations, keybindings, monitors, etc.)
- Editing ANY file in `~/.config/waybar/`, `~/.config/walker/`, `~/.config/mako/`
- Editing terminal configs (alacritty, kitty, ghostty)
- Editing terminal configs (alacritty, foot, kitty, ghostty)
- Editing ANY file in `~/.config/omarchy/`
- Window behavior, animations, opacity, blur, gaps, borders
- Layer rules, workspace settings, display/monitor configuration
@@ -78,7 +78,7 @@ Omarchy is built on:
| **Hyprland** | Wayland compositor/WM | `~/.config/hypr/` |
| **Waybar** | Status bar | `~/.config/waybar/` |
| **Walker** | App launcher | `~/.config/walker/` |
| **Alacritty/Kitty/Ghostty** | Terminals | `~/.config/<terminal>/` |
| **Alacritty/Foot/Kitty/Ghostty** | Terminals | `~/.config/<terminal>/` |
| **Mako** | Notifications | `~/.config/mako/` |
| **SwayOSD** | On-screen display | `~/.config/swayosd/` |
@@ -163,6 +163,7 @@ Run `omarchy --help` for the full list. The most common groups:
```
~/.config/alacritty/alacritty.toml
~/.config/foot/foot.ini
~/.config/kitty/kitty.conf
~/.config/ghostty/config
```
+25
View File
@@ -0,0 +1,25 @@
[colors-dark]
foreground={{ foreground_strip }}
background={{ background_strip }}
selection-foreground={{ selection_foreground_strip }}
selection-background={{ selection_background_strip }}
cursor={{ background_strip }} {{ cursor_strip }}
regular0={{ color0_strip }}
regular1={{ color1_strip }}
regular2={{ color2_strip }}
regular3={{ color3_strip }}
regular4={{ color4_strip }}
regular5={{ color5_strip }}
regular6={{ color6_strip }}
regular7={{ color7_strip }}
bright0={{ color8_strip }}
bright1={{ color9_strip }}
bright2={{ color10_strip }}
bright3={{ color11_strip }}
bright4={{ color12_strip }}
bright5={{ color13_strip }}
bright6={{ color14_strip }}
bright7={{ color15_strip }}
+45
View File
@@ -0,0 +1,45 @@
echo "Add Foot terminal config and theme support"
if [[ ! -f ~/.config/foot/foot.ini ]]; then
mkdir -p ~/.config/foot
cp -Rpf "$OMARCHY_PATH/config/foot/foot.ini" ~/.config/foot/foot.ini
elif ! grep -q "^primary-paste=none" ~/.config/foot/foot.ini; then
sed -i '/^clipboard-copy=Control+Insert/a primary-paste=none' ~/.config/foot/foot.ini
fi
if [[ -f ~/.config/omarchy/current/theme/foot.ini ]]; then
sed -i 's/^\[colors\]$/[colors-dark]/' ~/.config/omarchy/current/theme/foot.ini
fi
if [[ ! -f ~/.config/omarchy/current/theme/foot.ini && -f ~/.config/omarchy/current/theme/colors.toml ]]; then
sed_script=$(mktemp)
while IFS='=' read -r key value; do
key="${key//[\"\' ]/}"
[[ $key && $key != \#* ]] || continue
value="${value#*[\"\']}"
value="${value%%[\"\']*}"
printf 's|{{ %s }}|%s|g\n' "$key" "$value"
printf 's|{{ %s_strip }}|%s|g\n' "$key" "${value#\#}"
done <~/.config/omarchy/current/theme/colors.toml >"$sed_script"
sed -f "$sed_script" "$OMARCHY_PATH/default/themed/foot.ini.tpl" >~/.config/omarchy/current/theme/foot.ini
rm "$sed_script"
fi
if omarchy-cmd-present foot; then
mkdir -p ~/.local/share/applications
rm -f ~/.local/share/applications/org.codeberg.dnkl.foot.desktop
cp -Rpf "$OMARCHY_PATH/applications/foot.desktop" ~/.local/share/applications/
cp -Rpf "$OMARCHY_PATH/applications/footclient.desktop" ~/.local/share/applications/
cp -Rpf "$OMARCHY_PATH/applications/foot-server.desktop" ~/.local/share/applications/
fi
if [[ -f ~/.config/hypr/input.conf ]]; then
sed -Ei 's/match:class \(Alacritty\|kitty\)/match:class (Alacritty|kitty|foot)/' ~/.config/hypr/input.conf
fi
if [[ -f ~/.config/hypr/apps/terminals.conf ]]; then
sed -Ei 's/match:class \(Alacritty\|kitty\|com\.mitchellh\.ghostty\)/match:class (Alacritty|kitty|com.mitchellh.ghostty|foot)/' ~/.config/hypr/apps/terminals.conf
fi