Compare commits
2 Commits
ac7fe9de54
...
b64bb5874c
| Author | SHA1 | Date | |
|---|---|---|---|
| b64bb5874c | |||
| 6c48073e36 |
@@ -751,9 +751,9 @@ local function adopt_matching_scratchpad_window(window)
|
||||
for name, def in pairs(scratchpads) do
|
||||
if scratchpad_window_matches(window, def) then
|
||||
if scratchpad_pending[name] then
|
||||
local target_monitor = scratchpad_pending[name]
|
||||
local pending = scratchpad_pending[name]
|
||||
scratchpad_pending[name] = nil
|
||||
show_scratchpad_window(name, window, nil, target_monitor)
|
||||
show_scratchpad_window(name, window, pending.workspace or active_workspace(), pending.monitor or hl.get_active_monitor())
|
||||
elseif scratchpad_is_visible(window) then
|
||||
schedule_scratchpad_geometry(name, window, hl.get_active_monitor())
|
||||
end
|
||||
@@ -1074,7 +1074,10 @@ local function toggle_scratchpad(name)
|
||||
|
||||
local windows = matching_scratchpad_windows(name)
|
||||
if #windows == 0 then
|
||||
scratchpad_pending[name] = hl.get_active_monitor()
|
||||
scratchpad_pending[name] = {
|
||||
monitor = hl.get_active_monitor(),
|
||||
workspace = active_workspace(),
|
||||
}
|
||||
hl.exec_cmd(def.command)
|
||||
return
|
||||
end
|
||||
|
||||
102
nixos/nix.nix
102
nixos/nix.nix
@@ -109,105 +109,9 @@
|
||||
(import ./emacs-overlay.nix)
|
||||
(import ../nix-shared/overlays)
|
||||
# Use codex and claude-code from dedicated flakes with cachix
|
||||
(final: prev: let
|
||||
system = prev.stdenv.hostPlatform.system;
|
||||
codexDmg = final.fetchurl {
|
||||
url = "https://persistent.oaistatic.com/codex-app-prod/Codex.dmg";
|
||||
hash = "sha256-hxuafsEAmx1OQvjh8riI7Y4QxvZXemBrjpRHT8Bh034=";
|
||||
};
|
||||
codexDesktopLibPath = final.lib.makeLibraryPath (with final; [
|
||||
alsa-lib
|
||||
atk
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libX11
|
||||
libxcb
|
||||
libXcomposite
|
||||
libxcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libxi
|
||||
libxkbcommon
|
||||
libXrandr
|
||||
libxscrnsaver
|
||||
libxtst
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
systemd
|
||||
wayland
|
||||
]);
|
||||
codexDesktopInstaller = final.writeShellApplication {
|
||||
name = "codex-desktop-installer";
|
||||
runtimeInputs = with final; [
|
||||
bash
|
||||
curl
|
||||
gcc
|
||||
gnumake
|
||||
nodejs
|
||||
p7zip
|
||||
patchelf
|
||||
python3
|
||||
unzip
|
||||
];
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(pwd)"
|
||||
workdir="$(mktemp -d)"
|
||||
source_dir="$workdir/source"
|
||||
cleanup() {
|
||||
rm -rf "$workdir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir -p "$source_dir"
|
||||
cp -R ${inputs.codex-desktop-linux.outPath}/. "$source_dir"
|
||||
chmod -R u+w "$source_dir"
|
||||
cp ${codexDmg} "$source_dir/Codex.dmg"
|
||||
chmod +x "$source_dir/install.sh"
|
||||
|
||||
cd "$source_dir"
|
||||
export CODEX_INSTALL_DIR="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}"
|
||||
bash "$source_dir/install.sh" "$source_dir/Codex.dmg" "$@"
|
||||
|
||||
install_dir="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}"
|
||||
if [ -f "$install_dir/electron" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$install_dir:${codexDesktopLibPath}" \
|
||||
"$install_dir/electron"
|
||||
|
||||
if [ -f "$install_dir/chrome_crashpad_handler" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
"$install_dir/chrome_crashpad_handler" || true
|
||||
fi
|
||||
|
||||
if [ -f "$install_dir/chrome-sandbox" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
"$install_dir/chrome-sandbox" || true
|
||||
fi
|
||||
|
||||
find "$install_dir" -maxdepth 1 -name "*.so*" -type f | while read -r so; do
|
||||
patchelf --set-rpath "${codexDesktopLibPath}" "$so" 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in {
|
||||
codex = inputs.codex-cli-nix.packages.${system}.default;
|
||||
codex-desktop-installer = codexDesktopInstaller;
|
||||
(final: prev: {
|
||||
codex = inputs.codex-cli-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
codex-desktop-installer = inputs.codex-desktop-linux.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
codex-desktop = final.writeShellApplication {
|
||||
name = "codex-desktop";
|
||||
runtimeInputs = [
|
||||
|
||||
Reference in New Issue
Block a user