summaryrefslogtreecommitdiff
path: root/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'overlays')
-rw-r--r--overlays/nerdfonts.nix5
-rw-r--r--overlays/pidgin.nix20
-rw-r--r--overlays/urxvt/52-osc.pl41
-rw-r--r--overlays/urxvt/default.nix21
4 files changed, 87 insertions, 0 deletions
diff --git a/overlays/nerdfonts.nix b/overlays/nerdfonts.nix
new file mode 100644
index 00000000..28581d72
--- /dev/null
+++ b/overlays/nerdfonts.nix
@@ -0,0 +1,5 @@
1final: prev: {
2 nerdfonts = prev.nerdfonts.override {
3 fonts = ["FiraMono" "FiraCode"];
4 };
5}
diff --git a/overlays/pidgin.nix b/overlays/pidgin.nix
new file mode 100644
index 00000000..09103ade
--- /dev/null
+++ b/overlays/pidgin.nix
@@ -0,0 +1,20 @@
1final: prev:
2prev.lib.composeManyExtensions [
3 (final: prev:
4 let
5 mucHistory = prev.fetchpatch {
6 url = "https://developer.pidgin.im/raw-attachment/ticket/16524/0001-only-request-unseed-chat-history-from-jabber-group-c.patch";
7 sha256 = "083wvmq7417xz55fxxhllqwql1hgjvin2sak08844121yw1jvc44";
8 };
9 in {
10 pidgin = prev.pidgin.overrideAttrs (oldAttrs: {
11 patches = (oldAttrs.patches or []) ++ [mucHistory];
12 });
13 })
14 (final: prev: {
15 pidgin-with-plugins = import (/. + prev.path + "/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix") {
16 inherit (prev) makeWrapper symlinkJoin pidgin;
17 plugins = with final; [ purple-lurch pidgin-carbons pidgin-opensteamworks pidgin-xmpp-receipts ];
18 };
19 })
20] final prev
diff --git a/overlays/urxvt/52-osc.pl b/overlays/urxvt/52-osc.pl
new file mode 100644
index 00000000..3292e8c4
--- /dev/null
+++ b/overlays/urxvt/52-osc.pl
@@ -0,0 +1,41 @@
1#! perl
2
3=head1 NAME
4
552-osc - Implement OSC 32 ; Interact with X11 clipboard
6
7=head1 SYNOPSIS
8
9 urxvt -pe 52-osc
10
11=head1 DESCRIPTION
12
13This extension implements OSC 52 for interacting with system clipboard
14
15Most code stolen from:
16http://ailin.tucana.uberspace.de/static/nei/*/Code/urxvt/
17
18=cut
19
20use MIME::Base64;
21use Encode;
22
23sub on_osc_seq {
24 my ($term, $op, $args) = @_;
25 return () unless $op eq 52;
26
27 my ($clip, $data) = split ';', $args, 2;
28 if ($data eq '?') {
29 # my $data_free = $term->selection();
30 # Encode::_utf8_off($data_free); # XXX
31 # $term->tt_write("\e]52;$clip;".encode_base64($data_free, '')."\a");
32 }
33 else {
34 my $data_decoded = decode_base64($data);
35 Encode::_utf8_on($data_decoded); # XXX
36 $term->selection($data_decoded, $clip =~ /c|^$/);
37 $term->selection_grab(urxvt::CurrentTime, $clip =~ /c|^$/);
38 }
39
40 ()
41}
diff --git a/overlays/urxvt/default.nix b/overlays/urxvt/default.nix
new file mode 100644
index 00000000..3c57d000
--- /dev/null
+++ b/overlays/urxvt/default.nix
@@ -0,0 +1,21 @@
1final: prev: {
2 rxvt_unicode-with-plugins = prev.rxvt-unicode.override {
3 configure = { availablePlugins, ... }: {
4 plugins = [ final.urxvt_osc_52 ] ++ builtins.attrValues availablePlugins;
5 };
6 };
7 urxvt_osc_52 = prev.stdenv.mkDerivation {
8 name = "rxvt_unicode-osc_52-0";
9 src = ./52-osc.pl;
10 unpackPhase = ''
11 cp $src 52-osc
12 '';
13 buildPhase = ''
14 sed -i 's|#! perl|#! ${final.perl}/bin/perl|g' 52-osc
15 '';
16 installPhase = ''
17 mkdir -p $out/lib/urxvt/perl
18 cp 52-osc $out/lib/urxvt/perl
19 '';
20 };
21}