mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Just focus on the window rules
This commit is contained in:
@@ -1,40 +1,4 @@
|
||||
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/default/foot/foot.desktop" ~/.local/share/applications/
|
||||
cp -Rpf "$OMARCHY_PATH/applications/hidden/footclient.desktop" ~/.local/share/applications/
|
||||
cp -Rpf "$OMARCHY_PATH/applications/hidden/foot-server.desktop" ~/.local/share/applications/
|
||||
fi
|
||||
echo "Add Foot terminal window rules where terminals are described"
|
||||
|
||||
if [[ -f ~/.config/hypr/input.conf ]]; then
|
||||
sed -Ei 's/match:class \(Alacritty\|kitty\)/match:class (Alacritty|kitty|foot)/' ~/.config/hypr/input.conf
|
||||
|
||||
Reference in New Issue
Block a user