about summary refs log tree commit diff
path: root/users/glittershark/system/home/modules/twitter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/system/home/modules/twitter.nix')
-rw-r--r--users/glittershark/system/home/modules/twitter.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/users/glittershark/system/home/modules/twitter.nix b/users/glittershark/system/home/modules/twitter.nix
new file mode 100644
index 000000000000..3cb2e90adc34
--- /dev/null
+++ b/users/glittershark/system/home/modules/twitter.nix
@@ -0,0 +1,23 @@
+{ pkgs, lib, ... }:
+
+{
+  home.packages = with pkgs; [
+    t
+  ];
+
+  home.sessionVariables = {
+    TWITTER_WHOAMI = "glittershark1";
+  };
+
+  programs.zsh = {
+    shellAliases = {
+      "mytl" = "t tl $TWITTER_WHOAMI";
+    };
+
+    functions = {
+      favelast = "t fave $(t tl -l $1 | head -n1 | cut -d' ' -f1)";
+      rtlast = "t rt $(t tl -l $1 | head -n1 | cut -d' ' -f1)";
+      tthread = "t reply $(t tl -l $TWITTER_WHOAMI | head -n1 | cut -d' ' -f1) $@";
+    };
+  };
+}