[wiki] [sites] Move scripts into top level page || Aaron Marcher

From: <git_AT_suckless.org>
Date: Fri, 18 May 2018 11:40:51 +0200

commit 35e600eb713befcccaec9a6ff9108a9257c5d9c5
Author: Aaron Marcher <me_AT_drkhsh.at>
Date: Fri May 18 11:40:38 2018 +0200

    Move scripts into top level page

diff --git a/dwm.suckless.org/status_monitor/scripts/email_notifier_script/index.md b/dwm.suckless.org/status_monitor/email_notifier_script/index.md
similarity index 100%
rename from dwm.suckless.org/status_monitor/scripts/email_notifier_script/index.md
rename to dwm.suckless.org/status_monitor/email_notifier_script/index.md
diff --git a/dwm.suckless.org/status_monitor/index.md b/dwm.suckless.org/status_monitor/index.md
index 297849fd..eff4eb29 100644
--- a/dwm.suckless.org/status_monitor/index.md
+++ b/dwm.suckless.org/status_monitor/index.md
_AT_@ -11,6 +11,36 @@ It can be easily set and retrieved using standard Unix tools.
         xprop -root -notype -f WM_NAME "8u" \
                 | sed -n -r 's/WM_NAME = \"(.*)\"//p'
 
+Example shell scripts
+---------------------
+
+Return battery capacity percentage:
+
+ $(echo $(awk '/rem/ { print $3/89000 }' /proc/acpi/battery/BAT0/state| hoc| cut -c3,4)%
+
+Your battery may be called something different, so check /proc/acpi for its name. Also, change 89000 to whatever the capacity is for your battery. This returns the remaining battery power as a percentage.
+hoc comes from plan9port or 9base.
+
+Depending on your system, you can also use
+
+ cat /sys/class/power_supply/BAT0/capacity
+
+to get your battery status in percentage.
+
+Return the amount of ram used, in megabytes:
+
+ $(free -m |awk '/cache:/ { print $3"M" }')
+
+Return the temperature of the cpu, in degree celcius:
+
+ $(awk '{ print $2 }' /proc/acpi/thermal_zone/THM0/temperature)C
+
+Return volume:
+
+ amixer get Front | tail -n1 | awk '{ print $5 }' | tr -d []
+
+Change “Front” to your audio device
+
 Using shell scripts very well leads to big scripts, which pull in unneeded
 dependencies. One solution for this is to write everything in C, which is much
 more efficient.
_AT__AT_ -26,7 +56,7 @@ You can read more [on the project page](https://tools.suckless.org/slstatus/).
 User submitted versions
 -----------------------
 
-Please add your own version of dwmstatus here (keeping the list sorted).
+Feel free to add your own status monitors here (keeping the list sorted).
 
 * [barM](barM.c) - can display all, time/date, ram usage, output of commands (the New BarMonitor).
 * [dstat](https://www.umaxx.net/dl) [Screenshot](https://www.umaxx.net/dstat.png) - displays the current network throughput, CPU usage, performance settings, battery status, temperature, volume settings, as well as the current date and time (OpenBSD only, no support for Linux).
_AT_@ -35,13 +65,14 @@ Please add your own version of dwmstatus here (keeping the list sorted).
 * [dwmstat](https://notabug.org/kl3/dwmstat) - small and simple | IP, CPU temperature, system volume, current local time (and more) | config.h | OpenBSD
 * [go-dwmstatus](https://github.com/oniichaNj/go-dwmstatus) - A Go bar that prints current MPD song, load averages, time/date and battery percentage.
 * [gods](https://github.com/schachmat/gods) - implemented in Go. prints network speed, cpu, ram, date/time
+* [posix scripts](https://notabug.org/kl3/scripts) - basic collection of simple, fully POSIX sh compliant scripts to get various system information
 * [profil-dwmstatus-1.0.c](profil-dwmstatus-1.0.c) - cpufreq, battery percent and date/time
 * [suspend-statusbar.c](https://github.com/snobb/dwm-statusbar) - date, loadavg, battery and more. If battery goes below threshold - run suspend command
 
 Helper functions
 ----------------
 
-If you have simple C functions for gathering system information, please
+If you have simple C functions for gathering system information, feel free to
 add them here (keeping the list sorted).
 
 * [ACPI battery status on Linux](new-acpi-battery.c)
diff --git a/dwm.suckless.org/status_monitor/scripts/basic_collection/index.md b/dwm.suckless.org/status_monitor/scripts/basic_collection/index.md
deleted file mode 100644
index 04304d0e..00000000
--- a/dwm.suckless.org/status_monitor/scripts/basic_collection/index.md
+++ /dev/null
_AT_@ -1,9 +0,0 @@
-Scripts collection
-==================
-
-Description
------------
-
-A basic collection of simple, fully POSIX sh compliant scripts to get various
-system information among other useful things can be found at kl3's [scripts](https://notabug.org/kl3/scripts)
-repository. Feel free to copy, adapt and/or improve them.
diff --git a/dwm.suckless.org/status_monitor/scripts/simple_monitors/index.md b/dwm.suckless.org/status_monitor/scripts/simple_monitors/index.md
deleted file mode 100644
index fc4ed6f0..00000000
--- a/dwm.suckless.org/status_monitor/scripts/simple_monitors/index.md
+++ /dev/null
_AT_@ -1,46 +0,0 @@
-Simple Monitors
-===
-
-Description
----
-
-These are just very simple monitors for the dwm status bar.
-
-Battery
----
-
-Your battery may be called something different, so check /proc/acpi for its name. Also, change 89000 to whatever the capacity is for your battery.
-This returns the remaining battery power as a percentage.
-
-	$(echo $(awk '/rem/ { print $3/89000 }' /proc/acpi/battery/BAT0/state| hoc| cut -c3,4)%
-
-hoc comes from plan9port or 9base.
-
-Depending on your system, you can also use
-
-	cat /sys/class/power_supply/BAT0/capacity
-
-to get your battery status in percentage.
-
-Ram used
----
-
-Return the amount of ram used, in megabytes.
-
-        $(free -m |awk '/cache:/ { print $3"M" }')
-
-Temperature
----
-
-Returns the temperature of the cpu, in celcius.
-
-	$(awk '{ print $2 }' /proc/acpi/thermal_zone/THM0/temperature)C
-
-Volume
----
-
-	amixer get Front | tail -n1 | awk '{ print $5 }' | tr -d []
-
-Change "Front" to your audio device
-
-I told you they were simple.
Received on Fri May 18 2018 - 11:40:51 CEST

This archive was generated by hypermail 2.3.0 : Fri May 18 2018 - 11:48:22 CEST