about summary refs log tree commit diff
path: root/pkgs/dwmblocks
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/dwmblocks')
-rw-r--r--pkgs/dwmblocks/default.nix7
-rw-r--r--pkgs/dwmblocks/dwmblocks-todo.diff12
-rw-r--r--pkgs/dwmblocks/dwmblocks.diff15
-rw-r--r--pkgs/dwmblocks/dwmblocks.diff.old26
-rw-r--r--pkgs/dwmblocks/todos.nix10
5 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/dwmblocks/default.nix b/pkgs/dwmblocks/default.nix
new file mode 100644
index 0000000..ad749a4
--- /dev/null
+++ b/pkgs/dwmblocks/default.nix
@@ -0,0 +1,7 @@
+pkgs:
+  pkgs.nur.repos.pn.dwmblocks.override {
+    patches = [
+      ./dwmblocks.diff
+      ./dwmblocks-todo.diff
+    ];
+  }
diff --git a/pkgs/dwmblocks/dwmblocks-todo.diff b/pkgs/dwmblocks/dwmblocks-todo.diff
new file mode 100644
index 0000000..8615cf8
--- /dev/null
+++ b/pkgs/dwmblocks/dwmblocks-todo.diff
@@ -0,0 +1,12 @@
+diff --git a/config.h b/config.h
+index cc9281b..7242149 100644
+--- a/config.h
++++ b/config.h
+@@ -1,6 +1,7 @@
+ //Modify this file to change what commands output to your statusbar, and recompile using the make command.
+ static const Block blocks[] = {
+ 	/*Icon*/	/*Command*/		/*Update Interval*/	/*Update Signal*/
++  {"", "todos", 800, 19},
+ 	{"", "cat /tmp/recordingicon 2>/dev/null",	0,	9},
+ 	/* {"",	"music",	0,	11},*/
+ 	{"",	"pacpackages",	0,	8},
diff --git a/pkgs/dwmblocks/dwmblocks.diff b/pkgs/dwmblocks/dwmblocks.diff
new file mode 100644
index 0000000..4274c90
--- /dev/null
+++ b/pkgs/dwmblocks/dwmblocks.diff
@@ -0,0 +1,15 @@
+diff --git a/config.h b/config.h
+index cc9281b..3df46fc 100644
+--- a/config.h
++++ b/config.h
+@@ -5,11 +5,11 @@ static const Block blocks[] = {
+ 	/* {"",	"price btc Bitcoin 💰",				0,	21}, */
+ 	/* {"",	"price lbc \"LBRY Token\" 📚",			0,	22}, */
+ 	{"",	"torrent",	20,	7},
+-	/* {"",	"memory",	10,	14}, */
+-	/* {"",	"cpu",		10,	18}, */
++	{"",	"memory",	10,	14},
++	{"",	"cpu",		10,	18},
+ 	/* {"",	"moonphase",	18000,	17}, */
+ 	{"",	"weather",	18000,	5},
+ 	{"",	"mailbox",	180,	12},
diff --git a/pkgs/dwmblocks/dwmblocks.diff.old b/pkgs/dwmblocks/dwmblocks.diff.old
new file mode 100644
index 0000000..ad22dac
--- /dev/null
+++ b/pkgs/dwmblocks/dwmblocks.diff.old
@@ -0,0 +1,26 @@
+diff --git a/config.h b/config.h
+index cc9281b..3df46fc 100644
+--- a/config.h
++++ b/config.h
+@@ -10,17 +10,17 @@ static const Block blocks[] = {
+ 	/* {"",	"price btc Bitcoin 💰",				0,	21}, */
+ 	/* {"",	"price lbc \"LBRY Token\" 📚",			0,	22}, */
+ 	{"",	"torrent",	20,	7},
+-	/* {"",	"memory",	10,	14}, */
+-	/* {"",	"cpu",		10,	18}, */
++	{"",	"memory",	10,	14},
++	{"",	"cpu",		10,	18},
+ 	/* {"",	"moonphase",	18000,	17}, */
+ 	{"",	"weather",	18000,	5},
+ 	{"",	"mailbox",	180,	12},
+-	/* {"",	"nettraf",	1,	16}, */
++	{"",	"nettraf",	1,	16},
+ 	{"",	"volume",	0,	10},
+ 	{"",	"battery",	5,	3},
+ 	{"",	"clock",	60,	1},
+ 	{"",	"internet",	5,	4},
+-	{"",	"help-icon",	0,	15},
++	/* {"",	"help-icon",	0,	15}, */
+ };
+ 
+ //Sets delimiter between status commands. NULL character ('\0') means no delimiter.
diff --git a/pkgs/dwmblocks/todos.nix b/pkgs/dwmblocks/todos.nix
new file mode 100644
index 0000000..510ff7e
--- /dev/null
+++ b/pkgs/dwmblocks/todos.nix
@@ -0,0 +1,10 @@
+pkgs:
+  pkgs.writeScriptBin "todos" ''
+    #!${pkgs.stdenv.shell}
+    case $BLOCK_BUTTON in
+      1) notify-send "Tasks" "\n$(todoist l | cut -d\  -f5- | sed 's/^/* /')" ;;
+	    6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+    esac
+
+    echo "✅$(todoist list | wc -l)"
+  ''