Fix the wm flag detection issue

This commit is contained in:
Sameer Rahmani 2024-03-09 22:00:49 +00:00
parent 248fbdf082
commit 70f14f5928
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
2 changed files with 20 additions and 10 deletions

View File

@ -37,12 +37,14 @@
:title "Window manager cube" :title "Window manager cube"
:no-flag t :no-flag t
(if-flag wm
(when-wm (when-wm
(message "[WM] Initilizing...") (message "[WM] Initilizing...")
(fpkg/use exwm) (fpkg/use exwm)
(fg42/initialize-wm)) (fg42/initialize-wm))
(error "[SKIP] WM flag is not active"))) ;; (if-flag wm
;; (error "[SKIP] WM flag is not active"))
)
(provide 'fg42/cubes/wm) (provide 'fg42/cubes/wm)
;;; wm.el ends here ;;; wm.el ends here

View File

@ -40,10 +40,14 @@
gcc, gcc,
ltex-ls, ltex-ls,
bash, bash,
tree-sitter,
supportWM ? true,
xorg,
supportPython ? true, supportPython ? true,
verilogSupport ? true, supportVerilog ? true,
svls, svls,
verilator, verilator,
}: }:
@ -66,6 +70,7 @@ let
ripgrep ripgrep
git git
ltex-ls ltex-ls
tree-sitter
] ++ (lib.optional supportPython [ ] ++ (lib.optional supportPython [
python311 python311
# Python deps # Python deps
@ -75,9 +80,12 @@ let
python3Packages.black python3Packages.black
python3Packages.pylint python3Packages.pylint
python3Packages.flake8 python3Packages.flake8
]) ++ (lib.optional verilogSupport [ ]) ++ (lib.optional supportVerilog [
svls svls
verilator verilator
]) ++ (lib.optional supportWM [
# Window manager supports works on Linux only
xorg.xhost
]); ]);
paths = map (x: "${x}/bin/") (lib.lists.flatten runtimeBins); paths = map (x: "${x}/bin/") (lib.lists.flatten runtimeBins);
@ -126,10 +134,10 @@ in stdenv.mkDerivation (final: rec{
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;
export PATH=${pathsStr}:$PATH export PATH=${pathsStr}:\$PATH
# Disable access control for the current user. # Disable access control for the current user.
xhost +SI:localuser:$USER ${xorg.xhost}/bin/xhost +SI:localuser:\$USER
# Make Java applications aware this is a non-reparenting window manager. # Make Java applications aware this is a non-reparenting window manager.
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1