about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-05 23:21:23 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-05 23:21:23 +0200
commitba13c42ba85ac3973bbe77a8aa119a11083cb26c (patch)
tree1959f956386b6056ffbd4586e73747793cda2081 /pkgs
parent94494f352bbcfee518d620514ed3217dab6e6e84 (diff)
downloadpnpkgs-ba13c42ba85ac3973bbe77a8aa119a11083cb26c.tar.gz
pnpkgs-ba13c42ba85ac3973bbe77a8aa119a11083cb26c.zip
Add full larbs-scripts
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/larbs-scripts/bare.nix20
-rw-r--r--pkgs/larbs-scripts/cron.nix18
-rw-r--r--pkgs/larbs-scripts/default.nix12
-rw-r--r--pkgs/larbs-scripts/displayselect/wrapper.nix40
-rw-r--r--pkgs/larbs-scripts/i3cmds.nix18
-rw-r--r--pkgs/larbs-scripts/old/displayselect.nix (renamed from pkgs/larbs-scripts/displayselect.nix)0
-rw-r--r--pkgs/larbs-scripts/old/dmenumount.nix17
-rw-r--r--pkgs/larbs-scripts/old/dmenuunicode.nix (renamed from pkgs/larbs-scripts/dmenuunicode.nix)0
-rw-r--r--pkgs/larbs-scripts/old/linkhandler.nix18
-rw-r--r--pkgs/larbs-scripts/old/setbg.nix (renamed from pkgs/larbs-scripts/setbg.nix)0
-rw-r--r--pkgs/larbs-scripts/old/sysact.nix19
-rw-r--r--pkgs/larbs-scripts/statusbar.nix18
12 files changed, 136 insertions, 44 deletions
diff --git a/pkgs/larbs-scripts/bare.nix b/pkgs/larbs-scripts/bare.nix
new file mode 100644
index 0000000..05f27c9
--- /dev/null
+++ b/pkgs/larbs-scripts/bare.nix
@@ -0,0 +1,20 @@
+{ stdenv, callPackage }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "bare";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      for f in `ls -p ${voidrice}/.local/bin | grep -v /`; do
+        cp ${voidrice}/.local/bin/$f $out/bin
+      done
+    '';
+
+    meta = {
+      description = "bare";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }
diff --git a/pkgs/larbs-scripts/cron.nix b/pkgs/larbs-scripts/cron.nix
new file mode 100644
index 0000000..115e976
--- /dev/null
+++ b/pkgs/larbs-scripts/cron.nix
@@ -0,0 +1,18 @@
+{ stdenv, callPackage }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "cron";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp -r ${voidrice}/.local/bin/cron $out/bin
+    '';
+
+    meta = {
+      description = "cron";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }
diff --git a/pkgs/larbs-scripts/default.nix b/pkgs/larbs-scripts/default.nix
index b4e2c8a..ea4a62c 100644
--- a/pkgs/larbs-scripts/default.nix
+++ b/pkgs/larbs-scripts/default.nix
@@ -1,14 +1,18 @@
 { stdenv, callPackage, buildEnv }:
 with stdenv.lib;
 let
