https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mknod&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:59:14ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:ASUS_Zenbook_UX31E&diff=265501Talk:ASUS Zenbook UX31E2013-07-08T21:29:50Z<p>Mknod: /* Suspend to RAM */</p>
<hr />
<div>== Suspend to RAM ==<br />
huseyinkozan : Suspend to RAM does not work for me.<br />
is thus still the case for you? have you tried systemctl suspend ?<br />
<br />
== kernel 3.10 and wireless ==<br />
<br />
<br />
supposedly 3.10 fixes wireless can anyone confirm this?</div>Mknodhttps://wiki.archlinux.org/index.php?title=Talk:ASUS_Zenbook_UX31E&diff=265499Talk:ASUS Zenbook UX31E2013-07-08T21:27:41Z<p>Mknod: </p>
<hr />
<div>== Suspend to RAM ==<br />
huseyinkozan : Suspend to RAM does not work for me.<br />
<br />
<br />
== kernel 3.10 and wireless ==<br />
<br />
<br />
supposedly 3.10 fixes wireless can anyone confirm this?</div>Mknodhttps://wiki.archlinux.org/index.php?title=Fsniper&diff=246778Fsniper2013-02-08T06:19:14Z<p>Mknod: Added path tto example.conf</p>
<hr />
<div>[[Category:File systems]]<br />
Fsniper is a directory monitor that can be used to execute predefined actions on files that enter the monitored directory. This can, for example, be used to monitor your downloads folder and sort downloaded files automatically into your file system.<br />
<br />
Unlike cron jobs or bash scripts, fsniper uses [[Wikipedia:inotify|inotify]] to monitor file changes. This enable it to react immediately and efficiently to changes of the file system.<br />
<br />
== Installation ==<br />
[https://aur.archlinux.org/packages.php?ID=16677 Fsniper] is available from the [[AUR]].<br />
<br />
== Configuration ==<br />
<br />
Fsniper comes with a self-explanatory example.conf found in /usr/share/sniper/ that can be copied to {{Ic|~/.config/fsniper/config}} for modification and personalisation.<br />
watch {<br />
# watch the ~/drop directory for new files<br />
~/drop {<br />
# matches any mimetype beginning with image/<br />
image/* {<br />
# %% is replaced with the filename of the new file<br />
handler = echo found an image: %%<br />
}<br />
# matches any file ending with .extension<br />
*.extension {<br />
# the filename is added to the end of the handler line if %% is not present<br />
handler = echo glob handler 1: <br />
# the second handler will be run if the first exits with a return code of 1<br />
handler = echo glob handler 2: %%<br />
}<br />
# run handlers on files that match this regex<br />
/.*regex.*/ {<br />
handler = echo regex handler<br />
}<br />
# generic handler to catch files that nothing else did<br />
* {<br />
handler = mv %% ~/downloads/<br />
}<br />
}<br />
}<br />
<br />
Once configured, fsniper can be started by typing<br />
$ fsniper --daemon<br />
<br />
== Daemonizing ==<br />
<br />
Fsniper can also be started automatically at [[Arch Boot Process|boot]] time as an rc.d [[daemon]] by placing the following script as {{Ic|/etc/rc.d/fsniper}}:<br />
<br />
(Replace <your-user-name> with your user name(s))<br />
daemon_name=fsniper<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
USERS=( '<your-user-name>' )<br />
for USER in ${USERS[@]}<br />
do<br />
PID=$(pidof -o %PPID /usr/bin/fsniper)<br />
case "$1" in<br />
start)<br />
stat_busy "Starting $daemon_name"<br />
[ -z "$PID" ] && su -c "/usr/bin/fsniper --daemon" $USER<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
add_daemon fsniper<br />
stat_done<br />
fi<br />
;;<br />
stop)<br />
stat_busy "Stopping $daemon_name"<br />
[ ! -z "$PID" ] && kill $PID > /dev/null<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
rm_daemon fsniper<br />
stat_done<br />
fi<br />
;;<br />
restart)<br />
$0 stop<br />
sleep 1<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {start|stop|restart}"<br />
esac<br />
done<br />
exit 0<br />
<br />
The daemon can then be started by typing<br />
# rc.d start fsniper<br />
<br />
or by placing fsniper in the daemons section of your [[rc.conf|{{Ic|/etc/rc.conf}}]].</div>Mknod