push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
osc7_cwd() {
local strlen=${#PWD}
local encoded=""
local pos c o
for (( pos=0; pos<strlen; pos++ )); do
c=${PWD:$pos:1}
case "$c" in
[-/:_.!\'\(\)~[:alnum:]] ) o="${c}" ;;
* ) printf -v o '%%%02X' "'${c}" ;;
esac
encoded+="${o}"
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
}
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }osc7_cwd
prompt_marker() {
printf '\e]133;A\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }prompt_marker
PS0+='\e]133;C\e\\'
command_done() {
printf '\e]133;D\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }command_done

View File

@@ -0,0 +1,20 @@
function update_cwd_osc --on-variable PWD --description 'Notify terminals when $PWD changes'
if status --is-command-substitution || set -q INSIDE_EMACS
return
end
printf \e\]7\;file://%s%s\e\\ $hostname (string escape --style=url $PWD)
end
update_cwd_osc # Run once since we might have inherited PWD from a parent shell
function mark_prompt_start --on-event fish_prompt
echo -en "\e]133;A\e\\"
end
function foot_cmd_start --on-event fish_preexec
echo -en "\e]133;C\e\\"
end
function foot_cmd_end --on-event fish_postexec
echo -en "\e]133;D\e\\"
end

View File

@@ -0,0 +1,92 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.foot;
settingsFormat = pkgs.formats.ini {
listsAsDuplicateKeys = true;
mkKeyValue =
with lib.generators;
mkKeyValueDefault {
mkValueString =
v:
mkValueStringDefault { } (
if v == true then
"yes"
else if v == false then
"no"
else if v == null then
"none"
else
v
);
} "=";
};
in
{
options.programs.foot = {
enable = lib.mkEnableOption "foot terminal emulator";
package = lib.mkPackageOption pkgs "foot" { };
settings = lib.mkOption {
inherit (settingsFormat) type;
default = { };
description = ''
Configuration for foot terminal emulator. Further information can be found in {command}`man 5 foot.ini`.
Global configuration has to be written under the [main] section.
'';
example = {
main.font = "FreeMono:size=12";
scrollback.lines = 100000;
};
};
theme = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
description = ''
Theme name. Check <https://codeberg.org/dnkl/foot/src/branch/master/themes> for available themes.
'';
example = "aeroroot";
};
enableBashIntegration = lib.mkEnableOption "foot bash integration" // {
default = true;
};
enableFishIntegration = lib.mkEnableOption "foot fish integration" // {
default = true;
};
enableZshIntegration = lib.mkEnableOption "foot zsh integration" // {
default = true;
};
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = [ cfg.package ];
etc."xdg/foot/foot.ini".source = settingsFormat.generate "foot.ini" cfg.settings;
};
programs = {
foot.settings.main.include = lib.optionals (cfg.theme != null) [
"${pkgs.foot.themes}/share/foot/themes/${cfg.theme}"
];
# https://codeberg.org/dnkl/foot/wiki#user-content-shell-integration
bash.interactiveShellInit = lib.mkIf cfg.enableBashIntegration ". ${./bashrc} # enable shell integration for foot terminal";
fish.interactiveShellInit = lib.mkIf cfg.enableFishIntegration "source ${./config.fish} # enable shell integration for foot terminal";
zsh.interactiveShellInit = lib.mkIf cfg.enableZshIntegration ". ${./zshrc} # enable shell integration for foot terminal";
};
};
meta = {
maintainers = with lib.maintainers; [ linsui ];
};
}

View File

@@ -0,0 +1,27 @@
function osc7-pwd() {
emulate -L zsh # also sets localoptions for us
setopt extendedglob
local LC_ALL=C
printf '\e]7;file://%s%s\e\' $HOST ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}}
}
function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
precmd() {
print -Pn "\e]133;A\e\\"
}
function precmd {
if ! builtin zle; then
print -n "\e]133;D\e\\"
fi
}
function preexec {
print -n "\e]133;C\e\\"
}
autoload -U add-zsh-hook
add-zsh-hook -Uz chpwd chpwd-osc7-pwd