dotfiles/linkdir.pl

34 lines
977 B
Perl
Raw Normal View History

2023-05-26 02:15:43 +00:00
#!/usr/bin/env perl
if ($< != 0) { die "Can't link dirs. Please re-run as root." }
my $conf =
"/home/nu/.config/";
my $git =
"/mnt/Storage/(500) Programming/598.\ Groups\ of\ smaller\ projects/dotfiles/";
my %confDirs = (
2023-06-27 00:52:06 +00:00
# `.conf` dir -> git repo dir
"alacritty" => "alacritty",
"awesome" => "awesome",
"omf" => "fish",
"picom" => "picom",
"rofi" => "rofi",
2023-07-18 02:24:56 +00:00
"Thunar" => "thunar",
"polybar" => "polybar"
);
my %otherDirs = (
"/home/nu/.var/app/com.discordapp.Discord/config/BetterDiscord/"
=> "discord"
2023-05-26 02:15:43 +00:00
);
# mount from %confDirs
2023-05-26 02:15:43 +00:00
while (my ($key, $value) = each %confDirs) {
`mount --bind "/home/nu/.config\/$key" "/mnt/Storage/(500) Programming/598. Groups of smaller projects/dotfiles\/$value"`
}
# mount from %otherDirs
while (my ($key, $value) = each %otherDirs) {
`mount --bind "$key" "/mnt/Storage/(500) Programming/598. Groups of smaller projects/dotfiles\/$value"`
}
2023-05-26 02:15:43 +00:00
print("Done!");