From e80ff15b8252a25390ef097dc2feea3078e05d4b Mon Sep 17 00:00:00 2001 From: kat witch Date: Wed, 24 Mar 2021 22:52:29 +0000 Subject: [PATCH] weechat-title! --- pkgs/default.nix | 4 ++++ pkgs/weechat-title/default.nix | 21 +++++++++++++++++++++ profiles/gui/home/weechat.nix | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 pkgs/weechat-title/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 29cfe0c5..abbd6771 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -27,6 +27,10 @@ let pkgs = self; }; + weechatScripts = super.weechatScripts // { + weechat-title = (super.callPackage ./weechat-title { }); + }; + screenstub = unstable.callPackage ./screenstub { }; kat-weather = super.callPackage ./kat-weather { }; diff --git a/pkgs/weechat-title/default.nix b/pkgs/weechat-title/default.nix new file mode 100644 index 00000000..cd72b537 --- /dev/null +++ b/pkgs/weechat-title/default.nix @@ -0,0 +1,21 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "title.py"; + version = "2011-11-15"; + sha256 = "1h8mxpv47q3inhynlfjm3pdjxlr2fl06z4cdhr06kpm8f7xvz56p"; + + src = fetchurl { + name = pname; + url = "https://weechat.org/files/scripts/title.py"; + sha256 = sha256; + }; + + unpackPhase = "true"; + + installPhase = '' + install -D $src $out/share/title.py + ''; + + passthru.scripts = [ pname ]; +} diff --git a/profiles/gui/home/weechat.nix b/profiles/gui/home/weechat.nix index 589ab603..09407516 100644 --- a/profiles/gui/home/weechat.nix +++ b/profiles/gui/home/weechat.nix @@ -30,6 +30,7 @@ vimode-git weechat-matrix weechat-notify-send + weechat-title ]; config = { weechat = { @@ -42,6 +43,10 @@ urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy"; plugins.var.python.vimode.copy_clipboard_cmd = "wl-copy"; plugins.var.python.vimode.paste_clipboard_cmd = "wl-paste --no-newline"; + plugins.var.python.title.title_prefix = "weechat - "; + plugins.var.python.title.show_hotlist = true; + plugins.var.python.title.current_buffer_suffix = " ["; + plugins.var.python.title.title_suffix = "]"; plugins.var.python.notify_send.icon = ""; sec = { crypt = {