summaryrefslogtreecommitdiffstats
path: root/.local/bin/shutup
blob: 47812bb764d7629495d5e08530c4b4d35e1a0468 (plain)
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
28
29
30
#!/usr/local/bin/perl

use strict;
use warnings;
use File::HomeDir qw(home);

use constant {
	DUNSTRC_PATH	=> home() . '/.config/dunst/dunstrc',
	NOTIFYSEND_PATH	=> '/usr/local/bin/notify-send'
};

sub main()
{
	my @lines;

	open(FH, '<', DUNSTRC_PATH) or die $!;
	@lines = do {
		local $/;
		<FH>
	};
	close(FH);
	open(FH, '>', home() . '/tmp') or die $!;
	print FH @lines;
	close(FH);
	return;
}

main();

__END__