DWL environment updates

This commit is contained in:
2021-05-29 15:40:00 -07:00
parent 3adcb1e58b
commit f395651a46
6 changed files with 49 additions and 36 deletions

View File

@@ -8,8 +8,7 @@ use FileHandle;
use Getopt::Long;
my $info = {};
my $tags_file = $ENV{'DWLTAGS_FILE'};
my $log_file = $ENV{'XDG_RUNTIME_DIR'} . "/dwl.log";
my $tags_file = $ENV{'DWL_TAGS_FILE'};
GetOptions("file=s" => \$tags_file)
or die("Command line usage error");
@@ -133,7 +132,7 @@ sub dzen_colored {
sub print_log {
my ($line) = @_;
my $fh = FileHandle->new(">> " . $ENV{'XDG_RUNTIME_DIR'} . "/dwl.log");
my $fh = FileHandle->new(">> " . $ENV{'DWL_LOG_FILE'});
if (defined $fh) {
print $fh $line . "\n";
$fh->close;