summary refs log tree commit diff
path: root/pkgs/applications/window-managers/i3
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/window-managers/i3')
-rw-r--r--pkgs/applications/window-managers/i3/blocks-gaps.nix6
-rw-r--r--pkgs/applications/window-managers/i3/wsr.nix33
2 files changed, 36 insertions, 3 deletions
diff --git a/pkgs/applications/window-managers/i3/blocks-gaps.nix b/pkgs/applications/window-managers/i3/blocks-gaps.nix
index 9c97c72ad5d..df774aa417f 100644
--- a/pkgs/applications/window-managers/i3/blocks-gaps.nix
+++ b/pkgs/applications/window-managers/i3/blocks-gaps.nix
@@ -1,5 +1,5 @@
 { fetchFromGitHub, lib, stdenv, perl, makeWrapper
-, iproute, acpi, sysstat, alsaUtils
+, iproute2, acpi, sysstat, alsaUtils
 , scripts ? [ "bandwidth" "battery" "cpu_usage" "disk" "iface"
               "load_average" "memory" "volume" "wifi" ]
 }:
@@ -30,13 +30,13 @@ stdenv.mkDerivation rec {
 
   postFixup = ''
     wrapProgram $out/libexec/i3blocks/bandwidth \
-      --prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute)}
+      --prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute2)}
     wrapProgram $out/libexec/i3blocks/battery \
       --prefix PATH : ${makeBinPath (optional (elem "battery" scripts) acpi)}
     wrapProgram $out/libexec/i3blocks/cpu_usage \
       --prefix PATH : ${makeBinPath (optional (elem "cpu_usage" scripts) sysstat)}
     wrapProgram $out/libexec/i3blocks/iface \
-      --prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute)}
+      --prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute2)}
     wrapProgram $out/libexec/i3blocks/volume \
       --prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsaUtils)}
   '';
diff --git a/pkgs/applications/window-managers/i3/wsr.nix b/pkgs/applications/window-managers/i3/wsr.nix
new file mode 100644
index 00000000000..97da815b5d7
--- /dev/null
+++ b/pkgs/applications/window-managers/i3/wsr.nix
@@ -0,0 +1,33 @@
+{ lib, fetchFromGitHub, rustPlatform, libxcb, python3 }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "i3wsr";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "roosta";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1zpyncg29y8cv5nw0vgd69nywbj1ppxf6qfm4zc6zz0gk0vxy4pn";
+  };
+
+  cargoSha256 = "0snys419d32anf73jcvrq8h9kp1fq0maqcxz6ww04yg2jv6j47nc";
+
+  nativeBuildInputs = [ python3 ];
+  buildInputs = [ libxcb ];
+
+  # has not tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Automatically change i3 workspace names based on their contents";
+    longDescription = ''
+      Automatically sets the workspace names to match the windows on the workspace.
+      The chosen name for a workspace is a user-defined composite of the WM_CLASS X11
+      window property for each window in a workspace.
+    '';
+    homepage = "https://github.com/roosta/i3wsr";
+    license = licenses.mit;
+    maintainers = [ maintainers.sebbadk ];
+  };
+}