tony / oxwm

Merge branch 'master' into bugfixes-floating-fullscreen Browse files
Tony, btw. committed 2025-11-17 parents 093d71c 44c9e5e commit ae6ee0d01daa924e0ab8a9a38c42198e843a1fae
Showing 3 changed files with 8 additions and 7 deletions. UnifiedSplit
+4 −1 default.nix
@@ -5,10 +5,11 @@
5 5 xorg,
6 6 freetype,
7 7 fontconfig,
8 + gitRev ? "unkown",
8 9 }:
9 10 rustPlatform.buildRustPackage (finalAttrs: {
10 11 pname = "oxwm";
11 - version = "0.7.0";
12 + version = "${lib.substring 0 8 gitRev}";
12 13
13 14 src = ./.;
14 15
@@ -28,6 +29,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
28 29 fontconfig
29 30 ];
30 31
32 + doCheck = false;
33 +
31 34 postInstall = ''
32 35 install resources/oxwm.desktop -Dt $out/share/xsessions
33 36 install -Dm644 resources/oxwm.1 -t $out/share/man/man1
+4 −1 flake.nix
@@ -12,7 +12,10 @@
12 12 forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
13 13 in {
14 14 packages = forAllSystems (pkgs: rec {
15 - default = pkgs.callPackage ./default.nix {};
15 + default = pkgs.callPackage ./default.nix {
16 + # use git rev for non tagged releases
17 + gitRev = self.rev or self.dirtyRev or null;
18 + };
16 19 oxwm = default;
17 20 });
18 21
+0 −5 src/bin/main.rs
@@ -74,7 +74,6 @@ fn load_config(custom_path: Option<PathBuf>) -> Result<(oxwm::Config, bool)> {
74 74 println!(" See the new config.lua template for examples.\n");
75 75 }
76 76 } else {
77 - // Always update LSP files to match the running version
78 77 update_lsp_files()?;
79 78 }
80 79
@@ -105,7 +104,6 @@ fn init_config() -> Result<()> {
105 104 let config_path = config_dir.join("config.lua");
106 105 std::fs::write(&config_path, config_template)?;
107 106
108 - // Update LSP files
109 107 update_lsp_files()?;
110 108
111 109 println!("✓ Config created at {:?}", config_path);
@@ -119,16 +117,13 @@ fn init_config() -> Result<()> {
119 117 fn update_lsp_files() -> Result<()> {
120 118 let config_dir = get_config_path();
121 119
122 - // Create lib directory for LSP files
123 120 let lib_dir = config_dir.join("lib");
124 121 std::fs::create_dir_all(&lib_dir)?;
125 122
126 - // Always overwrite oxwm.lua with the version from this binary
127 123 let oxwm_lua_template = include_str!("../../templates/oxwm.lua");
128 124 let oxwm_lua_path = lib_dir.join("oxwm.lua");
129 125 std::fs::write(&oxwm_lua_path, oxwm_lua_template)?;
130 126
131 - // Create/update .luarc.json for LSP configuration
132 127 let luarc_content = r#"{
133 128 "workspace.library": [
134 129 "lib"