Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 22 Aug 2014, 09:49
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
simple icon tray
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 8 [116 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
boscobearbank


Joined: 06 Apr 2006
Posts: 63
Location: MN

PostPosted: Sun 23 Sep 2012, 17:15    Post subject:  

Technosaurus: The code below may not be pretty, but it does what I need it to do, thanks to sit-1.0. Thanks.
Code:
#!/usr/bin/python

""" A very, very simple front-end for ffmpeg to capture screencasts
    Capture area begins in upper-left corner of screen
    Size of capture area is user-definable
    Frame rate is fixed at 25 fps
    Output resolution = input resolution
    No audio
    Output file is user-specified (except for container type
    Container type = Matroska
    Cludged together by RockDoctor
    Version 1  23-Sep-2012
"""

from gi.repository import Gtk
import os, signal, sys, subprocess

process = 'ffmpeg'
kill_sig = signal.SIGINT
mycmd = ''

# ======================================================================
def process_killer():

  l_process = len(process)
  for line in os.popen('ps ax'):
    fields = line.split()
    if fields[4][0:l_process]==process:
      pid_of_process = int(fields[0])
      print (pid_of_process)
      os.kill(pid_of_process, kill_sig)

# ======================================================================
class SitApp:
  """
  an adaptation and butchering of technosaurus's sit.c
  adapted by RockDoctor
  """

  def __init__(self):
    si = Gtk.StatusIcon.new_from_stock("gtk-stop")
    si.set_tooltip_text("Click to stop recording")
    si.connect("activate",self.leftClick,process_killer)
    si.connect("popup-menu",self.rightClick,process_killer)
    Gtk.main()

  def leftClick(self, status_icon, action):
    #print ("Interrupting ",process)
    action()
    #print ("Left-click")
    sys.exit()


  def rightClick(self, status_icon, button, mytime, action):
    #print ("Interrupting "+str(process)+"  button="+str(button)+"  time="+str(mytime)+"\n")
    action()
    #print ("Right-click")
    sys.exit()

# ======================================================================
class ScreenRecorder:
  """ A very simple screencast recorder
      Original command:
      ffmpeg -f x11grab -s 840x525 -r 25 -i :0.0 -threads 0 -sameq -an  /home/a/Desktop/video.mkv 2>/dev/null
  """
  def __init__(self):

    self.i_params = {}
    self.o_params = {}
    self.i_params['f'] = 'x11grab' # input from X11 screen
    self.i_params['s'] = '802x514' # input frame size
    self.i_params['r'] = '25'    # input file frame rate
    self.i_params['i'] = ':0.0'  # input file (or stream)

    self.o_params['threads'] = '0'
    self.o_params['sameq'] = ''  # same quality in encoder as in decoder
    self.o_params['an'] = ''     # disable audio recording

    self.outfile_name =  '/home/a/Desktop/video'
    self.outfile_extension = '.mkv'

    # I'm only going to permit modification of a limited number of the
    # above parameters (which are a very limited number of the
    # parameters available to ffmpeg for screen recording)

    w = Gtk.Window(title = "Screen Capture via FFMPEG")
    w.connect('destroy', Gtk.main_quit)
    w.set_default_size(400,300)
    vbox = Gtk.VBox(spacing=15)

    grid = Gtk.Grid()
    grid.set_row_spacing(3)
    grid.set_column_spacing(3)

    btn = Gtk.Button()
    btn.set_label("Frame Size: ")
    btn.set_alignment(0,0.5)
    btn.set_relief(Gtk.ReliefStyle.NONE)
    grid.attach(btn,0,0,1,1)
    s_entry = Gtk.Entry()
    s_entry.set_text(self.i_params['s'])
    grid.attach(s_entry,1,0,1,1)

    btn = Gtk.Button()
    btn.set_label("Output filename (w/o extension):")
    btn.set_alignment(0,0.5)
    btn.set_relief(Gtk.ReliefStyle.NONE)
    grid.attach(btn,0,1,1,1)
    f_entry = Gtk.Entry()
    f_entry.set_text(self.outfile_name)
    grid.attach(f_entry,1,1,1,1)

    btn = Gtk.Button(stock='gtk-execute')
    btn.connect('clicked', self.start_ffmpeg)
    grid.attach(btn,0,2,2,1)

    vbox.pack_start(grid, False, False, 0)
    w.add(vbox)
    self.w = w
    self.w.show_all()

    Gtk.main()

  def start_ffmpeg(self, widget):
    my_cmd = 'ffmpeg -f x11grab -s '+self.i_params['s']+' -r 25 -i :0.0 -threads 0 -sameq -an  '+self.outfile_name+'.mkv'
    self.w.hide()
    command = my_cmd.split()
    try:
      subprocess.Popen(['rm',self.outfile_name+'.mkv'])
    except:
      pass
    subprocess.Popen(command)
    Gtk.main_quit()

# ======================================================================
def main(data=None):
    app2 = ScreenRecorder()
    app1 = SitApp()

if __name__ == '__main__':
    main()



_________________
Bosco Bearbank
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 24 Sep 2012, 01:07    Post subject:  

I just updated some stuff and broke the old api:

startup will fail verbosely if an image does not stat
replaced popen with g_spawn_command_line_async (now you can get streamed output from your left/right click action helpers)
this also means it should now be 100% portable to non-posix systems
added tooltips from file, falls back to the argument if file does not stat
tooltips will automatically update if the file changes
no tooltip is set if "" is passed
no callbacks are issued for right/leftclick if the command is "" (NULL)
    usage:
    sit image [tooltip_file] [left_action] [right_action] ... \
    image ["tooltip text"] [left_action] [right_action] ... \
    ... this may be repeated for an unlimited number of icons

Code:
#include <gtk/gtk.h>

void leftclick(GtkStatusIcon *si, gpointer s){
   g_spawn_command_line_async(s,NULL);
}

void rightclick(GtkStatusIcon *si, guint b,guint a_t, gpointer s){
   g_spawn_command_line_async(s,NULL);
}

/** refreshes the status icon image from file if it changes */
void refresh(GFileMonitor *monitor, GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_from_file(si,g_file_get_path(file));
}

/** gets a new mouse over tooltip from file if it changes */
void updatetooltip(GFileMonitor *monitor,   GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(g_file_get_path(file), FALSE, NULL)));
}

