about summary refs log tree commit diff
path: root/users/grfn/system/home/modules/twitter.nix
blob: ab5647e418aae3195ad91caf8669f53db9cc585e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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) $@";
    };
  };
}