## Installation for dwm
```bash
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --with-x11
mkdir -p --mode=700 $HOME/.xmonad/icons
cp -r extra/xbm_icons/*.xbm $HOME/.xmonad/icons
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
# disable X11, point the location to the icons
Do the same for your cpu temperature, copy and paste the variable as is. **dev.cpu.0.temperature** below is provied as example.
```bash
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --with-x11 --without-alsa --with-oss mobo_sensor='dev.aibs.0' cpu_sensor='dev.cpu.0.temperature'
## pinky curses installation
```bash
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
# disable X11, enable the colours and ncurses opts.
The installation steps:
```bash
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --without-x11 --without-colours
.IP
.nf
\f[C]
-perl\ portable_sed.pl\ "distro"
+perl\ set.pl\ "distro"
autoreconf\ \-\-install\ \-\-force
\&./configure\ \-\-prefix=$HOME/.cache\ \-\-with\-x11
mkdir\ \-p\ \-\-mode=700\ $HOME/.xmonad/icons
cp\ \-r\ extra/xbm_icons/*.xbm\ $HOME/.xmonad/icons
-perl\ portable_sed.pl\ "distro"
+perl\ set.pl\ "distro"
autoreconf\ \-\-install\ \-\-force
#\ disable\ X11,\ point\ the\ location\ to\ the\ icons
.IP
.nf
\f[C]
-perl\ portable_sed.pl\ "distro"
+perl\ set.pl\ "distro"
autoreconf\ \-\-install\ \-\-force
\&./configure\ \-\-prefix=$HOME/.cache\ \-\-with\-x11\ \-\-without\-alsa\ \-\-with\-oss\ mobo_sensor=\[aq]dev.aibs.0\[aq]\ cpu_sensor=\[aq]dev.cpu.0.temperature\[aq]
.IP
.nf
\f[C]
-perl\ portable_sed.pl\ "distro"
+perl\ set.pl\ "distro"
autoreconf\ \-\-install\ \-\-force
#\ disable\ X11,\ enable\ the\ colours\ and\ ncurses\ opts.
.IP
.nf
\f[C]
-perl\ portable_sed.pl\ "distro"
+perl\ set.pl\ "distro"
autoreconf\ \-\-install\ \-\-force
\&./configure\ \-\-prefix=$HOME/.cache\ \-\-without\-x11\ \-\-without\-colours
@anchor{#installation-for-dwm}
@verbatim
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --with-x11
mkdir -p --mode=700 $HOME/.xmonad/icons
cp -r extra/xbm_icons/*.xbm $HOME/.xmonad/icons
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
# disable X11, point the location to the icons
@strong{dev.cpu.0.temperature} below is provied as example.
@verbatim
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --with-x11 --without-alsa --with-oss mobo_sensor='dev.aibs.0' cpu_sensor='dev.cpu.0.temperature'
@anchor{#pinky-curses-installation}
@verbatim
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
# disable X11, enable the colours and ncurses opts.
The installation steps:
@verbatim
-perl portable_sed.pl "distro"
+perl set.pl "distro"
autoreconf --install --force
./configure --prefix=$HOME/.cache --without-x11 --without-colours
my ($new) = @_;
my $filename = "configure.ac";
- my $derefs = re_read(\$filename);
- my @arr = split("\n", $$derefs);
+ my $refs = re_read(\$filename);
+ my @arr = split("\n", $$refs);
$arr[9] = $$new;
my $concatArr = join("\n", @arr);
}
sub reflace_many {
- my ($ag1,$ag2,$ag3,$ag4,$ag5,$ag6,$filename) = @_;
+ my ($arr,$filename) = @_;
my $derefFilename = $$filename;
my $concatArr = re_read(\$derefFilename);
- my $derefs = $$concatArr;
-
- $derefs =~ s/$ag1/$$ag2/g;
- $derefs =~ s/$ag3/$$ag4/g;
- $derefs =~ s/$ag5/$$ag6/g;
+ my @arr2 = @$arr;
+ my ($x,$arrLen,$derefs) = (0,$#arr2,$$concatArr);
+ for (; $x <= $arrLen; $x++) {
+ $derefs =~ s/${$arr2[$x][0]}/${$arr2[$x][1]}/g;
+ }
re_write(\$derefFilename,\$derefs);
return;
}
return;
}
-my ($amCF, $srcToAppend, $bsdLibs) = ("", "", "");
-my $osEntered = $ARGV[0] ? uc $ARGV[0] : die "No OS/Distro supplied.";
-my $srcMake = "src/Makefile.am";
-my $defTits = "m4_define([cuRos],[$osEntered])";
-my $bsdCF = "-D_DEFAULT_SOURCE -L/usr/local/lib";
-my $posixCF = "-D_POSIX_C_SOURCE=200112L";
-
-if ($osEntered eq "FREEBSD") {
- $bsdLibs = "-largp -ldevstat";
- $amCF = \$bsdCF;
- $defTits = "$defTits m4_define([FREEBZD], [tits])";
- $srcToAppend = "freebsd_functions.c include/freebzd.h";
-}
-elsif ($osEntered eq "OPENBSD") {
- $bsdLibs = "-largp -lossaudio";
- $amCF = \$bsdCF;
- $defTits = "$defTits m4_define([OPENBZD], [forSure])";
- $srcToAppend = "openbsd_functions.c include/openbzd.h";
+{
+ my ($amCF, $srcToAppend, $bsdLibs) = ("", "", "");
+ my $osEntered = $ARGV[0] ? uc $ARGV[0] : die "No OS/Distro supplied.";
+
+ my $srcMake = "src/Makefile.am";
+ my $defTits = "m4_define([cuRos],[$osEntered])";
+ my $bsdCF = "-D_DEFAULT_SOURCE -L/usr/local/lib";
+ my $posixCF = "-D_POSIX_C_SOURCE=200112L";
+ my ($amStr, $srcStr, $bsdStr) = ("{amCF}","{srcFiles}","{bzdlibs}");
+
+ if ($osEntered eq "FREEBSD") {
+ $bsdLibs = "-largp -ldevstat";
+ $amCF = \$bsdCF;
+ $defTits = "$defTits m4_define([FREEBZD], [tits])";
+ $srcToAppend = "freebsd_functions.c include/freebzd.h";
+ }
+ elsif ($osEntered eq "OPENBSD") {
+ $bsdLibs = "-largp -lossaudio";
+ $amCF = \$bsdCF;
+ $defTits = "$defTits m4_define([OPENBZD], [forSure])";
+ $srcToAppend = "openbsd_functions.c include/openbzd.h";
+ }
+ else {
+ $amCF = \$posixCF;
+ $defTits = "$defTits m4_define([LINUKS], [cryMeAriver])";
+ $srcToAppend = "linux_functions.c";
+ }
+
+ copy("src/Makefail.skel",$srcMake)
+ or die "Could not copy src/Makefail.skel $!";
+
+ reflace_configure(\$defTits);
+
+ my @hugeArr = (
+ [\$amStr, \$$amCF],
+ [\$srcStr, \$srcToAppend],
+ [\$bsdStr, \$bsdLibs]
+ );
+ reflace_many(\@hugeArr,\$srcMake);
}
-else {
- $amCF = \$posixCF;
- $defTits = "$defTits m4_define([LINUKS], [cryMeAriver])";
- $srcToAppend = "linux_functions.c";
-}
-
-copy("src/Makefail.skel",$srcMake)
- or die "Could not copy src/Makefail.skel $!";
-
-reflace_configure(\$defTits);
-reflace_many(
- "{amCF}", \$$amCF,
- "{srcFiles}", \$srcToAppend,
- "{bzdlibs}", \$bsdLibs,
- \$srcMake
-);