int main(int argc, char *argv[]){
   GtkStatusIcon *si;
   char i=1;
gtk_init (&argc, &argv);
if ( argc < 2 ) {
   g_printerr("usage:\n%s /path/to/image /path/to/tooltip left-action right-action ...\n",argv[0]);
   return 1;
}
/** loop through icon, tooltip, click messages **/
while (i<argc){
/** status icon **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   si = gtk_status_icon_new_from_file(argv[i]);
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i++]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(refresh),(gpointer) si);
}else{
   g_printerr("error: could not stat file %s\n",argv[i]);
   return 2;
}
/** tooltip **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(argv[i], FALSE, NULL)));
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i++]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(updatetooltip),(gpointer) si);
}else{
   if (argv[i]!=NULL) gtk_status_icon_set_tooltip_text(si, argv[i]);
   ++i;
}
/** left click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "activate", G_CALLBACK(leftclick),(gpointer) argv[i]);
++i;
/** right click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "popup-menu", G_CALLBACK(rightclick), (gpointer) argv[i]);
++i;
}
gtk_main();
}
sit.tar.gz
Description 
gz

 Download 
Filename  sit.tar.gz 
Filesize  1.99 KB 
Downloaded  280 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Mon 24 Sep 2012, 20:30    Post subject:  

technosaurus,

Some nice updates here.

I especially liked the tooltips from a file idea, but I couldn't get that to work (perhaps I'm invoking the line wrong
Code:
 sit /usr/share/pixmaps/group-chat.png /root/tooltip_file


Also tried the filename with double quotes.

Thanks and regards,
s
(Also got a "seg fault" and no useage info if just "sit" on command line)
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 24 Sep 2012, 22:26    Post subject:  

the file needs to exist when sit starts (it checks if it exists,so that the file monitor works), otherwise your tooltip will be that arg value "/root/tooltip_file" which will be unchangeable (which is perfectly normal for most situations) - it basically just lets you do things like update the network statistics as in the network monitor applet

Edit: I still need to update the original post, use my last binary from this post:
http://www.murga-linux.com/puppy/viewtopic.php?p=654170#654170

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Mon 24 Sep 2012, 23:12    Post subject:  

technosaurus,

I forgot I had the older copy of sit in the path when I tried it.

All works well as described. Great work as usual.

Thanks,
S
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Tue 25 Sep 2012, 02:14    Post subject:  

one change to note:
now that I don't use popen, in order to run a bash function on a left/right click action, you would need to use "sh -c my_function" ... after exporting the function (bashism)

simple example:
Code:
#!/bin/sh
snaptool(){
mtpaintsnapshot.sh
}
export -f snaptool
sit /usr/share/mini-icons/mini-camera.xpm "Left click to take an immediate snapshot
Right click to open a snapshot dialog" "mtpaint -s" "sh -c snaptool"

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Tue 25 Sep 2012, 07:14    Post subject:  

Too tired to do anything but post the new code adding sourced function support from /usr/share/sit/functions*

Code:
#include <gtk/gtk.h>

void leftclick(GtkStatusIcon *si, gpointer s){
   if (!g_spawn_command_line_async(s,NULL)) {
      gchar *buf=g_strdup_printf("for x in /usr/share/sit/functions*; do . $x; done ; %s",s);
      popen(buf,"r");
      g_free(buf);
   }

}

void rightclick(GtkStatusIcon *si, guint b,guint a_t, gpointer s){
   if (!g_spawn_command_line_async(s,NULL)) {
      gchar *buf=g_strdup_printf("for x in /usr/share/sit/functions*; do . $x; done ; %s",s);
      popen(buf,"r");
      g_free(buf);
   }
}

/** refreshes the status icon image from file if it changes */
void refresh(GFileMonitor *monitor, GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_from_file(si,g_file_get_path(file));
}

/** gets a new mouse over tooltip from file if it changes */
void updatetooltip(GFileMonitor *monitor,   GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(g_file_get_path(file), FALSE, NULL)));
}