-  setbg = callPackage ./setbg.nix { };
-  displayselect = callPackage ./displayselect.nix { };
+  bare = callPackage ./bare.nix { };
+  cron = callPackage ./cron.nix { };
+  i3cmds = callPackage ./i3cmds.nix { };
+  statusbar = callPackage ./statusbar.nix { };
 in
   buildEnv {
     name = "larbs-scripts";
     paths = [
-      setbg
-      displayselect
+      bare
+      cron
+      i3cmds
+      statusbar
     ];
 
     meta = {
diff --git a/pkgs/larbs-scripts/displayselect/wrapper.nix b/pkgs/larbs-scripts/displayselect/wrapper.nix
deleted file mode 100644
index bcc051b..0000000
--- a/pkgs/larbs-scripts/displayselect/wrapper.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ stdenv, buildEnv, callPackage, lib, xrandr, libnotify, arandr }:
-
-displayselect:
-
-let
-
-  mapCase = options:
-  builtins.concatStringsSep "\n"
-  (builtins.map
-  (option: "\t\"${option}\") ${builtins.getAttr option options} ;;")
-  (builtins.attrNames options));
-
-  wrapper = { moreOptions ? {} }:
-  let
-    dmenu = callPackage ../../larbs/dmenu { };
-  in
-  buildEnv {
-    name = "displayselect-env";
-
-    paths = [
-      xrandr
-      arandr
-      libnotify
-      dmenu
-    ];
-
-    postBuild = ''
-      mkdir -p $out/bin
-      cp ${displayselect}/bin/displayselect $out/bin
-      echo ${mapCase moreOptions} >> $out/bin/test
-    '';
-
-
-    meta = {
-      description = "A fancy monitor configuration menu.";
-      homepage = "https://github.com/LukeSmithXYZ/voidrice";
-    };
-  };
-in
-  lib.makeOverridable wrapper
diff --git a/pkgs/larbs-scripts/i3cmds.nix b/pkgs/larbs-scripts/i3cmds.nix
new file mode 100644
index 0000000..71d950c
--- /dev/null
+++ b/pkgs/larbs-scripts/i3cmds.nix
@@ -0,0 +1,18 @@
+{ stdenv, callPackage }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "i3cmds";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp -r ${voidrice}/.local/bin/i3cmds $out/bin
+    '';
+
+    meta = {
+      description = "i3cmds";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }
diff --git a/pkgs/larbs-scripts/displayselect.nix b/pkgs/larbs-scripts/old/displayselect.nix
index 39cd6c0..39cd6c0 100644
--- a/pkgs/larbs-scripts/displayselect.nix
+++ b/pkgs/larbs-scripts/old/displayselect.nix
diff --git a/pkgs/larbs-scripts/old/dmenumount.nix b/pkgs/larbs-scripts/old/dmenumount.nix
new file mode 100644
index 0000000..11f066c
--- /dev/null
+++ b/pkgs/larbs-scripts/old/dmenumount.nix
@@ -0,0 +1,17 @@
+{ stdenv, callPackage, libnotify }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+  dmenu = callPackage ../dmenu { };
+in
+stdenv.mkDerivation {
+  name = "dmenumount";
+
+  src = voidrice;
+
+  installPhase = ''
+    mkdir -p $out/bin
+
+    sed -i "s:dmenu:${dmenu}/bin/dmenu:g" .local/bin/dmenumount
+    cp .local/bin/dmenumount $out/bin
+  '';
+}
diff --git a/pkgs/larbs-scripts/dmenuunicode.nix b/pkgs/larbs-scripts/old/dmenuunicode.nix
index 29070cf..29070cf 100644
--- a/pkgs/larbs-scripts/dmenuunicode.nix
+++ b/pkgs/larbs-scripts/old/dmenuunicode.nix
diff --git a/pkgs/larbs-scripts/old/linkhandler.nix b/pkgs/larbs-scripts/old/linkhandler.nix
new file mode 100644
index 0000000..ad451a6
--- /dev/null
+++ b/pkgs/larbs-scripts/old/linkhandler.nix
@@ -0,0 +1,18 @@
+{ stdenv, callPackage }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "linkhandler";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp ${voidrice}/.local/bin/linkhandler $out/bin/linkhandler
+    '';
+
+    meta = {
+      description = "Link handler";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }
diff --git a/pkgs/larbs-scripts/setbg.nix b/pkgs/larbs-scripts/old/setbg.nix
index 1988f29..1988f29 100644
--- a/pkgs/larbs-scripts/setbg.nix
+++ b/pkgs/larbs-scripts/old/setbg.nix
diff --git a/pkgs/larbs-scripts/old/sysact.nix b/pkgs/larbs-scripts/old/sysact.nix
new file mode 100644
index 0000000..b505746
--- /dev/null
+++ b/pkgs/larbs-scripts/old/sysact.nix
@@ -0,0 +1,19 @@
+{ stdenv, callPackage, slock }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "sysact";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp ${voidrice}/.local/bin/sysact $out/bin/sysact
+      sed -i "s:slock:${slock}/bin/slock:g" $out/bin/sysact
+    '';
+
+    meta = {
+      description = "Power menu. (shutdown, hibernate etc)";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }
diff --git a/pkgs/larbs-scripts/statusbar.nix b/pkgs/larbs-scripts/statusbar.nix
new file mode 100644
index 0000000..3067233
--- /dev/null
+++ b/pkgs/larbs-scripts/statusbar.nix
@@ -0,0 +1,18 @@
+{ stdenv, callPackage }:
+let
+  voidrice = callPackage ../voidrice.nix { };
+in
+  stdenv.mkDerivation {
+    name = "statusbar";
+    src = voidrice;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp -r ${voidrice}/.local/bin/statusbar $out/bin
+    '';
+
+    meta = {
+      description = "statusbar";
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+    };
+  }