Re: Gnome/Nautilus question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09 Mar 2003 18:32:58 -0600, Eric Claypool wrote
> Hi,
> 
> I have started playing around with Gnome (the version supplied with
> RH8).  The question I have is within the FileManager, Nautilus, is there
> a way to create files?  When I right click on a blank part of the
> Nautilus window, all I see are options for a new window or new 
> folder. Does a create new file option exist?  I know this option 
> exists on KDE. Coming from a Mac/Windows background, I found this 
> option to be quite useful.  If such an option does not exist, are 
> there workarounds or is this option planned for a future release?


I use a natillus-script to accomplish creating a text file:

#!/bin/sh
# 
# Add a new text file in the current directory.
# If "New Document[ number].txt" already exists,
# then the [ number] is incremented until unique.
#
# Distributed under the terms of GNU GPL version 2 or later
#
# Copyright (C) 2001 Jeffrey Phillips <jeffrey.phillips@xxxxxxxxxxxx>


COUNT=1

if ! [ -a "./New Document.txt" ] ; then
  touch "./New Document.txt"
else
  while ! [ "$retry" ] ; do
    let $((COUNT++))
    if ! [ -a "./New Document ($COUNT).txt" ] ; then
        touch "./New Document ($COUNT).txt"
	retry=1
    fi
  done
fi

and one for gedit if needed:

#!/bin/bash
#
# Nautilus script -> oppen gedit
#
# Owner : Largey Patrick from Switzerland
#   	  naze.man@xxxxxxxxxx
#
# Licence : GNU GPL 
#
# Copyright (C) Nazeman
#
# Ver. 0.9-1 Date: 16.02.2002
# Add multiple file open in the same windows
#
# Ver: 0.9  Date: 27.10.2001
# Initial release
#
# Dependence : Nautilus (of course)
#			  Gnome-utils (gdialog)
#
filesall=""
while [ $# -gt 0 ]
	do
		files=`echo "$1" | sed 's/ /\?/g'`
		filesall="$files $filesall"
		shift
	done
gedit $filesall&

Obviously donated by others.




-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux