about summary refs log tree commit diff
path: root/pkgs/dwmblocks
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-14 08:59:26 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-14 08:59:26 +0100
commit2c628011e1a4389948491e0ed8903e03bdf45c31 (patch)
treece049e4cc22d7279b0013d8953df1af40ed05e93 /pkgs/dwmblocks
parentfb94b8f1860ba09d892ce7a85e6b90ac103ab410 (diff)
downloaddots-2c628011e1a4389948491e0ed8903e03bdf45c31.tar.gz
dots-2c628011e1a4389948491e0ed8903e03bdf45c31.zip
Add zsh config
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)"
+  ''