From 70f14f5928c6cffb3be81784425b57d984a00acd Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Sat, 9 Mar 2024 22:00:49 +0000 Subject: [PATCH] Fix the wm flag detection issue --- lisp/fg42/cubes/wm.el | 14 ++++++++------ nix/fg42.nix | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/lisp/fg42/cubes/wm.el b/lisp/fg42/cubes/wm.el index d699b99..14fb2cc 100644 --- a/lisp/fg42/cubes/wm.el +++ b/lisp/fg42/cubes/wm.el @@ -37,12 +37,14 @@ :title "Window manager cube" :no-flag t - (if-flag wm - (when-wm - (message "[WM] Initilizing...") - (fpkg/use exwm) - (fg42/initialize-wm)) - (error "[SKIP] WM flag is not active"))) + + (when-wm + (message "[WM] Initilizing...") + (fpkg/use exwm) + (fg42/initialize-wm)) + ;; (if-flag wm + ;; (error "[SKIP] WM flag is not active")) + ) (provide 'fg42/cubes/wm) ;;; wm.el ends here diff --git a/nix/fg42.nix b/nix/fg42.nix index d32be07..5659ae1 100644 --- a/nix/fg42.nix +++ b/nix/fg42.nix @@ -40,10 +40,14 @@ gcc, ltex-ls, bash, + tree-sitter, + supportWM ? true, + xorg, + supportPython ? true, - verilogSupport ? true, + supportVerilog ? true, svls, verilator, }: @@ -66,6 +70,7 @@ let ripgrep git ltex-ls + tree-sitter ] ++ (lib.optional supportPython [ python311 # Python deps @@ -75,9 +80,12 @@ let python3Packages.black python3Packages.pylint python3Packages.flake8 - ]) ++ (lib.optional verilogSupport [ + ]) ++ (lib.optional supportVerilog [ svls verilator + ]) ++ (lib.optional supportWM [ + # Window manager supports works on Linux only + xorg.xhost ]); 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_EMACSD=~/.fg42/v4/emacs.d export FG42_USE_NIX=true; - export PATH=${pathsStr}:$PATH + export PATH=${pathsStr}:\$PATH # 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. export _JAVA_AWT_WM_NONREPARENTING=1