int main(int argc, char *argv[]){
   GtkStatusIcon *si;
   char i=1;
gtk_init (&argc, &argv);
if ( argc < 2 ) {
   g_printerr("usage:\n%s /path/to/image /path/to/tooltip left-action right-action ...\n",argv[0]);
   return 1;
}
/** loop through icon, tooltip, click messages **/
while (i<argc){
/** status icon **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   si = gtk_status_icon_new_from_file(argv[i]);
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i++]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(refresh),(gpointer) si);
}else{
   g_printerr("error: could not stat file %s\n",argv[i]);
   return 2;
}
/** tooltip **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(argv[i], FALSE, NULL)));
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i++]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(updatetooltip),(gpointer) si);
}else{
   if (argv[i]!=NULL) gtk_status_icon_set_tooltip_text(si, argv[i]);
   ++i;
}
/** left click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "activate", G_CALLBACK(leftclick),(gpointer) argv[i]);
++i;
/** right click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "popup-menu", G_CALLBACK(rightclick), (gpointer) argv[i]);
++i;
}
gtk_main();
}

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 25 Sep 2012, 12:08    Post subject:  

technosaurus,

Thanks for your improvements.

Working beautifully not having to do the "export -sh" part.

Best regards,
s
Back to top
View user's profile Send private message 
lobo115

Joined: 06 May 2010
Posts: 11

PostPosted: Tue 25 Sep 2012, 14:54    Post subject: USB  

Hello, i want know if seaside, could make USB work?

in my pc only works sit 1, sit 2, and 3 doesn't work. Thankz for your great job.
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 25 Sep 2012, 22:04    Post subject: Re: USB  

lobo115 wrote:
Hello, i want know if seaside, could make USB work?

in my pc only works sit 1, sit 2, and 3 doesn't work. Thankz for your great job.


lobo115,

I have tested sit using Racy-5.3 booted from a usb and it works.

Cheers,
s
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Wed 26 Sep 2012, 02:46    Post subject:  

OK, enough with the alpha versions and on with the release candidates.

Code:
./sit [-i files] image tooltip left-action right-action ...

  -i           full path to file(s) with shell functions to include
                   by default it looks in /usr/share/sit/functions*
  image        full path to image file
  tooltip      full path to tooltip file or a "quoted tooltip"
  left-action  action to run when left mouse button is clicked
  right-action action to run when right mouse button is clicked


Code:
#include <gtk/gtk.h>
gchar *incfiles="/usr/share/sit/functions*";

static void run(gpointer s){
   if (!g_spawn_command_line_async(s,NULL)) {
      gchar *buf=g_strdup_printf("for x in %s; do . $x; done ; %s",incfiles,s);
      popen(buf,"r");
      g_free(buf);
   }
}

static void leftclick(GtkStatusIcon *si, gpointer s){
   run(s);
}

static void rightclick(GtkStatusIcon *si, guint b,guint a_t, gpointer s){
   run(s);
}

/** refreshes the status icon image from file if it changes */
static void refresh(GFileMonitor *monitor, GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_from_file(si,g_file_get_path(file));
}

/** gets a new mouse over tooltip from file if it changes */
static void updatetooltip(GFileMonitor *monitor,   GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer si){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(g_file_get_path(file), FALSE, NULL)));
}

