Make sure WM mode is reachable

This commit is contained in:
Sameer Rahmani 2024-02-22 14:19:57 +00:00
parent d2713dab39
commit 688c76af87
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
5 changed files with 104 additions and 94 deletions

View File

@ -50,6 +50,9 @@
(when (file-exists-p user-init-file) (when (file-exists-p user-init-file)
(require 'fg42/cube) (require 'fg42/cube)
(require 'fg42/flags)
(require 'fg42/cubes/fg42)
(load user-init-file)) (load user-init-file))
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook

View File

@ -144,6 +144,7 @@ contextual information."
:flag-default t :flag-default t
(fpkg/use exec-path-from-shell (fpkg/use exec-path-from-shell
:init :init
(require 'exec-path-from-shell)
(when (memq window-system '(mac ns x)) (when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize)))) (exec-path-from-shell-initialize))))

View File

@ -116,6 +116,7 @@
mini-modeline mini-modeline
smart-mode-line smart-mode-line
all-the-icons all-the-icons
exwm
) )
(provide 'fg42/deps) (provide 'fg42/deps)

View File

@ -167,7 +167,7 @@ last item in second form, etc."
"A wrapper for autloading FN at FILE with the given DOCSTRING. "A wrapper for autloading FN at FILE with the given DOCSTRING.
This macro looks inside of the cubes directories. If the INTERACTIVE param This macro looks inside of the cubes directories. If the INTERACTIVE param
is non-nil value it means that the function can be called interactively." is non-nil value it means that the function can be called interactively."
`(autoload ,fn (expand-file-name (format "core/fg42/cubes/%s" ,file) fg42-home) `(autoload ,fn (expand-file-name (format "lisp/fg42/cubes/%s" ,file) fg42-home)
,docstring ,interactive)) ,docstring ,interactive))

View File

@ -37,8 +37,6 @@
bash, bash,
}: }:
with builtins; with builtins;
stdenv.mkDerivation (final:
let let
getPkg = epkgs: pkg: getPkg = epkgs: pkg:
if hasAttr pkg epkgs if hasAttr pkg epkgs
@ -50,9 +48,8 @@ stdenv.mkDerivation (final:
); );
maintainers = import ./maintainers.nix; maintainers = import ./maintainers.nix;
in stdenv.mkDerivation (final: rec{
in rec{ pname = "fg42$";
pname = "fg42";
version = "4.0.0"; version = "4.0.0";
src = srcDir; src = srcDir;
@ -79,12 +76,13 @@ stdenv.mkDerivation (final:
export FG42_USE_NIX=true; export FG42_USE_NIX=true;
LIBRARY_PATH="\$(${stdenv.cc}/bin/cc -print-file-name=libgccjit.so):\$LIBRARY_PATH" \ LIBRARY_PATH="\$(${stdenv.cc}/bin/cc -print-file-name=libgccjit.so):\$LIBRARY_PATH" \
FG42_WM=false ${emacsBundle}/bin/emacs \ FG42_WM=fales ${emacsBundle}/bin/emacs \
--name FG42 \ --name FG42 \
-q --no-splash --title FG42 \ -q --no-splash --title FG42 \
-l \$FG42_HOME/lisp/fg42/init.el "\$@" -l \$FG42_HOME/lisp/fg42/init.el "\$@"
EOF EOF
chmod +x $out/bin/fg42 chmod +x $out/bin/fg42
runHook postBuild
cat >> $out/bin/fg42-wm << EOF cat >> $out/bin/fg42-wm << EOF
#!${stdenv.shell} #!${stdenv.shell}
@ -92,6 +90,7 @@ stdenv.mkDerivation (final:
export FG42_HOME=${placeholder "out"}/share/fg42/ export FG42_HOME=${placeholder "out"}/share/fg42/
export FG42_EMACSD=~/.fg42/v4/emacs.d export FG42_EMACSD=~/.fg42/v4/emacs.d
export FG42_USE_NIX=true; export FG42_USE_NIX=true;
# Disable access control for the current user. # Disable access control for the current user.
xhost +SI:localuser:$USER xhost +SI:localuser:$USER
@ -118,8 +117,16 @@ stdenv.mkDerivation (final:
EOF EOF
chmod +x $out/bin/fg42-wm chmod +x $out/bin/fg42-wm
runHook postBuild cat >> $out/share/runtiem_deps << EOF
${vazir-fonts}
${fira-code}
${nerdfonts}
${ripgrep}
${git}
${ltex-ls}
EOF
runHook postBuild
''; '';
installPhase = '' installPhase = ''
@ -133,7 +140,6 @@ stdenv.mkDerivation (final:
buildInputs = [ buildInputs = [
gcc
emacs emacs
texinfo texinfo
emacsBundle emacsBundle
@ -148,7 +154,6 @@ stdenv.mkDerivation (final:
bash bash
]; ];
addEmacsNativeLoadPath = true; addEmacsNativeLoadPath = true;
meta = { meta = {