lol

ragnarwm: init at 1.3.1

+142
+1
nixos/modules/services/x11/window-managers/default.nix
··· 35 35 ./openbox.nix 36 36 ./pekwm.nix 37 37 ./notion.nix 38 + ./ragnarwm.nix 38 39 ./ratpoison.nix 39 40 ./sawfish.nix 40 41 ./smallwm.nix
+33
nixos/modules/services/x11/window-managers/ragnarwm.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + cfg = config.services.xserver.windowManager.ragnarwm; 7 + in 8 + { 9 + ###### interface 10 + 11 + options = { 12 + services.xserver.windowManager.ragnarwm = { 13 + enable = mkEnableOption (lib.mdDoc "ragnarwm"); 14 + package = mkOption { 15 + type = types.package; 16 + default = pkgs.ragnarwm; 17 + defaultText = literalExpression "pkgs.ragnarwm"; 18 + description = lib.mdDoc '' 19 + The ragnar package to use. 20 + ''; 21 + }; 22 + }; 23 + }; 24 + 25 + ###### implementation 26 + 27 + config = mkIf cfg.enable { 28 + services.xserver.displayManager.sessionPackages = [ cfg.package ]; 29 + environment.systemPackages = [ cfg.package ]; 30 + }; 31 + 32 + meta.maintainers = with lib.maintainers; [ sigmanificient ]; 33 + }
+1
nixos/tests/all-tests.nix
··· 667 667 rabbitmq = handleTest ./rabbitmq.nix {}; 668 668 radarr = handleTest ./radarr.nix {}; 669 669 radicale = handleTest ./radicale.nix {}; 670 + ragnarwm = handleTest ./ragnarwm.nix {}; 670 671 rasdaemon = handleTest ./rasdaemon.nix {}; 671 672 readarr = handleTest ./readarr.nix {}; 672 673 redis = handleTest ./redis.nix {};
+32
nixos/tests/ragnarwm.nix
··· 1 + import ./make-test-python.nix ({ lib, ...} : { 2 + name = "ragnarwm"; 3 + 4 + meta = { 5 + maintainers = with lib.maintainers; [ sigmanificient ]; 6 + }; 7 + 8 + nodes.machine = { pkgs, lib, ... }: { 9 + imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 + test-support.displayManager.auto.user = "alice"; 11 + services.xserver.displayManager.defaultSession = lib.mkForce "ragnar"; 12 + services.xserver.windowManager.ragnarwm.enable = true; 13 + 14 + # Setup the default terminal of Ragnar 15 + environment.systemPackages = [ pkgs.alacritty ]; 16 + }; 17 + 18 + testScript = '' 19 + with subtest("ensure x starts"): 20 + machine.wait_for_x() 21 + machine.wait_for_file("/home/alice/.Xauthority") 22 + machine.succeed("xauth merge ~alice/.Xauthority") 23 + 24 + with subtest("ensure we can open a new terminal"): 25 + # Sleeping a bit before the test, as it may help for sending keys 26 + machine.sleep(2) 27 + machine.send_key("meta_l-ret") 28 + machine.wait_for_window(r"alice.*?machine") 29 + machine.sleep(2) 30 + machine.screenshot("terminal") 31 + ''; 32 + })
+73
pkgs/applications/window-managers/ragnarwm/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , writeText 5 + , fontconfig 6 + , libX11 7 + , libXft 8 + , libXcursor 9 + , libXcomposite 10 + , conf ? null 11 + , nixosTests 12 + }: 13 + 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "ragnarwm"; 16 + version = "1.3.1"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "cococry"; 20 + repo = "Ragnar"; 21 + rev = finalAttrs.version; 22 + hash = "sha256-SZWhmFNmS2oLdO9BnPzimoind1452v/EEQzadc5A+bI"; 23 + }; 24 + 25 + prePatch = '' 26 + substituteInPlace Makefile \ 27 + --replace '/usr/bin' "$out/bin" \ 28 + --replace '/usr/share' "$out/share" 29 + ''; 30 + 31 + postPatch = 32 + let 33 + configFile = 34 + if lib.isDerivation conf || builtins.isPath conf 35 + then conf else writeText "config.h" conf; 36 + in 37 + lib.optionalString (conf != null) "cp ${configFile} config.h"; 38 + 39 + buildInputs = [ 40 + fontconfig 41 + libX11 42 + libXft 43 + libXcursor 44 + libXcomposite 45 + ]; 46 + 47 + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 48 + enableParallelBuilding = true; 49 + 50 + preInstall = '' 51 + mkdir -p $out/bin 52 + mkdir -p $out/share/applications 53 + ''; 54 + 55 + postInstall = '' 56 + install -Dm644 $out/share/applications/ragnar.desktop $out/share/xsessions/ragnar.desktop 57 + ''; 58 + 59 + passthru = { 60 + tests.ragnarwm = nixosTests.ragnarwm; 61 + providedSessions = [ "ragnar" ]; 62 + }; 63 + 64 + meta = with lib; { 65 + description = "Minimal, flexible & user-friendly X tiling window manager"; 66 + homepage = "https://ragnar-website.vercel.app"; 67 + changelog = "https://github.com/cococry/Ragnar/releases/tag/${finalAttrs.version}"; 68 + license = licenses.gpl3Only; 69 + maintainers = with maintainers; [ sigmanificient ]; 70 + mainProgram = "ragnar"; 71 + platforms = platforms.linux; 72 + }; 73 + })
+2
pkgs/top-level/all-packages.nix
··· 33926 33926 33927 33927 qemacs = callPackage ../applications/editors/qemacs { }; 33928 33928 33929 + ragnarwm = callPackage ../applications/window-managers/ragnarwm {}; 33930 + 33929 33931 rime-cli = callPackage ../applications/office/rime-cli { }; 33930 33932 33931 33933 roxctl = callPackage ../applications/networking/cluster/roxctl {