int main(int argc, char *argv[]){
   GtkStatusIcon *si;
   char i=1;
gtk_init (&argc, &argv);
if ((argc>1)&&(argv[i][0]=='-')&&(argv[i++][1]=='i')) incfiles=argv[i++];
if ( argc < i+1 ) {
   g_printerr(
   "usage:\n%s [-i files] image tooltip left-action right-action ...\n\n" \
   "  -i           full path to file(s) with shell functions to include\n" \
   "                   by default it looks in /usr/share/sit/functions*\n"
   "  image        full path to image file\n" \
   "  tooltip      full path to tooltip file or a \"quoted tooltip\"\n" \
   "  left-action  action to run when left mouse button is clicked\n" \
   "  right-action action to run when right mouse button is clicked\n\n" \
   ,argv[0]);
   return 1;
}
/** loop through icon, tooltip, click messages **/
while (i<argc){
/** status icon **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   si = gtk_status_icon_new_from_file(argv[i]);
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i++]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(refresh),(gpointer) si);
}else{
   g_printerr("error: could not stat file %s\n",argv[i]);
   return 2;
}
/** tooltip **/
if (g_file_test(argv[i], G_FILE_TEST_EXISTS)){
   gtk_status_icon_set_tooltip_text(si, g_mapped_file_get_contents(g_mapped_file_new(argv[i], FALSE, NULL)));
   g_signal_connect(g_file_monitor_file(g_file_new_for_path(argv[i]), G_FILE_MONITOR_NONE, FALSE, NULL),
      "changed", G_CALLBACK(updatetooltip),(gpointer) si);
}else if (argv[i]!=NULL) gtk_status_icon_set_tooltip_text(si, argv[i]);
++i;
/** left click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "activate", G_CALLBACK(leftclick),(gpointer) argv[i]);
++i;
/** right click action **/
if (argv[i]!=NULL) g_signal_connect(G_OBJECT(si), "popup-menu", G_CALLBACK(rightclick), (gpointer) argv[i]);
++i;
}
gtk_main();
}
sit-1.0.pet
Description 
pet

 Download 
Filename  sit-1.0.pet 
Filesize  2.75 KB 
Downloaded  293 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
lobo115

Joined: 06 May 2010
Posts: 11

PostPosted: Wed 26 Sep 2012, 14:09    Post subject: Re: USB  

seaside wrote:

I have tested sit using Racy-5.3 booted from a usb and it works.

Cheers,
s

hello, Thankz for your answer Very Happy , but i want know if you could do this:
seaside wrote:
technosaurus,

I was wondering if it were possible to extend the inotify aspect to include monitoring for usb drive additions and removals.

Regards,
s

Thank you

and technosaurus, first of all thankz for your great job, i want know, if new sit 1.0 doesn't work with your first example script ?. I mean the script that is in the second post, the one that beging with Here is the beginning of the applet suite - a drive tray for the tray
ThZ
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Wed 26 Sep 2012, 17:44    Post subject:  

I haven't been working on the drive stuff, but the biggest difference is that now it needs an extra parameter for a tooltip (mouse-over message) after the icon, but before the click actions. This is a good place to put what each mouse button does or any useful information - this can be a path to a text file that you can update or an unchangeable string

