diff options
Diffstat (limited to '.local/bin/shutup')
-rwxr-xr-x | .local/bin/shutup | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/.local/bin/shutup b/.local/bin/shutup index d5d7b46..47812bb 100755 --- a/.local/bin/shutup +++ b/.local/bin/shutup @@ -2,15 +2,26 @@ use strict; use warnings; -use File::HomeDir qw(home) +use File::HomeDir qw(home); use constant { - DUNSTRC_PATH => home() . '/.config/dunst/dunstrc' + 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; } |