about summary refs log tree commit diff
path: root/users/aspen/system/home/modules/twitter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/aspen/system/home/modules/twitter.nix')
-rw-r--r--users/aspen/system/home/modules/twitter.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/users/aspen/system/home/modules/twitter.nix b/users/aspen/system/home/modules/twitter.nix
new file mode 100644
index 000000000000..ab5647e418aa
--- /dev/null
+++ b/users/aspen/system/home/modules/twitter.nix
@@ -0,0 +1,27 @@
+{ pkgs, lib, ... }:
+
+{
+  imports = [
+    ./lib/zshFunctions.nix
+  ];
+
+  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) $@";
+    };
+  };
+}