Here is the svg code for an network transmit/receive app:
path1 is for receive, path2 is for transmit
Code:
<svg width="48" height="48" id="svg1" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="/usr/share/midi-icons/www48.png" width="48" height="48" id="image1"/>
   <path id="path1" style="fill:#00FF00;fill-opacity:0.6;stroke-width:0;"
      d="M 46.5,17.8 L 36.8,29.0 L 27.2,17.8 L 32.1,17.8 C 33.7,13.4
      30.4,10.6 26.5,10.6 C 23.7,10.6 19.9,12.1 18.6,15.9 C 18.0,17.9
      16.8,17.0 16.8,15.3 C 17.0,8.7 21.9,3.4 29.3,3.4 C 36.6,3.4
      42.1,9.1 41.7,17.8 L 46.5,17.8 z" />
   <path id="path2" style="fill:#00FF00;fill-opacity:0.6;stroke-width:0;"
      d="M 1.5,30.2 L 11.2,19.0 L 20.8,30.2 L 15.9,30.2 C 14.3,34.6
      17.6,37.4 21.5,37.4 C 24.3,37.4 28.1,35.9 29.4,32.1 C 30.0,30.1
      31.2,31.0 31.2,32.7 C 31.0,39.3 26.1,44.6 18.7,44.6 C 11.4,44.6
      5.9,38.9 6.3,30.2 L 1.5,30.2 z" />
</svg>


and a very basic implementation with no calculations or anything like some existing ones do (should be easy enough to add though):
Code:
#!/bin/ash
while :; do
NETSVG='<svg width="48" height="48" id="svg1" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="/usr/share/midi-icons/www48.png" width="48" height="48" id="image1"/>'
while read IFACE RBYTES RPACKS RERRS RDROP RFIFO RFRAM RCOMP RMULTI TBYTES TPACKS TERRS TDROP TFIFO TCOLLS TCAR TCOMP
do
case $IFACE in
   eth*|wlan*)[ $RBYTES -gt ${LASTRBYTES:-0} ] && LASTRBYTES=$RBYTES && \
   NETSVG=$NETSVG'<path id="path1" style="fill:#00FF00;fill-opacity:0.6;stroke-width:0;"
      d="M 46.5,17.8 L 36.8,29.0 L 27.2,17.8 L 32.1,17.8 C 33.7,13.4
      30.4,10.6 26.5,10.6 C 23.7,10.6 19.9,12.1 18.6,15.9 C 18.0,17.9
      16.8,17.0 16.8,15.3 C 17.0,8.7 21.9,3.4 29.3,3.4 C 36.6,3.4
      42.1,9.1 41.7,17.8 L 46.5,17.8 z" />'
   [ $TBYTES -gt ${LASTTBYTES:-0} ] && LASTTBYTES=$TBYTES && \
   NETSVG=$NETSVG'<path id="path2" style="fill:#00FF00;fill-opacity:0.6;stroke-width:0;"
      d="M 1.5,30.2 L 11.2,19.0 L 20.8,30.2 L 15.9,30.2 C 14.3,34.6
      17.6,37.4 21.5,37.4 C 24.3,37.4 28.1,35.9 29.4,32.1 C 30.0,30.1
      31.2,31.0 31.2,32.7 C 31.0,39.3 26.1,44.6 18.7,44.6 C 11.4,44.6
      5.9,38.9 6.3,30.2 L 1.5,30.2 z" />'
   ;;#/proc/net/wireless for signal
esac
done</proc/net/dev
NETSVG=$NETSVG'
</svg>'
[ "$NETSVG" != "$LASTNETSVG" ] && echo "$NETSVG" >net.svg && LASTNETSVG=$NETSVG

sleep 1
done

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Wed 26 Sep 2012, 20:06    Post subject: Re: USB  

[quote="lobo115"][quote="seaside"]

hello, Thankz for your answer Very Happy , but i want know if you could do this:
seaside wrote:
technosaurus,

I was wondering if it were possible to extend the inotify aspect to include monitoring for usb drive additions and removals.

Regards,
s

lobo115,

Ah, yes --that question was when sit was using inotify which it no longer does. It's possible to do this with another program, "inotifyd" to watch for activity.

Cheers,
s
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Wed 26 Sep 2012, 20:13    Post subject:  

technosaurus,

Latest sit working nicely with added functions. Thanks.

Quote:
svg code for an network transmit/receive app:


Now that is a very interesting use.

Regards,
s
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 8 [116 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1508s ][ Queries: 13 (0.0147s) ][ GZIP on ]